restringer
Advanced tools
Comparing version 1.4.2 to 1.4.3
{ | ||
"name": "restringer", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "Deobfuscate Javascript with emphasis on reconstructing strings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -22,7 +22,6 @@ const areReferencesModified = require(__dirname + '/../utils/areReferencesModified'); | ||
const refs = c.id.references || []; | ||
// Remove proxy assignments if there are no further proxies assigned | ||
if (!refs.find(n => ['right', 'init'].includes(n.parentKey) && | ||
['AssignmentExpression', 'VariableDeclarator'].includes(n.parentNode.type))) arb.markNode(c); | ||
if (areReferencesModified(arb.ast, refs)) continue; | ||
for (const ref of refs) { | ||
// Remove proxy assignments if there are no more references | ||
if (!refs.length) arb.markNode(c); | ||
else if (areReferencesModified(arb.ast, refs)) continue; | ||
else for (const ref of refs) { | ||
arb.markNode(ref, c.init); | ||
@@ -29,0 +28,0 @@ } |
@@ -207,3 +207,3 @@ module.exports = [ | ||
source: 'const a = ["hello"], b = a[0], c = b; console.log(c);', | ||
expected: `const a = ['hello'], b = 'hello';\nconsole.log('hello');`, | ||
expected: `const a = ['hello'], b = 'hello', c = 'hello';\nconsole.log('hello');`, | ||
}, | ||
@@ -210,0 +210,0 @@ { |
@@ -316,2 +316,3 @@ const {generateFlatAST} = require('flast'); | ||
enabled: true, | ||
looped: true, | ||
name: 'resolveProxyVariables - TP-1', | ||
@@ -324,2 +325,3 @@ func: __dirname + '/../src/modules/safe/resolveProxyVariables', | ||
enabled: true, | ||
looped: true, | ||
name: 'resolveProxyVariables - TP-2', | ||
@@ -326,0 +328,0 @@ func: __dirname + '/../src/modules/safe/resolveProxyVariables', |
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
10386
604334