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"> My modified 'brainwallet' function: Code: <script type="text/javascript"> 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; 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:
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 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) 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 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) 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 () { 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 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 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 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 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. |