Created
March 29, 2013 23:42
-
-
Save offlinehacker/5274437 to your computer and use it in GitHub Desktop.
Simple shell AES brute forcer (especially usefull for bitcoin private keys)
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 | |
echo "Using wordlist $1" | |
echo "Using key $2" | |
cat $1 | while read LINE ; do | |
#echo "pass: $LINE" | |
key=$2 | |
p1=${key:0:64} | |
p2=${key:64} | |
echo "$p1"$'\n'"$p2" > process | |
ret=$(openssl enc -d -aes-256-cbc -in process -a -k $LINE 2>/dev/null) | |
rc=$? | |
echo "$ret" > data | |
if [[ $rc == 0 ]] ; then | |
test=$(perl -ane '{ if(m/[[:^ascii:]]/) { print } }' data 2>&1) | |
if [ -n "$test" ] ; then | |
echo "no" | |
else | |
echo "You lucky bastard, here you have some bitcoinz: $LINE, $2 => $ret" >> results | |
exit 0 | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment