Skip to content

Instantly share code, notes, and snippets.

@reppolice
Forked from lenilsonjr/bounty.js
Created December 16, 2017 23:55
Show Gist options
  • Save reppolice/8f2c163e1f4e53d3a4537e3f9899bb65 to your computer and use it in GitHub Desktop.
Save reppolice/8f2c163e1f4e53d3a4537e3f9899bb65 to your computer and use it in GitHub Desktop.
Keybase WarpWallet Bounty Challenge
function randomString(length, chars) {
var result = '';
for (var i = length; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)];
return result;
}
function searchWallet() {
warpwallet.run({
passphrase: randomString(8,'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'),
salt: 'a@b.c',
progress_hook: (function(_this) {
return function(o) {
return false;
};
})(this),
params: window.params
}, (function(_this) {
return function(res) {
console.log(res["public"]);
console.log(res["private"]);
if ( res["public"] == '1MkupVKiCik9iyfnLrJoZLx9RH4rkF3hnA' ) {
console.log('You found it! =D');
} else {
console.log('Out of luck...')
searchWallet();
}
};
})(this));
}
searchWallet();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment