Last active
August 26, 2017 15:29
-
-
Save nethunteros/0c514f45ee259f998de23a924df689a8 to your computer and use it in GitHub Desktop.
Notes for wordlist building
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Count number of lines in file | |
wc -l hash.txt | |
# Cut 2nd column (cracked passwords) out of pot/hash file (hash:password) | |
cut -d':' -f2 input.txt > output.txt | |
# Dedupe | |
awk '!seen[$0]++' wordlist.txt | |
# Remove blank lines | |
sed -i '/^\s*$/d' wordlist.txt | |
# Remove lines with spaces (may not want to do this for all files) | |
awk '!/ /' wordlist.txt | |
# Sort wordlist/hash by frequency | |
sort wordlist.txt | uniq -c | sort -nr | cut -c 9- | |
# Split large files | |
split -l 3000000 hashes.txt part- | |
# Output only characters of 8 characters or more using awk | |
cat wordlist.txt | awk '{ if ( length($0) >= 8 ) print $0 }' > wordlist_8charactersormore.txt | |
# Output only characters of 8 characters or more using hydra | |
cat wordlist | pw-inspector -m 8 -M 63 > wordlist_8charactersormore.txt | |
# Crack all parts (large split files) | |
cat << 'EOF' > crackparts.sh | |
#!/bin/bash | |
FILES=part-* | |
for f in $FILES | |
do | |
echo "Cracking hashes in $f" | |
hashcat -a 0 -m 100 $f wordlist.txt --potfile-path mypotfile.pot -o pwned-output.txt --remove | |
done | |
EOF | |
chmod +x crackparts.sh | |
./crackparts.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment