Skip to content

Instantly share code, notes, and snippets.

@antimech
Last active November 22, 2023 08:28
Show Gist options
  • Save antimech/adf752ed431569750124c9222f7f9a69 to your computer and use it in GitHub Desktop.
Save antimech/adf752ed431569750124c9222f7f9a69 to your computer and use it in GitHub Desktop.
Loki Wallet BruteForce Password Recovery. Helps if you forgot the password. The command line tools required: https://github.com/loki-project/loki/releases/latest
#!/usr/bin/env bash
start=`date +%s` # save start time
tries=0 # tries counter
dictionary=/usr/share/dict/words # you can specify your own dictonary
for word in $(< $dictionary);
do echo "Trying: $word";
((tries++))
echo -e "wallet.keys\n$word" | ./loki-wallet-cli | egrep "^Opened wallet" && echo -e "\nThe passphrase is: $word\n" && break;
done
end=`date +%s` # save end time
runtime=$((end - start)) # calculate runtime
speed=$((tries / runtime)) # calculate speed
echo "$tries passphrases tested in $runtime seconds: $speed passphrases/second"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment