Last active
August 29, 2015 13:57
-
-
Save patch-werk/9426675 to your computer and use it in GitHub Desktop.
Brutes a litecoin wallet password which has one character lost/forgotten.
This file contains hidden or 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
| # This script will brute a litecoin wallet whose password is missing one character. | |
| # It requires python (duh) and the litecoinrpc library (https://github.com/deseret-tech/litecoin-python) | |
| # The library allows leeching onto the local Litecoin-qt/litecoind client running on the computer. | |
| # A litecoin.conf file must be placed in the litecoin data directory and contain the following (without the hashtags) | |
| # server=1 | |
| # rpcuser=anything | |
| # rpcpassword=anythinglol | |
| # rpcallowip=127.0.0.1 | |
| # rpcport=18332 | |
| # This allows the client to accept commands from an entity running on the same computer. rpcport can also be 9332? | |
| # You can verify these here https://litecoin.info/Litecoin.conf | |
| # The rpcuser and ps can be anything, but cant be the same. It is not necessary to write down or keep | |
| # these. They are just required to be set to something in order for litecoinrpc to be able to connect | |
| # to the litecoin client. See here if you dont believe me | |
| # https://github.com/deseret-tech/litecoin-python/blob/master/sphinx/source/usage.rst | |
| # Fire up litecoin-qt. Replace shortpass = 'insertpasshere' with the password below and then run this script! | |
| # Tested on OS X 10.7.5 | |
| import sys | |
| import string | |
| import litecoinrpc | |
| from litecoinrpc.exceptions import WalletPassphraseIncorrect | |
| def search(chars, shortpass): | |
| for x in range(len(shortpass)+1): | |
| for y in range(len(chars)): | |
| passattempt = shortpass[:x] + chars[y] + shortpass[x:] | |
| sys.stdout.write("\rattempting: " + passattempt) | |
| sys.stdout.flush() | |
| try: | |
| conn.walletpassphrase(passattempt,1) | |
| print "\npassword is " + passattempt | |
| return | |
| except WalletPassphraseIncorrect,e: | |
| pass | |
| else: | |
| print "\ncorrect password not found" | |
| return | |
| conn = litecoinrpc.connect_to_local() | |
| chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ ' | |
| shortpass = 'insertpasshere' | |
| search(chars,shortpass) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment