0xvavaldi / gramify Goto Github PK
View Code? Open in Web Editor NEWCreate n-grams of wordlists based on words, characters, or charsets to use in offline password attacks and data analysis
License: Apache License 2.0
Create n-grams of wordlists based on words, characters, or charsets to use in offline password attacks and data analysis
License: Apache License 2.0
please change this:
print("cat output_file.txt | sort | uniq -c | sort -rn | grep -oP '^ [0-9]+ \K.' > sorted_output.txt")
to this:
print("cat output_file.txt | sort | uniq -c | sort -rn | grep -oaP '^ [0-9]+ \K.' > sorted_output.txt")
For some workflows, it would be very helpful if gramify could operate on stdin and/or send output to stdout.
Some string may be in $HEX[] format and gramify treats them as words, without decoding them first, leading to some "unusable" results in the output.
Lines 792 to 794 in 64ef8cf
I suggest updating this recommendation so that it is more likely to work as expected.
cut -c9-
cuts at the 9th character position. But the size of each row can vary; uniq -c
adds padding before the number and the number may be large depending on how large the gramify output is.
% echo "password" | uniq -c | sort -rn | awk '($1 >=1)' | cut -c9-
sword
A simple way to do this in awk would be to use {print $2}
, but that would remove any ngrams with a space.
So the solution I found is to use a bit more complex awk command:
awk '{if ($1 >=1) {$1=""; print substr($0, index($0, $2))}}'
You can try it out with different variations with this test command:
% printf -- 'pass word\n%.0s' {1..99999} | uniq -c | sort -rn | awk '{if ($1 >=1) {$1=""; print substr($0, index($0, $2))}}'
pass word
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.