Created
March 13, 2013 08:53
-
-
Save geNAZt/5150357 to your computer and use it in GitHub Desktop.
Decrypter
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 stdinPass(data) { | |
process.stdin.removeListener('data', stdinPass); | |
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 decipher = crypto.createDecipheriv('aes-256-cbc', key, iv.slice(0,16)); | |
var crypted = decipher.update(fs.readFileSync("./configs.aes"),'hex','utf8'); | |
crypted += decipher.final('utf8'); | |
console.log(crypted); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment