Created
February 11, 2022 13:25
-
-
Save singe/8b94e8ebea69cb1eebc849a3e483f480 to your computer and use it in GitHub Desktop.
Hashcat Wordlist Stuff
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
#!/bin/bash | |
# Convert hashcat.pot to john.pot and merge them | |
# Usage: hc-to-john.sh <hashcat pot> <john pot> | |
# NB: Make sure the hashcat pot only contains 16 | |
# and 32 character hashes that are LM and NT hashes | |
tmp1=$(mktemp -t pot-port) | |
tmp2=$(mktemp -t pot-port) | |
hashpot=$1 | |
LC_ALL=UTF-8 sed 's/^\([a-f0-9]\{32\}:[^:]*\)$/$NT$\1/' $hashpot | grep '^\$NT\$' > $tmp1 | |
LC_ALL=UTF-8 sed 's/^\([a-f0-9]\{16\}:[^:]*\)$/$LM$\1/' $hashpot | grep '^\$LM\$' >> $tmp1 | |
johnpot=$2 | |
curr=$(LC_ALL=UTF-8 wc -l $johnpot|tr -dc "[:digit:]") | |
echo Current John: $curr | |
LC_ALL=UTF-8 cat $johnpot $tmp1|LC_ALL=UTF-8 sort -u > $tmp2 | |
cp $tmp2 $johnpot | |
tot=$(LC_ALL=UTF-8 wc -l $johnpot|tr -dc "[:digit:]") | |
echo New Total Unique: $tot | |
echo New uniques: $(($tot-$curr)) | |
rm $tmp1 | |
rm $tmp2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment