Bitcoin Forum

Bitcoin => Project Development => Topic started by: Cyberdyne on November 29, 2013, 07:22:47 AM



Title: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue (CLAIMED)
Post by: Cyberdyne on November 29, 2013, 07:22:47 AM
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:
			<div id="brainarea" class="walletarea">
<div id="braincommands" class="commands">
<div class="row">
<span id="brainlabelenterpassphrase1" class="label">Char 1: </span><input tabindex="1" type="text" id="passphrasechar_1" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase2" class="label">Char 2: </span><input tabindex="2" type="text" id="passphrasechar_2" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase3" class="label">Char 3: </span><input tabindex="3" type="text" id="passphrasechar_3" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase4" class="label">Char 4: </span><input tabindex="4" type="text" id="passphrasechar_4" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase5" class="label">Char 5: </span><input tabindex="5" type="text" id="passphrasechar_5" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase6" class="label">Char 6: </span><input tabindex="6" type="text" id="passphrasechar_6" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase7" class="label">Char 7: </span><input tabindex="7" type="text" id="passphrasechar_7" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase8" class="label">Char 8: </span><input tabindex="8" type="text" id="passphrasechar_8" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase9" class="label">Char 9: </span><input tabindex="9" type="text" id="passphrasechar_9" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase10" class="label">Char 10: </span><input tabindex="10" type="text" id="passphrasechar_10" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase11" class="label">Char 11: </span><input tabindex="11" type="text" id="passphrasechar_11" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase12" class="label">Char 12: </span><input tabindex="12" type="text" id="passphrasechar_12" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase13" class="label">Char 13: </span><input tabindex="13" type="text" id="passphrasechar_13" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase14" class="label">Char 14: </span><input tabindex="14" type="text" id="passphrasechar_14" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase15" class="label">Char 15: </span><input tabindex="15" type="text" id="passphrasechar_15" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase16" class="label">Char 16: </span><input tabindex="16" type="text" id="passphrasechar_16" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase17" class="label">Char 17: </span><input tabindex="17" type="text" id="passphrasechar_17" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase18" class="label">Char 18: </span><input tabindex="18" type="text" id="passphrasechar_18" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase19" class="label">Char 19: </span><input tabindex="19" type="text" id="passphrasechar_19" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase20" class="label">Char 20: </span><input tabindex="20" type="text" id="passphrasechar_20" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase21" class="label">Char 21: </span><input tabindex="21" type="text" id="passphrasechar_21" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase22" class="label">Char 22: </span><input tabindex="22" type="text" id="passphrasechar_22" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase23" class="label">Char 23: </span><input tabindex="23" type="text" id="passphrasechar_23" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase24" class="label">Char 24: </span><input tabindex="24" type="text" id="passphrasechar_24" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase25" class="label">Char 25: </span><input tabindex="25" type="text" id="passphrasechar_25" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase26" class="label">Char 26: </span><input tabindex="26" type="text" id="passphrasechar_26" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase27" class="label">Char 27: </span><input tabindex="27" type="text" id="passphrasechar_27" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase28" class="label">Char 28: </span><input tabindex="28" type="text" id="passphrasechar_28" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase29" class="label">Char 29: </span><input tabindex="29" type="text" id="passphrasechar_29" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase30" class="label">Char 30: </span><input tabindex="30" type="text" id="passphrasechar_30" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase31" class="label">Char 31: </span><input tabindex="31" type="text" id="passphrasechar_31" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase32" class="label">Char 32: </span><input tabindex="32" type="text" id="passphrasechar_32" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase33" class="label">Char 33: </span><input tabindex="33" type="text" id="passphrasechar_33" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase34" class="label">Char 34: </span><input tabindex="34" type="text" id="passphrasechar_34" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase35" class="label">Char 35: </span><input tabindex="35" type="text" id="passphrasechar_35" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase36" class="label">Char 36: </span><input tabindex="36" type="text" id="passphrasechar_36" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase37" class="label">Char 37: </span><input tabindex="37" type="text" id="passphrasechar_37" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase38" class="label">Char 38: </span><input tabindex="38" type="text" id="passphrasechar_38" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase39" class="label">Char 39: </span><input tabindex="39" type="text" id="passphrasechar_39" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase40" class="label">Char 40: </span><input tabindex="40" type="text" id="passphrasechar_40" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase41" class="label">Char 41: </span><input tabindex="41" type="text" id="passphrasechar_41" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase42" class="label">Char 42: </span><input tabindex="42" type="text" id="passphrasechar_42" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase43" class="label">Char 43: </span><input tabindex="43" type="text" id="passphrasechar_43" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase44" class="label">Char 44: </span><input tabindex="44" type="text" id="passphrasechar_44" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase45" class="label">Char 45: </span><input tabindex="45" type="text" id="passphrasechar_45" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase46" class="label">Char 46: </span><input tabindex="46" type="text" id="passphrasechar_46" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase47" class="label">Char 47: </span><input tabindex="47" type="text" id="passphrasechar_47" value="" onfocus="this.select();"/><br/>
<span id="brainlabelenterpassphrase48" class="label">Char 48: </span><input tabindex="48" type="text" id="passphrasechar_48" value="" onfocus="this.select();"/><br/>
</div>
<div class="row extra">
<span class="label" id="brainlabelconfirm">Target Address: </span>
<input tabindex="54" type="text" id="targetaddress" value="" onfocus="this.select();" />
<span><input tabindex="55" type="button" id="brainview" value="View" onclick="ninja.wallets.brainwallet.view();" /></span>
</div>
</div>
<div class="body">
<span class="label" id="bulklabelcsv">Comma Separated Values:</span> <span class="format" id="bulklabelformat">Index,Address,Private Key (WIF)</span>
<textarea rows="20" cols="88" id="bulktextarea2"></textarea>
</div>                
<div id="brainkeyarea" class="keyarea">
<div class="public">
<div id="brainqrcodepublic" class="qrcode_public"></div>
<div class="pubaddress">
<span class="label" id="brainlabelbitcoinaddress">Bitcoin Address:</span>
<span class="output" id="brainbtcaddress"></span>
</div>
</div>
<div class="private">
<div id="brainqrcodeprivate" class="qrcode_private"></div>
<div class="privwif">
<span class="label" id="brainlabelprivatekey">Private Key (Wallet Import Format):</span>
<span class="output" id="brainbtcprivwif"></span>
</div>
</div>
</div>
</div>


My modified 'brainwallet' function:
Code:
	<script type="text/javascript">
ninja.wallets.brainwallet = {
open: function () {
document.getElementById("brainarea").style.display = "block";
document.getElementById("passphrasechar_1").focus();
},

close: function () {
document.getElementById("brainarea").style.display = "none";
},

view: function () {
var passphrasechar_1 = document.getElementById("passphrasechar_1").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_2 = document.getElementById("passphrasechar_2").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_3 = document.getElementById("passphrasechar_3").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_4 = document.getElementById("passphrasechar_4").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_5 = document.getElementById("passphrasechar_5").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_6 = document.getElementById("passphrasechar_6").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_7 = document.getElementById("passphrasechar_7").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_8 = document.getElementById("passphrasechar_8").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_9 = document.getElementById("passphrasechar_9").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_10 = document.getElementById("passphrasechar_10").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_11 = document.getElementById("passphrasechar_11").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_12 = document.getElementById("passphrasechar_12").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_13 = document.getElementById("passphrasechar_13").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_14 = document.getElementById("passphrasechar_14").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_15 = document.getElementById("passphrasechar_15").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_16 = document.getElementById("passphrasechar_16").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_17 = document.getElementById("passphrasechar_17").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_18 = document.getElementById("passphrasechar_18").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_19 = document.getElementById("passphrasechar_19").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_20 = document.getElementById("passphrasechar_20").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_21 = document.getElementById("passphrasechar_21").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_22 = document.getElementById("passphrasechar_22").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_23 = document.getElementById("passphrasechar_23").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_24 = document.getElementById("passphrasechar_24").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_25 = document.getElementById("passphrasechar_25").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_26 = document.getElementById("passphrasechar_26").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_27 = document.getElementById("passphrasechar_27").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_28 = document.getElementById("passphrasechar_28").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_29 = document.getElementById("passphrasechar_29").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_30 = document.getElementById("passphrasechar_30").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_31 = document.getElementById("passphrasechar_31").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_32 = document.getElementById("passphrasechar_32").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_33 = document.getElementById("passphrasechar_33").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_34 = document.getElementById("passphrasechar_34").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_35 = document.getElementById("passphrasechar_35").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_36 = document.getElementById("passphrasechar_36").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_37 = document.getElementById("passphrasechar_37").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_38 = document.getElementById("passphrasechar_38").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_39 = document.getElementById("passphrasechar_39").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_40 = document.getElementById("passphrasechar_40").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_41 = document.getElementById("passphrasechar_41").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_42 = document.getElementById("passphrasechar_42").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_43 = document.getElementById("passphrasechar_43").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_44 = document.getElementById("passphrasechar_44").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_45 = document.getElementById("passphrasechar_45").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_46 = document.getElementById("passphrasechar_46").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_47 = document.getElementById("passphrasechar_47").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_48 = document.getElementById("passphrasechar_48").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var target = document.getElementById("targetaddress").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
                
                var checkphrase = "";
//     var combos = [];
                var bytes;
                var btcKey;
                var bitcoinAddress;                
                var attempts = 0;
                
                var len_1 = passphrasechar_1.length;
                var len_2 = passphrasechar_2.length;
                var len_3 = passphrasechar_3.length;
                var len_4 = passphrasechar_4.length;
                var len_5 = passphrasechar_5.length;
                var len_6 = passphrasechar_6.length;
                var len_7 = passphrasechar_7.length;
                var len_8 = passphrasechar_8.length;
                var len_9 = passphrasechar_9.length;
                var len_10 = passphrasechar_10.length;
                var len_11 = passphrasechar_11.length;
                var len_12 = passphrasechar_12.length;
                var len_13 = passphrasechar_13.length;
                var len_14 = passphrasechar_14.length;
                var len_15 = passphrasechar_15.length;
                var len_16 = passphrasechar_16.length;
                var len_17 = passphrasechar_17.length;
                var len_18 = passphrasechar_18.length;
                var len_19 = passphrasechar_19.length;
                var len_20 = passphrasechar_20.length;
                var len_21 = passphrasechar_21.length;
                var len_22 = passphrasechar_22.length;
                var len_23 = passphrasechar_23.length;
                var len_24 = passphrasechar_24.length;
                var len_25 = passphrasechar_25.length;
                var len_26 = passphrasechar_26.length;
                var len_27 = passphrasechar_27.length;
                var len_28 = passphrasechar_28.length;
                var len_29 = passphrasechar_29.length;
                var len_30 = passphrasechar_30.length;
                var len_31 = passphrasechar_31.length;
                var len_32 = passphrasechar_32.length;
                var len_33 = passphrasechar_33.length;
                var len_34 = passphrasechar_34.length;
                var len_35 = passphrasechar_35.length;
                var len_36 = passphrasechar_36.length;
                var len_37 = passphrasechar_37.length;
                var len_38 = passphrasechar_38.length;
                var len_39 = passphrasechar_39.length;
                var len_40 = passphrasechar_40.length;
                var len_41 = passphrasechar_41.length;
                var len_42 = passphrasechar_42.length;
                var len_43 = passphrasechar_43.length;
                var len_44 = passphrasechar_44.length;
                var len_45 = passphrasechar_45.length;
                var len_46 = passphrasechar_46.length;
                var len_47 = passphrasechar_47.length;
                var len_48 = passphrasechar_48.length;
                    
                var totalcombinations =
                    len_1*len_2*len_3*len_4*len_5*len_6*len_7*len_8*len_9*len_10*
                    len_11*len_12*len_13*len_14*len_15*len_16*len_17*len_18*len_19*len_20*
                    len_21*len_22*len_23*len_24*len_25*len_26*len_27*len_28*len_29*len_30*
                    len_31*len_32*len_33*len_34*len_35*len_36*len_37*len_38*len_39*len_40*
                    len_41*len_42*len_43*len_44*len_45*len_46*len_47*len_48  
                    ;
                    
                //var attemptedpercent = 0;
                
                var i_1 = 0; while ((i_1 < len_1) && (bitcoinAddress != target)) {
                var i_2 = 0; while ((i_2 < len_2) && (bitcoinAddress != target)) {
                var i_3 = 0; while ((i_3 < len_3) && (bitcoinAddress != target)) {
                var i_4 = 0; while ((i_4 < len_4) && (bitcoinAddress != target)) {
                var i_5 = 0; while ((i_5 < len_5) && (bitcoinAddress != target)) {
                var i_6 = 0; while ((i_6 < len_6) && (bitcoinAddress != target)) {
                var i_7 = 0; while ((i_7 < len_7) && (bitcoinAddress != target)) {
                var i_8 = 0; while ((i_8 < len_8) && (bitcoinAddress != target)) {
                var i_9 = 0; while ((i_9 < len_9) && (bitcoinAddress != target)) {
                var i_10 = 0; while ((i_10 < len_10) && (bitcoinAddress != target)) {
                var i_11 = 0; while ((i_11 < len_11) && (bitcoinAddress != target)) {
                var i_12 = 0; while ((i_12 < len_12) && (bitcoinAddress != target)) {
                var i_13 = 0; while ((i_13 < len_13) && (bitcoinAddress != target)) {
                var i_14 = 0; while ((i_14 < len_14) && (bitcoinAddress != target)) {
                var i_15 = 0; while ((i_15 < len_15) && (bitcoinAddress != target)) {
                var i_16 = 0; while ((i_16 < len_16) && (bitcoinAddress != target)) {
                var i_17 = 0; while ((i_17 < len_17) && (bitcoinAddress != target)) {
                var i_18 = 0; while ((i_18 < len_18) && (bitcoinAddress != target)) {
                var i_19 = 0; while ((i_19 < len_19) && (bitcoinAddress != target)) {
                var i_20 = 0; while ((i_20 < len_20) && (bitcoinAddress != target)) {
                var i_21 = 0; while ((i_21 < len_21) && (bitcoinAddress != target)) {
                var i_22 = 0; while ((i_22 < len_22) && (bitcoinAddress != target)) {
                var i_23 = 0; while ((i_23 < len_23) && (bitcoinAddress != target)) {
                var i_24 = 0; while ((i_24 < len_24) && (bitcoinAddress != target)) {
                var i_25 = 0; while ((i_25 < len_25) && (bitcoinAddress != target)) {
                var i_26 = 0; while ((i_26 < len_26) && (bitcoinAddress != target)) {
                var i_27 = 0; while ((i_27 < len_27) && (bitcoinAddress != target)) {
                var i_28 = 0; while ((i_28 < len_28) && (bitcoinAddress != target)) {
                var i_29 = 0; while ((i_29 < len_29) && (bitcoinAddress != target)) {
                var i_30 = 0; while ((i_30 < len_30) && (bitcoinAddress != target)) {
                var i_31 = 0; while ((i_31 < len_31) && (bitcoinAddress != target)) {
                var i_32 = 0; while ((i_32 < len_32) && (bitcoinAddress != target)) {
                var i_33 = 0; while ((i_33 < len_33) && (bitcoinAddress != target)) {
                var i_34 = 0; while ((i_34 < len_34) && (bitcoinAddress != target)) {
                var i_35 = 0; while ((i_35 < len_35) && (bitcoinAddress != target)) {
                var i_36 = 0; while ((i_36 < len_36) && (bitcoinAddress != target)) {
                var i_37 = 0; while ((i_37 < len_37) && (bitcoinAddress != target)) {
                var i_38 = 0; while ((i_38 < len_38) && (bitcoinAddress != target)) {
                var i_39 = 0; while ((i_39 < len_39) && (bitcoinAddress != target)) {
                var i_40 = 0; while ((i_40 < len_40) && (bitcoinAddress != target)) {
                var i_41 = 0; while ((i_41 < len_41) && (bitcoinAddress != target)) {
                var i_42 = 0; while ((i_42 < len_42) && (bitcoinAddress != target)) {
                var i_43 = 0; while ((i_43 < len_43) && (bitcoinAddress != target)) {
                var i_44 = 0; while ((i_44 < len_44) && (bitcoinAddress != target)) {
                var i_45 = 0; while ((i_45 < len_45) && (bitcoinAddress != target)) {
                var i_46 = 0; while ((i_46 < len_46) && (bitcoinAddress != target)) {
                var i_47 = 0; while ((i_47 < len_47) && (bitcoinAddress != target)) {
                var i_48 = 0; while ((i_48 < len_48) && (bitcoinAddress != target)) {
                    checkphrase =
                        passphrasechar_1[i_1] +
                        passphrasechar_2[i_2] +
                        passphrasechar_3[i_3] +
                        passphrasechar_4[i_4] +
                        passphrasechar_5[i_5] +
                        passphrasechar_6[i_6] +
                        passphrasechar_7[i_7] +
                        passphrasechar_8[i_8] +
                        passphrasechar_9[i_9] +
                        passphrasechar_10[i_10] +
                        passphrasechar_11[i_11] +
                        passphrasechar_12[i_12] +
                        passphrasechar_13[i_13] +
                        passphrasechar_14[i_14] +
                        passphrasechar_15[i_15] +
                        passphrasechar_16[i_16] +
                        passphrasechar_17[i_17] +
                        passphrasechar_18[i_18] +
                        passphrasechar_19[i_19] +
                        passphrasechar_20[i_20] +
                        passphrasechar_21[i_21] +
                        passphrasechar_22[i_22] +
                        passphrasechar_23[i_23] +
                        passphrasechar_24[i_24] +
                        passphrasechar_25[i_25] +
                        passphrasechar_26[i_26] +
                        passphrasechar_27[i_27] +
                        passphrasechar_28[i_28] +
                        passphrasechar_29[i_29] +
                        passphrasechar_30[i_30] +
                        passphrasechar_31[i_31] +
                        passphrasechar_32[i_32] +
                        passphrasechar_33[i_33] +
                        passphrasechar_34[i_34] +
                        passphrasechar_35[i_35] +
                        passphrasechar_36[i_36] +
                        passphrasechar_37[i_37] +
                        passphrasechar_38[i_38] +
                        passphrasechar_39[i_39] +
                        passphrasechar_40[i_40] +
                        passphrasechar_41[i_41] +
                        passphrasechar_42[i_42] +
                        passphrasechar_43[i_43] +
                        passphrasechar_44[i_44] +
                        passphrasechar_45[i_45] +
                        passphrasechar_46[i_46] +
                        passphrasechar_47[i_47] +
                        passphrasechar_48[i_48]
                    ;
                    
                    bytes = Crypto.SHA256(checkphrase, { asBytes: true });
                    btcKey = new Bitcoin.ECKey(bytes);
                    bitcoinAddress = btcKey.getBitcoinAddress();
                    
//combos.push(checkphrase + ", " + bitcoinAddress);
                    attempts++;
                    
                    //attemptedpercent = attempts / totalcombinations * 100;
                    document.getElementById("bulktextarea2").value = "Combinations tried: " + attempts + " out of " + totalcombinations; // + " (" + attemptedpercent.toFixed(2) + "%)";
                    
                    
                    i_48++;}
                    i_47++;}
                    i_46++;}
                    i_45++;}                
                    i_44++;}
                    i_43++;}
                    i_42++;}
                    i_41++;}                
                    i_40++;}
                    i_39++;}                
                    i_38++;}
                    i_37++;}
                    i_36++;}
                    i_35++;}                
                    i_34++;}
                    i_33++;}
                    i_32++;}
                    i_31++;}                
                    i_30++;}
                    i_29++;}                
                    i_28++;}
                    i_27++;}
                    i_26++;}
                    i_25++;}                
                    i_24++;}
                    i_23++;}
                    i_22++;}
                    i_21++;}                
                    i_20++;}
                    i_19++;}                
                    i_18++;}
                    i_17++;}
                    i_16++;}
                    i_15++;}                
                    i_14++;}
                    i_13++;}
                    i_12++;}
                    i_11++;}                
                    i_10++;}
                    i_9++;}                
                    i_8++;}
                    i_7++;}
                    i_6++;}
                    i_5++;}                
                    i_4++;}
                    i_3++;}
                    i_2++;}
                    i_1++;
                }                

                if (bitcoinAddress == target)
                {
                    var privWif = btcKey.getBitcoinWalletImportFormat();
                    document.getElementById("brainbtcaddress").innerHTML = bitcoinAddress;
                    document.getElementById("brainbtcprivwif").innerHTML = privWif;
                    ninja.qrCode.showQrCode({
                        "brainqrcodepublic": bitcoinAddress,
                        "brainqrcodeprivate": privWif
                    });
                    document.getElementById("brainkeyarea").style.visibility = "visible";
                }

},

clear: function () {
document.getElementById("brainkeyarea").style.visibility = "hidden";
},

showToggle: function (element) {
if (element.checked) {
document.getElementById("brainpassphrase").setAttribute("type", "text");
document.getElementById("brainpassphraseconfirm").style.visibility = "hidden";
document.getElementById("brainlabelconfirm").style.visibility = "hidden";
}
else {
document.getElementById("brainpassphrase").setAttribute("type", "password");
document.getElementById("brainpassphraseconfirm").style.visibility = "visible";
document.getElementById("brainlabelconfirm").style.visibility = "visible";
}
}
};
</script>


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: CIYAM on November 29, 2013, 07:34:49 AM
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( );
}


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 07:40:48 AM
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.


Good idea, although I'm so embarrassed by my lack of array usage :)

OP updated.

As far as timer usage goes, you're very likely correct that it needs some kind of setTimeout(), however I can't get my own head around how to do it yet. Willing to pay some Javascript guru for the help.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: schalk on November 29, 2013, 08:08:34 AM
I think the main issue is that you are using iteration instead of recursion. If I have time I'll post up a sample that'll help you fix it.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: KieranJones1 on November 29, 2013, 08:15:58 AM
As schalk said, your main issue is using iteration instead of recursion. Here's a much better approach.

First, you'll need some understanding of what is meant by a "graph" in CS. A graph is an organization of nodes and edges. The nodes contain data or represent state, and the edges represent connections between pieces of data or transitions between states. (Apologies if you knew this already, but I figured you were looking for a full explanation.)

For our purposes, think of each letter in the word as a node, and the edges connect in the obvious way, from the first letter to the second, etc. We're going to search the graph for the correct sequence.

For simplicity, let's say that our starting node is empty. Let's pretend your password is some upper/lower combo of abcde, in that order.

So our blank node has two edges, leading to a and A.
a has two edges, leading to b and B
A has two edges, leading to b and B

We'll be using a concept known as depth first search. Essentially, we're going to dive down to the bottom of the graph, because those are the only valid solutions in our case. Assuming you're familiar with how recursion works, you'd have a function that takes a string and a position, where the position refers to the index of the next character to be appended to the string.

When the index is past the end of the string, you have a possible password and you should try it. If not, you return from the function and it unwinds up the stack.

A third parameter would be helpful - a boolean representing whether it should be upper or lower. So you call your search function from the implicit blank node, pass in an empty string, 0, and true - then call it again with an empty string, 0, and false. That will search the entire graph of upper and lower combinations.

Let me know if this is the kind of advice you were looking for! :)


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: schalk on November 29, 2013, 08:20:36 AM
Here is some code that will allow you too check using recursion:

Code:

function test(target, current, characters, index)
{
if (index == characters.length)
{
if (current == target)
{
console.log("found");
}
return;
}

var currentLetters = characters[index];
for(var i = 0; i < currentLetters.length; i++)
{

test(target, current + currentLetters[i], characters, index + 1);
}
}

// get pass character elements
var characters = [];
var index = 1;
while ($("input[type=text][tabindex='" + index + "']") !== null) {
var value = $("input[type=text][tabindex='" + index + "']").value.toString().replace(/^\s+|\s+$/g, "");
if (value != "") {
characters.push(value);
}
index++;
}

console.log(characters);

var target = document.getElementById("targetaddress").value.toString().replace(/^\s+|\s+$/g, "");
var current = "";

console.log(target);

test(target, current, characters, 0);


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 08:21:47 AM
I think the main issue is that you are using iteration instead of recursion. If I have time I'll post up a sample that'll help you fix it.

Thank you for your reply schalk and KieranJones1.

Yes, the above was a quick and dirty copy/paste job. I'm familiar with recursion but just feel like paying someone else to do this at the moment rather than spend time on it. As the issue involves my own personal money, I feel too emotionally involved to want to code this myself right now.

I've tried 2048 combinations with no luck, but need a more solid solution that will help me test about 8 or 16m.

Again, anyone able to provide me with a complete solution (rather than just coding help) will be well rewarded.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: schalk on November 29, 2013, 08:25:03 AM
Can you please leave this bounty for me. I'm closish to having a solution.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: KieranJones1 on November 29, 2013, 08:26:00 AM
You never explicitly asked for code, just "help" :P No problem, though, I hope my explanation helped rather than confused things.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 08:32:58 AM
You never explicitly asked for code, just "help" :P

Quote
What I need is for this whole thing to be modified

I do appreciate your input Kieran, PM me your address for a tip.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: schalk on November 29, 2013, 08:38:34 AM
http://pastebin.com/P2ghHZrg# full solution

Please tip 18xavJxp7Wxs3vjQvLAsfpTyt9RDBin4RB if you are satisfied with the solution

EDIT: Sorry just read your previous post about it needing to have the ability to do 16million combinations. I'm unsure if my solution is capable of that.

I think you'd be better off with a desktop application solution as opposed to a javascript one if you're planning on generating upto 16 million bitcoin addresses.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: KieranJones1 on November 29, 2013, 08:49:02 AM
Just received my tip, thank you very much OP. I hope you get the solution you're after!


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 08:53:59 AM
http://pastebin.com/P2ghHZrg# full solution

Please tip 18xavJxp7Wxs3vjQvLAsfpTyt9RDBin4RB if you are satisfied with the solution

EDIT: Sorry just read your previous post about it needing to have the ability to do 16million combinations. I'm unsure if my solution is capable of that.

I think you'd be better off with a desktop application solution as opposed to a javascript one if you're planning on generating upto 16 million bitcoin addresses.

Why would it be incapable of a particular number? The main point is that I should be able to see it's progress without the browser hanging.

If I have no success with 16m, I may even have to go back and try doing a 64m or 128m run... depending on how things go.

I'll take a look at your code now anyway, thank you so much for your efforts.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: tubbyjr on November 29, 2013, 08:55:26 AM
Here's my solution

http://pastebin.com/NWc2rWWr

Does what you asked for, it does not cause the browser to hang. Updates the combinations, it won't show every increase in text area, due to the code seemingly going to fast for JS to actually constantly update the text area value, but i added code so the progress shows up in your console, in real time. So if you go to web developer tools, and console, you'll see realtime data.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: tubbyjr on November 29, 2013, 08:57:52 AM
I'm doing 6M combos at the moment, note, it will take about 30 seconds for it to start up, when doing this many combos. More for 16M ofc.

EDIT: Something odd happened lol, once I passed 5000, the textarea actually updates in realtime now, and console is lagging lol. So you might even wanna consider commenting out the console.log code I added.

EDIT2: What happened was my console window actually got too full, once i closed and reopened it, it was showing realtime too. Browser does not hang :).


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 09:01:33 AM
http://pastebin.com/P2ghHZrg

Hi schalk,

The only thing yours is doing for me, is posting a javascript alert() saying 'done', at the end of it's run. It is not updating me on the progress of how many have been checked as they're being checked. Did you take a look at how the 'bulk wallet' generate tab works, as suggested in the OP?

I will now take a look at tubbyjr's solution.

Thanks.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: tubbyjr on November 29, 2013, 09:08:30 AM
If you wish to tip or pay, please do it to the following address: 1KU8RFgfVqaqUNTB8uA7MLzbZJTuEwQCQ3


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 09:10:19 AM
http://pastebin.com/NWc2rWWr

Hi Tubby,

Your progress alert is working how I'd expect, however your code doesn't seem to be actually checking each address against the target. Once the target address is found, it should stop processing and show what phrase generated that address.

I tried your code with the following phrase:

abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv

The real bitaddress.org says the address for that is 1KVGuANp3HyH4m6xQYhUV9EWhq6tUVypAG

So, in your html, I input:

a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
abcdefghijklmnopqrstuvwxyz
1KVGuANp3HyH4m6xQYhUV9EWhq6tUVypAG

There are 26 combinations in the above, but your code tries all 26 of them with no 'success', whereas it should have found success on the 23rd 22nd attempt.

My originally supplied code in the OP does properly check the target address and stop processing at that point, so this is functionality that you have broken or removed in your version. If you can put that functionality back in, the bounty would be yours.

Thanks very much.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: tubbyjr on November 29, 2013, 09:24:08 AM
Ugh, yes unfortunately I just noticed that :S. I'm trying some workarounds right now to fix it, it's 4:30 am here :p, may be going to sleep soon, but if it's still up for tomorrow, I'll definitely jump on it.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 09:44:27 AM
EDIT2: What happened was my console window actually got too full, once i closed and reopened it, it was showing realtime too. Browser does not hang :).

I can reproduce that experience :) It would be cool if this console (on Chrome at least) could be set to only display a certain number of lines and discard the earlier lines! Limiting the console window to 1000 lines or something would be handy.

p.s. On my i7 2600k, doing 8m in Javascript should take about 39 hours. Not great, but at least it's not 39 years. If it turns out I need to check more than 8m, I'll probably start hunting for a c++ (and gpu) solution.



Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 09:52:45 AM
Please tip 18xavJxp7Wxs3vjQvLAsfpTyt9RDBin4RB if you are satisfied with the solution

Sent you a tip schalk. Thanks for your efforts, but I think tubbyjr is closest to taking out this bounty.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: tubbyjr on November 29, 2013, 10:56:38 AM
Completed the solution, tested and it seems to work fine, data you will be getting is not realtime, there will be lag in the updates as it gets larger and larger. I do NOT recommend actually trying to scroll on the browser window or anything, it is JS after all, and literally all the browsers resources are being put towards brute-forcing.

You can set the delay (delaynum, added comment right before it in caps) to whatever value you wish, the higher you'll go, the longer you'll wanna set it. You might wanna consider a progressive delay.

http://pastebin.com/mgGitqLr

Please send to the following address if you're satisfied: 1KU8RFgfVqaqUNTB8uA7MLzbZJTuEwQCQ3

Not the one in my sig please.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: tubbyjr on November 29, 2013, 11:02:05 AM
Also, here's an easy way for it to notify you of solution, just put it after bitcoinAddress = ....

Code:
if(bitcoinAddress == checkphrase)
alert(checkphrase);


It found the solution to the previous problem, and actually, it's running quite efficiently going to a combo of 2M, I thought it was laggy, but I had several applications, a game, and browsers open, so that was seemingly causing me the lag. Updating almost at real time now. I'm able to scroll the window and everything :).


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 29, 2013, 11:08:50 AM
Is this for real ?

Code:
var passphrasechar_1 = document.getElementById("passphrasechar_1").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_2 = document.getElementById("passphrasechar_2").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_3 = document.getElementById("passphrasechar_3").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space
var passphrasechar_4 = document.getElementById("passphrasechar_4").value.toString().replace(/^\s+|\s+$/g, ""); // trim white space

...

var len_1 = passphrasechar_1.length;
var len_2 = passphrasechar_2.length;
var len_3 = passphrasechar_3.length;
var len_4 = passphrasechar_4.length;

...

var i_1 = 0; (function i1() {
var i_2 = 0; (function i2() {
var i_3 = 0; (function i3() {
var i_4 = 0; (function i4() {

...

checkphrase =
                        passphrasechar_1[i_1] +
                        passphrasechar_2[i_2] +
                        passphrasechar_3[i_3] +
                        passphrasechar_4[i_4] +

...

There should be some trivial criteria for code quality here.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: tubbyjr on November 29, 2013, 11:19:32 AM
Your spam is unneeded here, I'm patching the OPs code, as per his request. If you have nothing better to do than troll, be gone.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 11:21:33 AM
Also, here's an easy way for it to notify you of solution, just put it after bitcoinAddress = ....

Code:
if(bitcoinAddress == checkphrase)
alert(checkphrase);


It found the solution to the previous problem, and actually, it's running quite efficiently going to a combo of 2M, I thought it was laggy, but I had several applications, a game, and browsers open, so that was seemingly causing me the lag. Updating almost at real time now. I'm able to scroll the window and everything :).

bitcoinAddress should never be equal to checkphrase, i think you mean 'target'.

Thanks for your help, I'll try your new copy now.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: tubbyjr on November 29, 2013, 11:24:03 AM
Sorry, meant target. Note, it will be fastest when all characters are utilized, with your test, of having only one character, having more than 1 letter, at the current delay, it will go about 1500ms, for each combo. But when you utilize all 48, it will be 1500/48ms per combo. You adjust the delaynum to whatever suits you, I chose a high safe number, as I said, with it I reached 2M no prob, on my Q6600, although it is OC'd to 3.3 GhZ


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 29, 2013, 11:30:23 AM
I'm patching the OPs code, as per his request.

Anyone that can actually code anything would never work on that, instead would do a proper implementation. I could provide an actual clean solution, but if OP is fine with that then whatever, it is his bounty after all.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 11:31:32 AM
Sorry, meant target. Note, it will be fastest when all characters are utilized, with your test, of having only one character, having more than 1 letter, at the current delay, it will go about 1500ms, for each combo. But when you utilize all 48, it will be 1500/48ms per combo. You adjust the delaynum to whatever suits you, I chose a high safe number, as I said, with it I reached 2M no prob, on my Q6600, although it is OC'd to 3.3 GhZ

Where do I put that? Could you please post your completed solution? Also, an alert() will not be appropriate for outputting the winning phrase, because I won't be able to copy it to the clipboard from there.

My copy used to just print it out in the big text area when it found it.

Thanks.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 11:33:24 AM
I'm patching the OPs code, as per his request.

Anyone that can actually code anything would never work on that, instead would do a proper implementation. I could provide an actual clean solution, but if OP is fine with that then whatever, it is his bounty after all.

I'd never hire a troll, no matter how skilled.

People skills come first, then coding prowess comes in second.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 29, 2013, 11:38:54 AM
I'm patching the OPs code, as per his request.

Anyone that can actually code anything would never work on that, instead would do a proper implementation. I could provide an actual clean solution, but if OP is fine with that then whatever, it is his bounty after all.

I'd never hire a troll, no matter how skilled.

People skills come first, then coding prowess comes in second.


In this case it is irrelevant what your opinion is, a crap code remains crap even after you label other guys in the forum.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 01:33:21 PM
In this case it is irrelevant what your opinion is, a crap code remains crap even after you label other guys in the forum.

Thank you for reminding me to always check the 'self moderate' option.

I'm genuinely appreciative of that.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 29, 2013, 01:39:46 PM
In this case it is irrelevant what your opinion is, a crap code remains crap even after you label other guys in the forum.

Thank you for reminding me to always check the 'self moderate' option.

I'm genuinely appreciative of that.


You can also ignore me, but you can't ignore the validity of the earlier statements. If you want some proper working clean code:

Code:
view: function () {

                    if (!String.prototype.trim) {
                        String.prototype.trim = function() {
                            return this.replace(/^\s+|\s+$/g, '');
                        };
                    }
                    var plist = [];
                    for (var i = 1; i <= 48; i++) {
                        var pi = document.getElementById("passphrasechar_" + i);
                        var val = pi.value.toString().trim();
                        if (val) {
                            plist.push(val);
                        }
                    }
                    var target = document.getElementById("targetaddress").value.toString().trim();

                    function LazyProduct(sets) {
                        var total = 1;
                        var dm = [], len;
                        for (i = sets.length; i--; ) {
                            len = sets[i].length;
                            dm[i] = [total, len];
                            total *= len;
                        }
                        this.length = total;

                        this.item = function(n) {
                            var c = [];
                            for (var i = sets.length; i--; ) {
                                c[i] = sets[i][Math.floor(n / dm[i][0]) % dm[i][1]];
                            }
                            return c.join('');
                        };
                    };

                    var bytes;
                    var btcKey;
                    var bitcoinAddress;

                    var lz = new LazyProduct(plist);
                    var timeout_check = 100;
                    var check_i = 0;
                    function check() {
                        var checkphrase = lz.item(check_i);
                        check_i++;

                        bytes = Crypto.SHA256(checkphrase, { asBytes: true });
                        btcKey = new Bitcoin.ECKey(bytes);
                        bitcoinAddress = btcKey.getBitcoinAddress();
                      
                        document.getElementById("bulktextarea2").value = "(" + checkphrase + ") Combinations tried: " + check_i + " out of " + lz.length;
                      
                        if (bitcoinAddress == target) {
                            var privWif = btcKey.getBitcoinWalletImportFormat();
                            document.getElementById("brainbtcaddress").innerHTML = bitcoinAddress;
                            document.getElementById("brainbtcprivwif").innerHTML = privWif;
                            ninja.qrCode.showQrCode({
                                "brainqrcodepublic": bitcoinAddress,
                                "brainqrcodeprivate": privWif
                            });
                            document.getElementById("brainkeyarea").style.visibility = "visible";
                        } else {
                            /* Continue searching. */
                            if (check_i >= lz.length) {
                                document.getElementById("bulktextarea2").value = "Not found";
                            } else {
                                setTimeout(check, timeout_check);
                            }
                        }
                    };
                    setTimeout(check, timeout_check);
}, /* view */

HTML part remains the same.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: CIYAM on November 29, 2013, 02:05:01 PM
You can also ignore me, but you can't ignore the validity of the earlier statements. If you want some proper working clean code:

Hmm... I think if you posted the code first rather than the insults you might have had a better chance.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 29, 2013, 02:10:58 PM
You can also ignore me, but you can't ignore the validity of the earlier statements. If you want some proper working clean code:

Hmm... I think if you posted the code first rather than the insults you might have had a better chance.


I'm sorry but I don't think saying "There should be some trivial criteria for code quality here" is an insult, but I certainly was insulted after that. The code is there, anyone is free to use it or ignore it based on unfounded name calling.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: CIYAM on November 29, 2013, 02:15:28 PM
I'm sorry but I don't think saying "There should be some trivial criteria for code quality here" is an insult, but I certainly was insulted after that. The code is there, anyone is free to use it or ignore it based on unfounded name calling.

Did you not read his OP and the immediate follow up to my post?

He stated his code was badly written - so your rubbish about "code quality" is completely OT as he had already admitted the code needed re-writing.

You were "insulted" probably because either you didn't pay any attention to the OP and the following 2 posts or your ego (will let you choose which).


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 29, 2013, 02:23:26 PM
I'm sorry but I don't think saying "There should be some trivial criteria for code quality here" is an insult, but I certainly was insulted after that. The code is there, anyone is free to use it or ignore it based on unfounded name calling.

Did you not read his OP and the immediate follow up to my post?

He stated his code was badly written - so your rubbish about "code quality" is completely OT as he had already admitted the code needed re-writing.


I actually did read it, and saw he said he was embarrassed about it.

That is no reason for someone to go and build upon that.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: CIYAM on November 29, 2013, 02:26:00 PM
That is no reason for someone to go and build upon that.

Exactly why he asked for it to be "re-written" (not "built upon" as all the other replies already said).

It is probably just an age thing but if you want to get a reward I would recommend more code and less negative comments (you should note that you are not being criticized about your code).


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 29, 2013, 02:31:01 PM
That is no reason for someone to go and build upon that.

Exactly why he asked for it to be "re-written" (not "built upon" as all the other replies already said).

It is probably just an age thing but if you want to get a reward I would recommend more code and less negative comments (you should note that you are not being criticized about your code).


I'm not sure to which one of us you are referring about the age, but you might check that the current (non-working-)solution at the time of my post was (and still is) using the code I quoted. I never mentioned the OP there.

Since some posts ago I'm not counting on the reward here, just tried to make a point about the code quality.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: CIYAM on November 29, 2013, 02:34:56 PM
Since some posts ago I'm not counting on the reward here, just tried to make a point about the code quality.

And as I already pointed out your comment about the "code quality" was completely unnecessary as the OP had already admitted his code was bad and needed re-doing.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 29, 2013, 02:46:10 PM
Since some posts ago I'm not counting on the reward here, just tried to make a point about the code quality.

And as I already pointed out your comment about the "code quality" was completely unnecessary as the OP had already admitted his code was bad and needed re-doing.


This is taking so long to settle, maybe we should do it somewhere else. The code quality I'm referring, if it is not clear from the collection of earlier replies, is about the non-working-code that blindly followed the OP code.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: CIYAM on November 29, 2013, 02:51:19 PM
No-one posted code that included the OP code so your "blindly following" comment makes little sense.

If you are keen to contribute then how about just focus on the solution?


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 29, 2013, 02:57:06 PM
No-one posted code that included the OP code so your "blindly following" comment makes little sense.

If you are keen to contribute then how about just focus on the solution?

Yes, someone did... see http://pastebin.com/mgGitqLr from https://bitcointalk.org/index.php?topic=351547.msg3764612#msg3764612. My initial quote was taken directly from it.

I already contributed proper working code at https://bitcointalk.org/index.php?topic=351547.msg3766027#msg3766027


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: CIYAM on November 29, 2013, 03:02:43 PM
I already contributed proper working code at https://bitcointalk.org/index.php?topic=351547.msg3766027#msg3766027

Well - best of luck with that.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 29, 2013, 03:29:43 PM
I already contributed proper working code at https://bitcointalk.org/index.php?topic=351547.msg3766027#msg3766027

Well - best of luck with that.


I'm just going to wait for tubbyjr to take a nap and get back to me. His copy is 90% of the way there.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: schalk on November 30, 2013, 02:44:41 AM
Hi Cyberdyne

I have made it so that it shows the progress - http://privatepaste.com/683603b43b

The core of this code is:

Code:
// we want to find the passcode for this bitcoin address
var target = document.getElementById("targetaddress").value.toString().replace(/^\s+|\s+$/g, "");
//var target = "1Eq8Ucu2ugn4owQZ8RUybrA3Cm2Bo7Zzac";

// passphrase search data
var inputElements = document.getElementsByTagName("input");
var searchData = [];
for(var i = 0; i < inputElements.length; i++) {
if (inputElements[i].getAttribute("data-role") == "passPhraseChar") {
var value = inputElements[i].value.toString().replace(/^\s+|\s+$/g, "");
if (value != "") {
searchData.push(value);
}
}
}
//var searchData = ["a", "pP", "pP", "l", "e"];

// we will use a pubKeyHash for comparing when generating an address (this saves the step of base58 encoding when generating an address)
// decode address to base58 and extract just the pubKeyHash (so remove the first number and checksum at the end of the address)
var targetPubKeyHash = Bitcoin.Base58.decode(target);
targetPubKeyHash = targetPubKeyHash.splice(1, targetPubKeyHash.length - 5);

// calculate total combinations
var totalCombinations = 0;
var totalIterations = 0;
var divisors = new Array();
divisors[0] = 1;
for(var i = 0; i < searchData.length; i++) {
if (i === 0) {
totalCombinations = searchData[i].length;
totalIterations = totalCombinations;
} else {
totalCombinations = totalCombinations  * searchData[i].length;
totalIterations += totalCombinations;
}
divisors[i + 1] = totalCombinations;
}


var amountOfTimesToUpdate = 1000;
var updateIncrements = totalCombinations / amountOfTimesToUpdate;
var nextUpdate = updateIncrements;

var i = 0;
(function asyncBitcoinAddressCheck() {

    var checkphrase = "";
for(var n = 0; n < searchData.length; n++) {
var index = Math.floor(i / divisors[n]) % searchData[n].length;
checkphrase += searchData[n][index];
}

var bytes = Crypto.SHA256(checkphrase, { asBytes: true });
var btcKey = new Bitcoin.ECKey(bytes);
var pubKeyHash = btcKey.getPubKeyHash();
var found = true;
for(var j = 0; j < pubKeyHash.length; j++) {
if (pubKeyHash[j] != targetPubKeyHash[j]) {
found = false;
}
}

if (found) {
var privWif = btcKey.getBitcoinWalletImportFormat();
var bitcoinAddress = btcKey.getBitcoinAddress();
        document.getElementById("brainbtcaddress").innerHTML = bitcoinAddress;
        document.getElementById("brainbtcprivwif").innerHTML = privWif;
        ninja.qrCode.showQrCode({
                        "brainqrcodepublic": bitcoinAddress,
                        "brainqrcodeprivate": privWif
                    });
        document.getElementById("brainkeyarea").style.visibility = "visible";
alert("Password is " + checkphrase);
return;
}

    if (i < totalCombinations) {
i++;
if (i > nextUpdate) {
nextUpdate += updateIncrements;
document.getElementById("bulktextarea2").value = "Checking combination " + (i + 1) + " out of " + totalCombinations + " (" + (Math.round( i / totalCombinations * 1000 ) / 10) + "%)";
setTimeout(asyncBitcoinAddressCheck, 0);
} else {
asyncBitcoinAddressCheck();
}
    }
})();

document.getElementById("bulktextarea2").value = "Checking combination " + totalCombinations + " out of " + totalCombinations + " (100%)";

Regards
Schalk


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: schalk on November 30, 2013, 02:56:41 AM
http://pastebin.com/NWc2rWWr

Hi Tubby,

Your progress alert is working how I'd expect, however your code doesn't seem to be actually checking each address against the target. Once the target address is found, it should stop processing and show what phrase generated that address.

I tried your code with the following phrase:

abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv

The real bitaddress.org says the address for that is 1KVGuANp3HyH4m6xQYhUV9EWhq6tUVypAG

So, in your html, I input:

a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
abcdefghijklmnopqrstuvwxyz
1KVGuANp3HyH4m6xQYhUV9EWhq6tUVypAG

There are 26 combinations in the above, but your code tries all 26 of them with no 'success', whereas it should have found success on the 23rd 22nd attempt.

My originally supplied code in the OP does properly check the target address and stop processing at that point, so this is functionality that you have broken or removed in your version. If you can put that functionality back in, the bounty would be yours.

Thanks very much.


Isn't this the unexpected result?

Shouldn't it just check:
abcdefghijklmnopqrstua
abcdefghijklmnopqrstub
abcdefghijklmnopqrstuc
,,,
abcdefghijklmnopqrstuz

so it will never check abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv?


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 30, 2013, 02:58:28 AM
Hi Cyberdyne

I have made it so that it shows the progress - http://privatepaste.com/683603b43b

The core of this code is:

Code:
// we want to find the passcode for this bitcoin address
var target = document.getElementById("targetaddress").value.toString().replace(/^\s+|\s+$/g, "");
//var target = "1Eq8Ucu2ugn4owQZ8RUybrA3Cm2Bo7Zzac";

// passphrase search data
var inputElements = document.getElementsByTagName("input");
var searchData = [];
for(var i = 0; i < inputElements.length; i++) {
if (inputElements[i].getAttribute("data-role") == "passPhraseChar") {
var value = inputElements[i].value.toString().replace(/^\s+|\s+$/g, "");
if (value != "") {
searchData.push(value);
}
}
}
//var searchData = ["a", "pP", "pP", "l", "e"];

// we will use a pubKeyHash for comparing when generating an address (this saves the step of base58 encoding when generating an address)
// decode address to base58 and extract just the pubKeyHash (so remove the first number and checksum at the end of the address)
var targetPubKeyHash = Bitcoin.Base58.decode(target);
targetPubKeyHash = targetPubKeyHash.splice(1, targetPubKeyHash.length - 5);

// calculate total combinations
var totalCombinations = 0;
var totalIterations = 0;
var divisors = new Array();
divisors[0] = 1;
for(var i = 0; i < searchData.length; i++) {
if (i === 0) {
totalCombinations = searchData[i].length;
totalIterations = totalCombinations;
} else {
totalCombinations = totalCombinations  * searchData[i].length;
totalIterations += totalCombinations;
}
divisors[i + 1] = totalCombinations;
}


var amountOfTimesToUpdate = 1000;
var updateIncrements = totalCombinations / amountOfTimesToUpdate;
var nextUpdate = updateIncrements;

var i = 0;
(function asyncBitcoinAddressCheck() {

    var checkphrase = "";
for(var n = 0; n < searchData.length; n++) {
var index = Math.floor(i / divisors[n]) % searchData[n].length;
checkphrase += searchData[n][index];
}

var bytes = Crypto.SHA256(checkphrase, { asBytes: true });
var btcKey = new Bitcoin.ECKey(bytes);
var pubKeyHash = btcKey.getPubKeyHash();
var found = true;
for(var j = 0; j < pubKeyHash.length; j++) {
if (pubKeyHash[j] != targetPubKeyHash[j]) {
found = false;
}
}

if (found) {
var privWif = btcKey.getBitcoinWalletImportFormat();
var bitcoinAddress = btcKey.getBitcoinAddress();
        document.getElementById("brainbtcaddress").innerHTML = bitcoinAddress;
        document.getElementById("brainbtcprivwif").innerHTML = privWif;
        ninja.qrCode.showQrCode({
                        "brainqrcodepublic": bitcoinAddress,
                        "brainqrcodeprivate": privWif
                    });
        document.getElementById("brainkeyarea").style.visibility = "visible";
alert("Password is " + checkphrase);
return;
}

    if (i < totalCombinations) {
i++;
if (i > nextUpdate) {
nextUpdate += updateIncrements;
document.getElementById("bulktextarea2").value = "Checking combination " + (i + 1) + " out of " + totalCombinations + " (" + (Math.round( i / totalCombinations * 1000 ) / 10) + "%)";
setTimeout(asyncBitcoinAddressCheck, 0);
} else {
asyncBitcoinAddressCheck();
}
    }
})();

document.getElementById("bulktextarea2").value = "Checking combination " + totalCombinations + " out of " + totalCombinations + " (100%)";

Regards
Schalk

Hi Schalk, this worked properly when I fed it something with 2^11 (2048) combos, but hung the browser when i tried 2^23 (8m).

It just sits there not responding after clicking [view], and then finally I get a popup telling me it's not responding and would I like to kill it.

On the other hand tubby's handles massive numbers, but doesn't yet spit out the successful phrase.

Seems like with yours and his powers combined we're so close to having something here.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 30, 2013, 03:00:48 AM
http://pastebin.com/NWc2rWWr

Hi Tubby,

Your progress alert is working how I'd expect, however your code doesn't seem to be actually checking each address against the target. Once the target address is found, it should stop processing and show what phrase generated that address.

I tried your code with the following phrase:

abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv

The real bitaddress.org says the address for that is 1KVGuANp3HyH4m6xQYhUV9EWhq6tUVypAG

So, in your html, I input:

a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
abcdefghijklmnopqrstuvwxyz
1KVGuANp3HyH4m6xQYhUV9EWhq6tUVypAG

There are 26 combinations in the above, but your code tries all 26 of them with no 'success', whereas it should have found success on the 23rd 22nd attempt.

My originally supplied code in the OP does properly check the target address and stop processing at that point, so this is functionality that you have broken or removed in your version. If you can put that functionality back in, the bounty would be yours.

Thanks very much.


Isn't this the unexpected result?

Shouldn't it just check:
abcdefghijklmnopqrstua
abcdefghijklmnopqrstub
abcdefghijklmnopqrstuc
,,,
abcdefghijklmnopqrstuz

so it will never check abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv?

No, the pass is always 48 chars long (That's what the 48 input boxes are for).

It'll check:

abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstua
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstub
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuc

...

It should stop processing when it reaches the correct one (22nd attempt):

abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv  -> This creates the bitcoin address 1KVGuANp3HyH4m6xQYhUV9EWhq6tUVypAG

even though there are 4 more combos...

abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuw
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstux
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuy
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuz


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 30, 2013, 03:04:01 AM

this worked properly when I fed it something with 2^11 (2048) combos, but hung the browser when i tried 2^23 (8m).

It just sits there not responding after clicking [view], and then finally I get a popup telling me it's not responding and would I like to kill it.


I know you hate me and all for whatever reason, but if you tried running the earlier code I gave you will notice it can handle 2^23 and other inputs without killing the browser. Obviously it will take a long time because generating addresses in javascript is slow.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 30, 2013, 03:05:39 AM

this worked properly when I fed it something with 2^11 (2048) combos, but hung the browser when i tried 2^23 (8m).

It just sits there not responding after clicking [view], and then finally I get a popup telling me it's not responding and would I like to kill it.


I know you hate me and all for whatever reason, but if you tried running the earlier code I gave you will notice it can handle 2^23 and other inputs without killing the browser. Obviously it will take a long time because generating addresses in javascript is slow.

I don't hate people who haven't matured yet. I've been there before, myself.

I will take a look at your code now and give praise where praise is due. Thanks.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 30, 2013, 03:07:14 AM

this worked properly when I fed it something with 2^11 (2048) combos, but hung the browser when i tried 2^23 (8m).

It just sits there not responding after clicking [view], and then finally I get a popup telling me it's not responding and would I like to kill it.


I know you hate me and all for whatever reason, but if you tried running the earlier code I gave you will notice it can handle 2^23 and other inputs without killing the browser. Obviously it will take a long time because generating addresses in javascript is slow.

I don't hate people who haven't matured yet. I've been there before, myself.

I will take a look at your code now and give praise where praise is due. Thanks.


Thanks for at least taking a look at it.

With your earlier example, it stops at (abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv) Combinations tried: 22 out of 26 and shows the match, btw.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: schalk on November 30, 2013, 03:12:19 AM
Sorry, this should fix the issue - http://privatepaste.com/42e170b0cb

Please note when I recoded it I made sure to make sure it performs fast. As you'll notice with large combinations (like 10,000,000 mine will perform around 5 times faster than moderate's solution on chrome on my computer).

I tested it and it should take 41.67 hours to solve 8,000,000 combinations (on my computer).


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 30, 2013, 03:32:32 AM

note when I recoded it I made sure to make sure it performs fast. As you'll notice with large combinations (like 10,000,000 mine will perform around 5 times faster than moderate's solution on chrome on my computer).


Is the benchmark available somewhere ? Which line(s) make it faster/slower ?

EDIT: Nevermind, I see you just did a    setTimeout(asyncBitcoinAddressCheck, 0). I guess you didn't see the default timeout at my code is 100 ms ? That's what make it not kill the browser.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 30, 2013, 03:44:50 AM

this worked properly when I fed it something with 2^11 (2048) combos, but hung the browser when i tried 2^23 (8m).

It just sits there not responding after clicking [view], and then finally I get a popup telling me it's not responding and would I like to kill it.


I know you hate me and all for whatever reason, but if you tried running the earlier code I gave you will notice it can handle 2^23 and other inputs without killing the browser. Obviously it will take a long time because generating addresses in javascript is slow.

I don't hate people who haven't matured yet. I've been there before, myself.

I will take a look at your code now and give praise where praise is due. Thanks.


Thanks for at least taking a look at it.

With your earlier example, it stops at (abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv) Combinations tried: 22 out of 26 and shows the match, btw.

Well this does work as described thanks, although I won't be using it as it's 20x slower than tubby's.

Anyway, I've actually done the last little bit of tubby's code myself, so I have everything I need now.

Thanks everyone for your efforts and participation, I'm sending out coins like this:


The code I'll be actually using (with my own tiny mod):

Tubbyjr: 0.4 BTC


Had a good crack at this, but ultimately I won't be using his code:

Schalk: 0.1 BTC


Tips (Let me know your address if you haven't already):

KieranJones1: 0.005 BTC
Ciyam: 0.005 BTC
Moderate: 0.005 BTC - Try not to come off so harsh next time, and your coding will take you far, I'm sure.



Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: schalk on November 30, 2013, 03:49:07 AM
No, that isn't necessary. If we were updating the DOM constantly then yes maybe 0 might make it crash. But mine doesn't update the DOM constantly. I've been running mine for 75685 combinations so far and it's still going smoothly.

For performance I also compare the PubKeyHash instead of the actual bitcoin address (won't make a hell of a lot of difference, but every little bit helps).

EDIT: Alright - thanks for the tip!


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 30, 2013, 03:52:14 AM
I decline my tip, give it to someone else that needs.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 30, 2013, 03:58:30 AM
I decline my tip, give it to someone else that needs.

Sure thing - I'll need it myself if I don't end up cracking this damn password :D


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 30, 2013, 04:00:18 AM
I decline my tip, give it to someone else that needs.

Sure thing - I'll need it myself if I don't end up cracking this damn password :D


If you're serious into it, you shouldn't be doing this in javascript.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 30, 2013, 04:03:25 AM
I decline my tip, give it to someone else that needs.

Sure thing - I'll need it myself if I don't end up cracking this damn password :D


If you're serious into it, you shouldn't be doing this in javascript.

Thanks, I'll get serious if 8m doesn't yield a result.

At that point I'll post a new bounty for some hardcore gpu coding and test a few trillion.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: moderate on November 30, 2013, 04:04:20 AM
I decline my tip, give it to someone else that needs.

Sure thing - I'll need it myself if I don't end up cracking this damn password :D


If you're serious into it, you shouldn't be doing this in javascript.

Thanks, I'll get serious if 8m doesn't yield a result.

At that point I'll post a new bounty for some hardcore gpu coding and test a few billion.


Make sure to say I'm not welcome there, too.


Title: Re: [Bounty - 0.5 BTC ($500)] Javascript / Password Recovery issue
Post by: Cyberdyne on November 30, 2013, 04:07:20 AM
Make sure to say I'm not welcome there, too.

That's entirely up to you and how you decide to enter the discussion.