This commit is contained in:
Eric Pelland 2022-10-21 18:43:56 -04:00
commit 0d1e48d717
8 changed files with 7357 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
node_modules
npm-debug.log
docker-compose.yml

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
docker-compose.yml
node_modules
output

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM node:16
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# Bundle app source
COPY . .
# EXPOSE 8080
CMD [ "node", "index.js" ]

7
README.md Normal file
View File

@ -0,0 +1,7 @@
I am not responsible for your actions using this software. Just because you can steal someones Ethereum doesn't mean you should.... Plus statistically you will never find an address with a balance.
This software will forever check random Ethereum private keys for a balance. When one is found it will be emailed to you. Currently only Gmail as the sender is allowed, and you will have to allow unsecure apps in your google settings.
Check docker-compose.sample.yml for configuration and environment options. Found addresses and private keys will also be logged to /output/output.txt
Docker image hosted on Docker Hub https://hub.docker.com/repository/docker/ericpelland/random_ethereum_scanner

11
docker-compose.sample.yml Normal file
View File

@ -0,0 +1,11 @@
version: "3.4"
services:
random_ethereum_scanner:
image: ericpelland/random_ethereum_scanner
environment:
- EMAIL_USER=email@website.com
- EMAIL_PASS=GOOGLE-APP-PASSWORD # See https://stackoverflow.com/questions/71477637/nodemailer-and-gmail-after-may-30-2022
- EMAIL_TO=email@website.com
volumes:
- ./output:/output

76
index.js Normal file
View File

@ -0,0 +1,76 @@
let Web3 = require("web3");
let ethNetwork = 'https://cloudflare-eth.com';
let ethscan = require('@mycrypto/eth-scan');
let web3 = new Web3(new Web3.providers.HttpProvider(ethNetwork));
let fs = require('fs');
let nodemailer = require("nodemailer");
let transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: process.env.EMAIL_USER,
pass: process.env.EMAIL_PASS
}
});
function makeMoney(count = 0){
console.log('\033[2J');
console.log("Addresses checked: " + count)
// let accounts = [{address: '0x8735015837bD10e05d9cf5EA43A2486Bf4Be156F', privateKey: 'fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364150'}]
let accounts = []
let x = 0
while(x < 100) {
accounts.push(web3.eth.accounts.create())
count++
x++
}
search(accounts, count)
}
function search(accounts, count) {
let addresses = accounts.map((account) => { return account.address })
ethscan.getEtherBalances(web3, addresses).then(balanceMap => {
for (const [key, value] of Object.entries(balanceMap)) {
if(BigInt(value) > 0) {
message = key + ": " + accounts[addresses.indexOf(key)].privateKey + "\n"
writeToFile('/output/output.txt', message)
transporter.sendMail({
from: '"Random Ethereum Scanner" <foo@example.com>',
to: process.env.EMAIL_TO, // Test email address
subject: "$$$ We Found Ethereum!",
text: message,
}).catch(emailError)
}
}
makeMoney(count)
}).catch(emailError)
}
function emailError(err){
transporter.sendMail({
from: '"Random Ethereum Scanner" <foo@example.com>',
to: process.env.EMAIL_TO, // Test email address
subject: "Error detected",
text: err.toString(),
}).catch((err)=>{writeToFile('/output/err.txt', err.toString())})
}
function writeToFile(filename, message) {
fs.appendFile(filename, message, err => {
if (err) {
console.log(err)
}
});
}
transporter.sendMail({
from: '"Random Ethereum Scanner" <foo@example.com>',
to: process.env.EMAIL_TO, // Test email address
subject: "Scanner Started",
text: "Random Ethereum Scanner Started Successfully",
}).catch((err)=>{writeToFile('/output/err.txt', err.toString())})
makeMoney()

7221
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

17
package.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "randometherscanner",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@mycrypto/eth-scan": "^3.5.3",
"fs": "^0.0.1-security",
"nodemailer": "^6.8.0",
"web3": "^1.8.0"
}
}