From c2a8c2bef524d18fc6a4ca4f65a02d6dbf3414b0 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Sat, 5 Dec 2015 17:03:25 +0000 Subject: Make the cookie from the password --- search.js | 9 ++++++--- 1 file 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); -- cgit v1.2.3