Create a gist now

Instantly share code, notes, and snippets.

@domalak /brute2.js
Last active Feb 21, 2018

What would you like to do?
const util = require('ethereumjs-util')
const Wallet = require('ethereumjs-wallet')
const basePrivateKey = '1cd3b30424316919712c483929787eefa0d724a78274a506530dbb26916b1'
const charsMissing = 64 - basePrivateKey.length
const targetPublicAddress = '0xe8Ca70C909905Ebbbe6a49c34797beF31d895241'
console.log(" \n" +
"searching for address : " + targetPublicAddress + " \n" +
"base private key : " + basePrivateKey + " \n" +
"missing chars : " + charsMissing + " \n" +
"now it's working on finding your key.")
function makeHexString(numb) {
let hex = numb.toString(16);
return hex
}
let tryNumber = 0;
function placeChar(pk, char, prev) {
const start = char ? prev + 1 : 0
for (let position = start; position < basePrivateKey.length - charsMissing + char + 1; position++) {
for(let i = 0; i < 16; i++){
const endPrivateKey = makeHexString(i)
let privateKeyGuess = pk.split('');
privateKeyGuess.splice(position, 0, endPrivateKey);
privateKeyGuess = privateKeyGuess.join('');
if (char + 1 < charsMissing) {
placeChar(privateKeyGuess, char + 1, position)
}
else {
tryNumber++
try {
const wallet = Wallet.fromPrivateKey(new Buffer(privateKeyGuess, "hex"))
const publicAddress = util.bufferToHex(wallet.getAddress())
// console.log(i + ": " + endPrivateKey)
if(publicAddress.toLowerCase() == targetPublicAddress.toLowerCase()){
console.log('\n \n \n \n ********************************** FOUND PRIVATE KEY: ' + privateKeyGuess + " \n matching address " + targetPublicAddress + " \n \n \n \n ");
process.exit();
}
} catch(e) {
null;
}
if (tryNumber % 100000 === 0) {
console.log('tried', tryNumber, 'variations');
}
}
}
}
}
placeChar(basePrivateKey, 0)
console.log('Finished with no results.');
process.exit();

sabaja1 commented Feb 10, 2018

0x02ec2F6632c38F2FA149Cd2390cB8b3fD8086c92
plz sir gave m PrivateKey
my email adress sufainsabaja@gmail.com

wwmani commented Feb 20, 2018

sir please sent me this account 0x90e63c3d53E0Ea496845b7a03ec7548B70014A91
private key i lost my key
m.rehman9929@gmail.com

wwmani commented Feb 21, 2018

sir please sent me this account 0x90e63c3d53E0Ea496845b7a03ec7548B70014A91
private key i lost my key
m.rehman9929@gmail.com

wwmani commented Feb 21, 2018

sir please sent me this account 0x90e63c3d53E0Ea496845b7a03ec7548B70014A91
private key i lost my key
m.rehman9929@gmail.com

wwmani commented Feb 21, 2018

sir please sent me this account 0x90e63c3d53E0Ea496845b7a03ec7548B70014A91
private key i lost my key
m.rehman9929@gmail.com

wwmani commented Feb 21, 2018

sir please sent me this account 0x90e63c3d53E0Ea496845b7a03ec7548B70014A91
private key i lost my key
m.rehman9929@gmail.com

wwmani commented Feb 21, 2018

sir please sent me this account 0x90e63c3d53E0Ea496845b7a03ec7548B70014A91
private key i lost my key
m.rehman9929@gmail.com

wwmani commented Feb 21, 2018

sir please sent me this account 0x90e63c3d53E0Ea496845b7a03ec7548B70014A91
private key i lost my key
m.rehman9929@gmail.com

wwmani commented Feb 21, 2018

sir please sent me this account 0x90e63c3d53E0Ea496845b7a03ec7548B70014A91
private key i lost my key
m.rehman9929@gmail.com please sir

wwmani commented Feb 21, 2018

sir please sent me this account 0x90e63c3d53E0Ea496845b7a03ec7548B70014A91
private key i lost my key
m.rehman9929@gmail.com please sir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment