summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);