expose crypto module to VM

This commit is contained in:
zefie
2022-10-09 22:07:37 -04:00
parent e544e821c3
commit d1dbbcf82f
3 changed files with 3 additions and 4 deletions

View File

@@ -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,