restringer
Advanced tools
Comparing version 1.6.4 to 1.6.5
{ | ||
"name": "restringer", | ||
"version": "1.6.4", | ||
"version": "1.6.5", | ||
"description": "Deobfuscate Javascript with emphasis on reconstructing strings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -69,3 +69,3 @@ const {VM} = require('vm2'); | ||
const res2 = (new VM(vmOptions)).run(stringToEval); | ||
assert.deepEqual(res, res2); | ||
assert.deepEqual(res.toString(), res2.toString()); | ||
cache[cacheName] = createNewNode(res); | ||
@@ -72,0 +72,0 @@ } |
@@ -70,2 +70,6 @@ const evalInVm = require(__dirname + '/evalInVm'); | ||
if (newNode !== badValue && newNode.type !== 'FunctionDeclaration' && newNode.name !== 'undefined') { | ||
// Prevent resolving a function's toString as it might be an anti-debugging mechanism | ||
// which will spring if the code is beautified | ||
if (c.callee.type === 'MemberExpression' && (c.callee.property?.name || c.callee.property?.value) === 'toString' && | ||
(new RegExp('^function ')).test(newNode?.value)) continue; | ||
arb.markNode(c, newNode); | ||
@@ -72,0 +76,0 @@ modifiedRanges.push(c.range); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
630770
11357