summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Robinson <joe@lc8n.com>2015-12-05 17:03:25 +0000
committerJoe Robinson <joe@lc8n.com>2015-12-05 17:03:25 +0000
commitc2a8c2bef524d18fc6a4ca4f65a02d6dbf3414b0 (patch)
treea55a2a94c4a067b85aa5c8655bf5f6f052ba10a2
parentf0908c216716932d3e80c4019fef050c23387f09 (diff)
Make the cookie from the password
-rw-r--r--search.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/search.js b/search.js
index 5d93e74..1a27ea0 100644
--- a/search.js
+++ b/search.js
@@ -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);