Pages:
Author

Topic: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue (CLAIMED) - page 4. (Read 2627 times)

legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
Your link isn't much help as it's thousands of lines of code (why don't you just paste your relevant function rather than the whole of the bitaddress.org webpage that presumably includes your code "somewhere" inside) - but basically you will want to use a timer function for your looping.

Here is a simple timer example:
Code:
var auto_refresh_seconds = 30;

function auto_refresh( )
{
   if( auto_refresh_seconds == 1 )
      window.location.replace( window.location );
   else if( auto_refresh_seconds > 0 )
   {
      auto_refresh_seconds -= 1;
      setTimeout( "auto_refresh( )", 1000 );
   }
}

function load( )
{
   auto_refresh( );
}
hero member
Activity: 630
Merit: 500
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:
Code:
			



Char 1:

Char 2:

Char 3:

Char 4:

Char 5:

Char 6:

Char 7:

Char 8:

Char 9:

Char 10:

Char 11:

Char 12:

Char 13:

Char 14:

Char 15:

Char 16:

Char 17:

Char 18:

Char 19:

Char 20:

Char 21:

Char 22:

Char 23:

Char 24:

Char 25:

Char 26:

Char 27:

Char 28:

Char 29:

Char 30:

Char 31:

Char 32:

Char 33:

Char 34:

Char 35:

Char 36:

Char 37:

Char 38:

Char 39:

Char 40:

Char 41:

Char 42:

Char 43:

Char 44:

Char 45:

Char 46:

Char 47:

Char 48:



Target Address:





Comma Separated Values: Index,Address,Private Key (WIF)

               




Bitcoin Address:






Private Key (Wallet Import Format):







My modified 'brainwallet' function:
Code:
	
Pages:
Jump to: