Update 2013-11-30: Bounty claimed. Thanks everyone.
Another day, another lost password.
The code I've pasted below is my (very crude) attempt at modifying bitaddress.org (v 2.4) to help me recover a password in a particular way.
In my particular case, I know the exact length of my password, and pretty much know what every letter is, however I'm stuck on the case of some of the letters.
Example: I don't know if my password is appLe or aPple or ApplE.
In this case, there are 2^X possible combinations, where X is the number of characters whose case I'm unsure of.
If you save the below code as .html and check out the brainwallet tab, you'll see I've modified this page to take each character as a separate input.
Example:
a
p
p
l
e
I've set it up so that for each character, I can type all the different possible combinations for that character, and then the script will check all the possible combinations of the password.
Example, I input:
a
pP
pP
l
e
And it will check:
apple
apPle
aPple
aPPle
What it's checking against, is the 'target' address. I paste in that target address input box the bitcoin address that I'm trying to find the key for. When the script finds a match, it will output the passphrase that resulted in the address, and output the private key for it too.
Now the part I'm stuck on, and what the bounty is for:Any more than about 20 combinations makes my browser hang, because of the horrible way I've done all this in nested while loops. What I need is for this whole thing to be modified so that the browser doesn't hang, and constantly outputs where it's up to.
Example:
Checking combination 75 out of 8192
I'd like it to kind of act like how the 'bulk wallet' generator tab works, when you generate a huge amount of addresses (say 1000). You can see it working, and doesn't hang the browser.
Code:
http://pastebin.com/ijxcd4qk(Sorry it was too big to paste here directly)
Edit: Here are the 2 parts I've modified:
My modified 'brainarea' div:
Comma Separated Values: Index,Address,Private Key (WIF)
Private Key (Wallet Import Format):
My modified 'brainwallet' function: