What can we help you with?
Credit goes to Bahk (https://github.com/domalak).
"Raw"
on https://gist.github.com/tayvano/7755e3e8d8b64581d5ff2865087b93f8"Save As"
"Save"
var basePrivateKey = 'afdfd9c3d2095ef696594f6cedcae59e72dcd697e2a7521b15781404'
var targetPublicAddress = '0x06A85356DCb5b307096726FB86A78c59D38e08ee';
cd
into the command line, then hit the spacebar, and then drag and drop the FOLDER that contains the .js file into command line windowenter
.npm install ethereumjs-wallet ethereumjs-util
node brute_force_end_of_private_key.js
You should see the following:
$ node /path/to/brute_force_8_char.js
searching for address : 0x06A85356DCb5b307096726FB86A78c59D38e08ee
base private key : afdfd9c3d2095ef696594f6cedcae59e72dcd697e2a7521b15781404
missing chars : 8
it will be quiet now. if you don't see anything below me, it's working on finding your key.
If you see something below that doesn't say 'FOUND KEY!', you have an error
When it's done it will show:
********************************** FOUND PRIVATE KEY: afdfd9c3d2095ef696594f6cedcae59e72dcd697e2a7521b1578140422a4f890
matching address 0x06A85356DCb5b307096726FB86A78c59D38e08ee
The code for this is here: https://gist.github.com/tayvano/7755e3e8d8b64581d5ff2865087b93f8 or below:
const util = require('ethereumjs-util');
const Wallet = require('ethereumjs-wallet');
var possible = 'abcdef1234567890';
var basePrivateKey = '1cd3b30424316919712c48359829787eefa0d724a78274a506530dbb72';
var charsMissing = 64 - basePrivateKey.length;
var targetPublicAddress = ' 0xe8Ca70C909905Ebbbe6a49c34797beF31d895241';
var missingPart = '';
for (var i = 0; i < charsMissing; i++) {
missingPart = missingPart.concat('f');
}
var maxVal = parseInt(missingPart, 16);
console.log(
' \n ' +
'searching for address : ' +
targetPublicAddress +
' \n ' +
'base private key : ' +
basePrivateKey +
' \n ' +
'missing chars : ' +
charsMissing +
' \n ' +
"it will be quiet now. if you don't see anything below me, it's working on finding your key." +
' \n ' +
"If you see something below that doesn't say 'FOUND KEY!', you have an error" +
' \n '
);
function makeHexString(numb) {
var hex = numb.toString(16);
for (var i = 0; i < charsMissing - hex.length; i++) hex = '0' + hex;
return hex;
}
for (var i = 0; i <= maxVal; i++) {
try {
var endPrivateKey = makeHexString(i);
var privateKeyGuess = basePrivateKey + endPrivateKey;
var wallet = Wallet.fromPrivateKey(new Buffer(privateKeyGuess, 'hex'));
var 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 (i % 100000 === 0) {
console.log('checked', i, 'keys');
}
}
Didn't find what you were looking for? Contact Us
MyCrypto is an open-source tool that allows you to manage your Ethereum accounts privately and securely. Developed by and for the community since 2015, we’re focused on building awesome products that put the power in people’s hands.
Donate
Subscribe to MyCrypto
Get updates from MyCrypto straight to your inbox!
By submitting your email, you affirmatively agree to our Privacy Policy