Created
June 16, 2015 18:34
-
-
Save Finkregh/4864521a29a3fa204dc9 to your computer and use it in GitHub Desktop.
bruteforce encfs
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/sh | |
# initially from http://bredsaal.dk/cracking-encfs-made-easier | |
# usage: crackencfs.sh /path/to/encrypted/folder /path/to/mountpoint /path/to/wordlist | |
counter=1 | |
while [ true ]; do | |
echo "$(head -n $counter $3 | tail -n 1)" | encfs $1 $2 --stdinpass | |
if [ $? -eq 0 ]; then | |
echo Key recovered - the password is: | |
echo "$(head -n $counter $3 | tail -n 1)" | |
exit | |
fi | |
counter=$(($counter + 1)) | |
done |
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
# split password-list in e.g. 390-line-files: | |
split -l 390 pwlist.txt pwlist-split- | |
# run bruteforce in parallel: | |
for PWLIST in $(ls pwlist-split-*) ; do mkdir /tmp/${PWLIST} ; nice bash bruteforce-encfs.sh ~/encfs-dir /tmp/${PWLIST} ${PWLIST} >> /tmp/crack.log 2>&1 & done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After trying bruteforce-encfs.sh script, two notes: