restringer
Advanced tools
Comparing version 1.9.1 to 1.10.0
{ | ||
"name": "restringer", | ||
"version": "1.9.1", | ||
"version": "1.10.0", | ||
"description": "Deobfuscate Javascript with emphasis on reconstructing strings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -28,2 +28,3 @@ module.exports = { | ||
simplifyCalls: require(__dirname + '/simplifyCalls'), | ||
simplifyIfStatements: require(__dirname + '/simplifyIfStatements'), | ||
unwrapFunctionShells: require(__dirname + '/unwrapFunctionShells'), | ||
@@ -30,0 +31,0 @@ unwrapIIFEs: require(__dirname + '/unwrapIIFEs'), |
@@ -36,2 +36,3 @@ #!/usr/bin/env node | ||
simplifyCalls, | ||
simplifyIfStatements, | ||
rearrangeSwitches, | ||
@@ -127,2 +128,3 @@ unwrapIIFEs, | ||
unwrapIIFEs, | ||
simplifyIfStatements, | ||
]; | ||
@@ -129,0 +131,0 @@ } |
@@ -540,2 +540,51 @@ const {generateFlatAST} = require('flast'); | ||
}, | ||
{ | ||
enabled: true, | ||
name: 'simplifyIfStatements - TP-1 (empty blocks)', | ||
func: __dirname + '/../src/modules/safe/simplifyIfStatements', | ||
source: `if (J) {} else {}`, | ||
expected: `J;`, | ||
}, | ||
{ | ||
enabled: true, | ||
name: 'simplifyIfStatements - TP-2 (empty block, empty alternate statement)', | ||
func: __dirname + '/../src/modules/safe/simplifyIfStatements', | ||
source: `if (J) {} else;`, | ||
expected: `J;`, | ||
}, | ||
{ | ||
enabled: true, | ||
name: 'simplifyIfStatements - TP-3 (empty block, populated alternate expression)', | ||
func: __dirname + '/../src/modules/safe/simplifyIfStatements', | ||
source: `if (J) {} else J();`, | ||
expected: `if (!J)\n J();`, | ||
}, | ||
{ | ||
enabled: true, | ||
name: 'simplifyIfStatements - TP-4 (empty block, populated alternate block)', | ||
func: __dirname + '/../src/modules/safe/simplifyIfStatements', | ||
source: `if (J) {} else {J()}`, | ||
expected: `if (!J) {\n J();\n}`, | ||
}, | ||
{ | ||
enabled: true, | ||
name: 'simplifyIfStatements - TP-5 (empty statements)', | ||
func: __dirname + '/../src/modules/safe/simplifyIfStatements', | ||
source: `if (J); else;`, | ||
expected: `J;`, | ||
}, | ||
{ | ||
enabled: true, | ||
name: 'simplifyIfStatements - TP-6 (empty statement, no alternate)', | ||
func: __dirname + '/../src/modules/safe/simplifyIfStatements', | ||
source: `if (J);`, | ||
expected: `J;`, | ||
}, | ||
{ | ||
enabled: true, | ||
name: 'simplifyIfStatements - TP-7 (empty block, no alternate)', | ||
func: __dirname + '/../src/modules/safe/simplifyIfStatements', | ||
source: `if (J) {}`, | ||
expected: `J;`, | ||
}, | ||
@@ -542,0 +591,0 @@ // Unsafe |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
672797
123
12134
199