diff options
author | Joe Robinson <joe@lc8n.com> | 2015-12-05 17:03:25 +0000 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2015-12-05 17:03:25 +0000 |
commit | c2a8c2bef524d18fc6a4ca4f65a02d6dbf3414b0 (patch) | |
tree | a55a2a94c4a067b85aa5c8655bf5f6f052ba10a2 | |
parent | f0908c216716932d3e80c4019fef050c23387f09 (diff) |
Make the cookie from the password
-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); |