Skip to content

Instantly share code, notes, and snippets.

@offlinehacker
Created March 29, 2013 23:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save offlinehacker/5274437 to your computer and use it in GitHub Desktop.
Save offlinehacker/5274437 to your computer and use it in GitHub Desktop.
Simple shell AES brute forcer (especially usefull for bitcoin private keys)
#!/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