-
-
Save s3rgeym/06bf3a8485dacb8beb4c686db07186cd 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