Michal2SAB / Bitcoin-Stealer

Generate random bitcoin wallets, private keys (seeds) and then check if they match a wallet that contains some kind of balance, and then take it. Node.js
384 stars 160 forks source link

logs #95

Closed italianbrick closed 1 month ago

italianbrick commented 6 months ago

hello how do I see the logs

SeaWolf1990 commented 3 months ago

hello how do I see the logs

"use strict";

process.title = "Bitcoin Stealer by Michal2SAB";

const CoinKey = require('coinkey'); const fs = require('fs');

let privateKeyHex, ck, addresses; addresses = new Map();

const data = fs.readFileSync('./riches.txt'); data.toString().split("\n").forEach(address => addresses.set(address, true));

function generate() { // generate random private key hex let privateKeyHex = r(64);

// create new bitcoin key pairs
let ck = new CoinKey(Buffer.from(privateKeyHex, 'hex'));

ck.compressed = false;
console.log(ck.publicAddress); // Раскомментируйте эту строку, чтобы выводить адреса в консоль

// if generated wallet matches any from the riches.txt file, tell us we won!
if(addresses.has(ck.publicAddress)){
    console.log("");
    process.stdout.write('\x07');
    console.log("\x1b[32m%s\x1b[0m", ">> Success: " + ck.publicAddress);
    var successString = "Wallet: " + ck.publicAddress + "\n\nSeed: " + ck.privateWif;

    // save the wallet and its private key (seed) to a Success.txt file in the same folder 
    fs.writeFileSync('./Success.txt', successString, (err) => {
        if (err) throw err; 
    })

    // close program after success
    process.exit();
}
// destroy the objects
ck = null;
privateKeyHex = null;

}

// the function to generate random hex string function r(l) { let randomChars = 'ABCDEF0123456789'; let result = ''; for ( var i = 0; i < l; i++ ) { result += randomChars.charAt(Math.floor(Math.random() * randomChars.length)); } return result; }

console.log("\x1b[32m%s\x1b[0m", ">> Program Started and is working silently (edit code if you want logs)"); // don't trip, it works // run forever while(true){ generate(); if (process.memoryUsage().heapUsed / 1000000 > 500) { global.gc(); } //console.log("Heap used : ", process.memoryUsage().heapUsed / 1000000); }

marssystems commented 3 months ago

//console.log(ck.publicAddress) // ^ remove "//" from line above (22) if you wanna see the logs, but remember it slows down the whole process a lot.