diff options
-rw-r--r-- | search.js | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,6 +1,9 @@ -var cookie = require('cookie'); +var http = require('http'); var crypto = require('crypto'); +var fs = require('fs'); -var hash = crypto.createHash('sha256').update('password').digest('hex'); +var config = JSON.parse(fs.readFileSync('config.json')); -console.log(hash); +var hash = crypto.createHash('sha256').update(config.password).digest('hex'); +var cookie = 'password='+hash +console.log(cookie); |