diff --git a/scripts/decrypt.js b/scripts/decrypt.js index 46ef7fe..c7c1ed7 100644 --- a/scripts/decrypt.js +++ b/scripts/decrypt.js @@ -1,10 +1,19 @@ -const { decrypt } = require('../helpers/encryption'); +const readline = require('readline'); +const { decrypt } = require('../helpers/encryption'); +const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout +}); -(async () => { +(() => { - const decrypted = await decrypt(process.argv[2]); - console.log(decrypted); + rl.question('Enter encryption key: ', async (key) => { + process.env.KEY = key; + const decrypted = await decrypt(process.argv[2]); + console.log(decrypted); + rl.close(); + }); })();