Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gen12(words) function #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Alexcs24
Copy link

@Alexcs24 Alexcs24 commented Dec 4, 2023

/**

  • This function generates a 12-word mnemonic phrase from a given list of words.
  • It is designed to be efficient and quick in selecting words for the phrase. *
  • How it works:
    • It randomly selects 12 words from the provided list without repeating any word.
    • The selection is done by generating random indices for the array of words,
  • ensuring that each word in the phrase is unique and randomly chosen.
  • Why it's good:
    • Efficiency: Unlike methods that require shuffling the entire list of words
  • each time a new word is needed, this function simply picks a random word
  • from the list, which is computationally less expensive.
    • Simplicity: The logic is straightforward and easy to understand, making
  • the function maintainable and modifiable.
    • Flexibility: It can easily be adapted to generate phrases of different lengths
  • or from different word lists by adjusting the parameters.
    */

/**
 * This function generates a 12-word mnemonic phrase from a given list of words.
 * It is designed to be efficient and quick in selecting words for the phrase.
 *
 * How it works:
 * - It randomly selects 12 words from the provided list without repeating any word.
 * - The selection is done by generating random indices for the array of words,
 *   ensuring that each word in the phrase is unique and randomly chosen.
 * 
 * Why it's good:
 * - Efficiency: Unlike methods that require shuffling the entire list of words 
 *   each time a new word is needed, this function simply picks a random word 
 *   from the list, which is computationally less expensive.
 * - Simplicity: The logic is straightforward and easy to understand, making 
 *   the function maintainable and modifiable.
 * - Flexibility: It can easily be adapted to generate phrases of different lengths 
 *   or from different word lists by adjusting the parameters.
 */
@vqxr
Copy link

vqxr commented Dec 5, 2023

idk but for bothe of ur one and other one when i run
node check-balances.js
its gives me this error and i have a perfectly fine internet connection

var error = new Error(message);
^

Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.6.8)
at Logger.makeError (C:\Users\wazma\Downloads\eth-fast-mnemonic-checker-patch-1\eth-fast-mnemonic-checker-patch-1\node_modules@ethersproject\logger\lib\index.js:233:21)
at Logger.throwError (C:\Users\wazma\Downloads\eth-fast-mnemonic-checker-patch-1\eth-fast-mnemonic-checker-patch-1\node_modules@ethersproject\logger\lib\index.js:242:20)
at WebSocketProvider. (C:\Users\wazma\Downloads\eth-fast-mnemonic-checker-patch-1\eth-fast-mnemonic-checker-patch-1\node_modules@ethersproject\providers\lib\json-rpc-provider.js:561:54)
at step (C:\Users\wazma\Downloads\eth-fast-mnemonic-checker-patch-1\eth-fast-mnemonic-checker-patch-1\node_modules@ethersproject\providers\lib\json-rpc-provider.js:48:23)
at Object.throw (C:\Users\wazma\Downloads\eth-fast-mnemonic-checker-patch-1\eth-fast-mnemonic-checker-patch-1\node_modules@ethersproject\providers\lib\json-rpc-provider.js:29:53)
at rejected (C:\Users\wazma\Downloads\eth-fast-mnemonic-checker-patch-1\eth-fast-mnemonic-checker-patch-1\node_modules@ethersproject\providers\lib\json-rpc-provider.js:21:65)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
reason: 'could not detect network',
code: 'NETWORK_ERROR',
event: 'noNetwork'
}

Node.js v20.10.0

@kfedorek
Copy link

kfedorek commented Dec 6, 2023

I have the same issue? Do we have to edit the network? How can we check the balances file? Getting same error as above! Thanks

@vqxr
Copy link

vqxr commented Dec 6, 2023

I have the same issue? Do we have to edit the network? How can we check the balances file? Getting same error as above! Thanks

i think its a problem with a afile ethers or something idk i think the guy needs to update it or sumin

@Alexcs24
Copy link
Author

Alexcs24 commented Dec 6, 2023

You described a problem in the file check-balances.js; it is not related to the current workflow of the file index.js

@Alexcs24
Copy link
Author

Alexcs24 commented Dec 6, 2023

image

Regarding the check-balances.js file, I found its operation to be very slow compared to the generation of private keys, so I completely rewrote it. Now it works for me as shown in the picture above. First, it takes the already generated hits.txt file, then it looks at how many providers I have provided. Based on the number of providers, the text document hits.txt is divided into parts, and each provider is allocated its part. The checking process runs in parallel, and the result of successful execution is recorded in a separate file. Now I am working on the automatic reconnection of each provider in case of a stoppage, but so far everything is working like clockwork at the speed I need.

@kfedorek
Copy link

kfedorek commented Dec 7, 2023

Can you provide the updated check-balances file? Thanks

@Alexcs24
Copy link
Author

Alexcs24 commented Dec 7, 2023

Can you provide the updated check-balances file? Thanks

Maybe later, I'm not ready to show it yet, but I gave you an idea of where to go. I continue to improve and optimize this code and also apply various algorithms, so I don't have a release version for public use yet, only for personal use.

When I finish it and am satisfied, I'll think about a release version for GitHub.

But don't worry, I described the work process to you in the previous message, so now you know which direction to move in, and I also provided a visualization so you can understand the principle of how it works.

You can also write to me in private messages, perhaps we can agree on transferring the current non-release version to you, if you understand what I mean.

@vqxr
Copy link

vqxr commented Dec 7, 2023

yo whats ur telegram alex so i can message u

@tanishkjaggi
Copy link

Would love to get the check _balances file. Is it possible for you to release it? Thanks

@servetxx1
Copy link

servetxx1 commented Dec 23, 2023

Has anyone ever found a wallet with some balances inside? I scanned over 20 million and couldn't find anything.I think he will give up. If anyone finds something, can you please write to me, there is hope to call again.

@WGL95
Copy link

WGL95 commented Jan 10, 2024

Hello i have a question, Is there any way you can modify "check-balances.js" file to only track One ETH Wallet, Because I have a long lost wallet i want to recover "I do have poof of ownership", I did ask Two Different Companies to help me recover my long lost data from 2016. but they said we need the wallet "aes.json" Or "json" file, Or the Unique URL link from "ethereumwallet.com/#xxxxxxxxxxxxxxxxxxxxxxxx" address.. Is there anyway to reverse engineering the "check-balances.js" and i hope it can be modify to work on One Wallet and work with Python coding.?

@WGL95
Copy link

WGL95 commented Jan 10, 2024

You can look up the "ethereumwallet.com" with the Wayback Machine "web.archive.org" and see what i'm talking about.

@Alexcs24
Copy link
Author

You can modify the check-balances.js script for any needs, but the question is how long you are willing to wait and what computing resources you have for this.

Also, I advise those who use this code to combine the wallet generation and checking processes and not to record empty wallets in files. There's simply no need to do this operation - why record empty wallets? Record only those that are not empty.

@WGL95
Copy link

WGL95 commented Jan 16, 2024

You can modify the check-balances.js script for any needs, but the question is how long you are willing to wait and what computing resources you have for this.

Also, I advise those who use this code to combine the wallet generation and checking processes and not to record empty wallets in files. There's simply no need to do this operation - why record empty wallets? Record only those that are not empty.

Well i haven't been able to install the software yet because it requires Java Node, But I did try to convert it with Python coding. at "https://www.codeconvert.ai/" and see if it will work, because it couldn't run Java Node for some reason.. and i did install all the Java files that are required for my Linux, and even if i did get an error message and try fixing it anyways it still would not run the Java Node.

@WGL95
Copy link

WGL95 commented Jan 16, 2024

You can modify the check-balances.js script for any needs, but the question is how long you are willing to wait and what computing resources you have for this.

Also, I advise those who use this code to combine the wallet generation and checking processes and not to record empty wallets in files. There's simply no need to do this operation - why record empty wallets? Record only those that are not empty.

And my wallet is not empty. I have 1.82+ ETH Locked Up.. I'm trying to see if i can unlock the wallet using the mnemonic pass code to see what it is. so i can import to my new wallet.

@Alexcs24
Copy link
Author

You can modify the check-balances.js script for any needs, but the question is how long you are willing to wait and what computing resources you have for this.
Also, I advise those who use this code to combine the wallet generation and checking processes and not to record empty wallets in files. There's simply no need to do this operation - why record empty wallets? Record only those that are not empty.

Well i haven't been able to install the software yet because it requires Java Node, But I did try to convert it with Python coding. at "https://www.codeconvert.ai/" and see if it will work, because it couldn't run Java Node for some reason.. and i did install all the Java files that are required for my Linux, and even if i did get an error message and try fixing it anyways it still would not run the Java Node.

The advantage of using Node.js in this approach is the ability to utilize clusters, multithreading, and asynchronous processes. In this regard, Python is inferior, and there is no sense in translating this code into Python.

@Alexcs24
Copy link
Author

You can modify the check-balances.js script for any needs, but the question is how long you are willing to wait and what computing resources you have for this.
Also, I advise those who use this code to combine the wallet generation and checking processes and not to record empty wallets in files. There's simply no need to do this operation - why record empty wallets? Record only those that are not empty.

Well i haven't been able to install the software yet because it requires Java Node, But I did try to convert it with Python coding. at "https://www.codeconvert.ai/" and see if it will work, because it couldn't run Java Node for some reason.. and i did install all the Java files that are required for my Linux, and even if i did get an error message and try fixing it anyways it still would not run the Java Node.

The advantage of using Node.js in this approach is the ability to utilize clusters, multithreading, and asynchronous processes. In this regard, Python is inferior, and there is no sense in translating this code into Python.

To open your old wallet if you don't know the words at all, you need to randomly generate wallets based on the number of mnemonic words you had. After generation, compare the result of the wallet with your wallet, which is lost in access. This should be done by dividing the task into Workers using CPU threads in parallel and asynchronously. In the case of a match between the randomly generated address and your address, automatically record the obtained Seed phrase in a text file.

At the same time, you don't even need the internet, because the wallet generation works on your computer.

@cybercrow098
Copy link

cybercrow098 commented Jan 19, 2024

// Contact me Telegram [@cybercrow_leaks](url)
// Working code for check-balances.js

Added some optimizations to the code to generate private key bit faster
Added the support to use multiple api keys to check balances beyond limits

enjoy the working code as of now


const fs = require('fs');
const ethers = require('ethers');
require('colors');

const provider = new ethers.providers.WebSocketProvider(
    'wss://eth-mainnet.g.alchemy.com/v2/8TiPtg8o9RnKMnvzxPWj10kwRjCHi7F3'
);

async function checkBalances() {
    try {
        const addresses = fs
            .readFileSync('hits.txt', 'utf8')
            .split('\n')
            .map((val) => val.split(','));

        for (let i = 0; i < addresses.length; i++) {
            const [address, privateKey] = addresses[i];
            try {
                const balance = await provider.getBalance(address);

                if (balance.gt(0)) {
                    console.log(address.bgGreen.black, balance.toString().bgGreen.black);
                    console.log('Private Key: '.yellow, privateKey);
                } else {
                    console.log(address, 0);
                }
            } catch (error) {
                console.error(`Error fetching balance for address ${address}:`, error.message);
            }
        }
    } catch (fileError) {
        console.error('Error reading the addresses file:', fileError.message);
    } finally {
        // Disconnect from the provider
        if (provider.connection) {
            try {
                provider.connection.close();
            } catch (error) {
                console.error('Error closing the WebSocket connection:', error.message);
            }
        }
    }
}

// Handle unhandled promise rejections
process.on('unhandledRejection', (error) => {
    console.error('Unhandled Promise Rejection:', error.message);
    process.exit(1);
});

checkBalances();

@cybercrow098
Copy link

This is modified code to save the eth/Priv keys with balances to a seperate .json file balances_with_private_keys.json

`const fs = require('fs');
const ethers = require('ethers');
require('colors');

const provider = new ethers.providers.WebSocketProvider(
'wss://eth-mainnet.g.alchemy.com/v2/8TiPtg8o9RnKMnvzxPWj10kwRjCHi7F3'
);

async function checkBalances() {
const results = [];

try {
    const addresses = fs
        .readFileSync('hits.txt', 'utf8')
        .split('\n')
        .map((val) => val.split(','));

    for (let i = 0; i < addresses.length; i++) {
        const [address, privateKey] = addresses[i];
        try {
            const balance = await provider.getBalance(address);

            if (balance.gt(0)) {
                const result = {
                    address,
                    balance: balance.toString(),
                    privateKey,
                };
                results.push(result);

                console.log(address.bgGreen.black, balance.toString().bgGreen.black);
                console.log('Private Key: '.yellow, privateKey);
            } else {
                console.log(address, 0);
            }
        } catch (error) {
            console.error(`Error fetching balance for address ${address}:`, error.message);
        }
    }
} catch (fileError) {
    console.error('Error reading the addresses file:', fileError.message);
} finally {
    // Disconnect from the provider
    if (provider.connection) {
        try {
            provider.connection.close();
        } catch (error) {
            console.error('Error closing the WebSocket connection:', error.message);
        }
    }

    // Save results to a file
    fs.writeFileSync('balances_with_private_keys.json', JSON.stringify(results, null, 2));
}

}

// Handle unhandled promise rejections
process.on('unhandledRejection', (error) => {
console.error('Unhandled Promise Rejection:', error.message);
process.exit(1);
});

checkBalances();
`

@cybiz-tva
Copy link

Hi guys, I don't know if there is anything shady here or smart but when I ran this script on my Mac it asked me to provide access to things like my files, photos, contacts, and even calendar.

Feels like some exploit is added in the code that gains access to your local files and data.

I am not capable of understanding the entire technicality of the code, if someone did please provide some clarity on the same.

or maybe i am overestimating this script LOL

@ApfelBirneKreis
Copy link

This is modified code to save the eth/Priv keys with balances to a seperate .json file balances_with_private_keys.json

`const fs = require('fs'); const ethers = require('ethers'); require('colors');

const provider = new ethers.providers.WebSocketProvider( 'wss://eth-mainnet.g.alchemy.com/v2/8TiPtg8o9RnKMnvzxPWj10kwRjCHi7F3' );

async function checkBalances() { const results = [];

try {
    const addresses = fs
        .readFileSync('hits.txt', 'utf8')
        .split('\n')
        .map((val) => val.split(','));

    for (let i = 0; i < addresses.length; i++) {
        const [address, privateKey] = addresses[i];
        try {
            const balance = await provider.getBalance(address);

            if (balance.gt(0)) {
                const result = {
                    address,
                    balance: balance.toString(),
                    privateKey,
                };
                results.push(result);

                console.log(address.bgGreen.black, balance.toString().bgGreen.black);
                console.log('Private Key: '.yellow, privateKey);
            } else {
                console.log(address, 0);
            }
        } catch (error) {
            console.error(`Error fetching balance for address ${address}:`, error.message);
        }
    }
} catch (fileError) {
    console.error('Error reading the addresses file:', fileError.message);
} finally {
    // Disconnect from the provider
    if (provider.connection) {
        try {
            provider.connection.close();
        } catch (error) {
            console.error('Error closing the WebSocket connection:', error.message);
        }
    }

    // Save results to a file
    fs.writeFileSync('balances_with_private_keys.json', JSON.stringify(results, null, 2));
}

}

// Handle unhandled promise rejections process.on('unhandledRejection', (error) => { console.error('Unhandled Promise Rejection:', error.message); process.exit(1); });

checkBalances(); `

how do i add more provider?

doCheck()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3

@Alexcs24
Copy link
Author

@krishnaoff87
Copy link

0x96c2908aB0c37AD278c9ed0e88120bCd698e7B1e 0
/home/munna/eth-fast-mnemonic-checker/node_modules/@ethersproject/logger/lib/index.js:233
var error = new Error(message);
^

Error: ENS name not configured (operation="resolveName("")", code=UNSUPPORTED_OPERATION, version=providers/5.6.8)
at Logger.makeError (/home/munna/eth-fast-mnemonic-checker/node_modules/@ethersproject/logger/lib/index.js:233:21)
at Logger.throwError (/home/munna/eth-fast-mnemonic-checker/node_modules/@ethersproject/logger/lib/index.js:242:20)
at WebSocketProvider. (/home/munna/eth-fast-mnemonic-checker/node_modules/@ethersproject/providers/lib/base-provider.js:1970:36)
at step (/home/munna/eth-fast-mnemonic-checker/node_modules/@ethersproject/providers/lib/base-provider.js:48:23)
at Object.next (/home/munna/eth-fast-mnemonic-checker/node_modules/@ethersproject/providers/lib/base-provider.js:29:53)
at fulfilled (/home/munna/eth-fast-mnemonic-checker/node_modules/@ethersproject/providers/lib/base-provider.js:20:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
reason: 'ENS name not configured',
code: 'UNSUPPORTED_OPERATION',
operation: 'resolveName("")'
}

Node.js v18.19.1

This issue ?

@orange2022
Copy link

if i cant check balance does i will find eth

@byjameson
Copy link

node check-balances.js is not working omg. what should i do?

@ProVeter
Copy link

ProVeter commented Jul 2, 2024

sorry, i dunno where i can ask question so i ask it there. My Balance check always write me that i dont have internet connection, but i have it. What i need to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.