expose crypto module to VM
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
var minisrv_service_file = true;
|
||||
const crypto = require('crypto')
|
||||
|
||||
|
||||
var viewer = 2 // debug override
|
||||
|
||||
var viewers = {
|
||||
|
||||
@@ -11,7 +11,7 @@ var challenge = request_headers.request.split('?')[1];
|
||||
|
||||
if (request_headers.request.split('?')[1].substring(0, 3) != "ct=") {
|
||||
console.log(" *** Logging into Messenger via MSNP3")
|
||||
data = require('crypto').createHash('md5').update(request_headers.request.split('?')[1] + password).digest("hex");
|
||||
data = crypto.createHash('md5').update(request_headers.request.split('?')[1] + password).digest("hex");
|
||||
} else {
|
||||
console.log(" *** Logging into Messenger via MSNP8")
|
||||
request_is_async = true; // Make us async
|
||||
|
||||
@@ -7,6 +7,7 @@ const zlib = require('zlib');
|
||||
const http = require('http');
|
||||
const https = require('https');
|
||||
const net = require('net');
|
||||
const crypto = require('crypto')
|
||||
const CryptoJS = require('crypto-js');
|
||||
const { crc16 } = require('easy-crc');
|
||||
const process = require('process');
|
||||
@@ -127,6 +128,7 @@ var runScriptInVM = function (script_data, user_contextObj = {}, privileged = fa
|
||||
"WTVFlashrom": WTVFlashrom,
|
||||
"strftime": require('strftime'),
|
||||
"CryptoJS": CryptoJS,
|
||||
"crypto": crypto,
|
||||
"fs": fs,
|
||||
"path": path,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user