Cyberdyne (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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.
|
|
|
|
tubbyjr
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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/mgGitqLrPlease send to the following address if you're satisfied: 1KU8RFgfVqaqUNTB8uA7MLzbZJTuEwQCQ3 Not the one in my sig please.
|
|
|
|
tubbyjr
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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 = .... 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 ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) .
|
|
|
|
moderate
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 98
Merit: 10
nearly dead
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 29, 2013, 11:08:50 AM |
|
Is this for real ? 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.
|
|
|
|
tubbyjr
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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.
|
|
|
|
Cyberdyne (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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 = .... 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 ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) . bitcoinAddress should never be equal to checkphrase, i think you mean 'target'. Thanks for your help, I'll try your new copy now.
|
|
|
|
tubbyjr
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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
|
|
|
|
moderate
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 98
Merit: 10
nearly dead
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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.
|
|
|
|
Cyberdyne (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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.
|
|
|
|
Cyberdyne (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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.
|
|
|
|
moderate
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 98
Merit: 10
nearly dead
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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.
|
|
|
|
Cyberdyne (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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.
|
|
|
|
moderate
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 98
Merit: 10
nearly dead
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 29, 2013, 01:39:46 PM Last edit: November 29, 2013, 02:06:04 PM by moderate |
|
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: 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.
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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.
|
|
|
|
moderate
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 98
Merit: 10
nearly dead
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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.
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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).
|
|
|
|
moderate
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 98
Merit: 10
nearly dead
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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.
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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).
|
|
|
|
moderate
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 98
Merit: 10
nearly dead
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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.
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
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.
|
|
|
|
|