Created
March 13, 2013 08:52
-
-
Save geNAZt/5150353 to your computer and use it in GitHub Desktop.
Crypter
This file contains hidden or 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
process.stdin.resume(); | |
process.stdin.on("data", function(data) { | |
process.stdin.pause(); | |
var pass = data.toString("utf8").trim(); | |
var m = crypto.createHash('md5'); | |
m.update(pass, "utf8"); | |
var key = m.digest('hex'); | |
m = crypto.createHash('md5'); | |
m.update(pass + key); | |
var iv = m.digest('hex'); | |
var cipher = crypto.createCipheriv('aes-256-cbc', key, iv.slice(0,16)); | |
var crypted = cipher.update(JSON.stringify(results),'utf8','hex'); | |
crypted += cipher.final('hex'); | |
fs.writeFileSync("configs.aes", crypted); | |
console.log("Done"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment