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