obfuscation-detector
Advanced tools
Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "obfuscation-detector", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Javascript obfuscation detector", | ||
@@ -37,8 +37,8 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"eslint": "^9.12.0", | ||
"eslint": "^9.14.0", | ||
"husky": "^9.1.6" | ||
}, | ||
"dependencies": { | ||
"flast": "^2.0.3" | ||
"flast": "^2.1.0" | ||
} | ||
} |
@@ -32,3 +32,3 @@ const obfuscationName = 'caesar_plus'; | ||
// Verify the main function's name is 3 letters long and has maximum 1 reference; | ||
const candidates = flatTree.filter(n => | ||
const candidates = (flatTree[0].typeMap.FunctionExpression || []).filter(n => | ||
n.type === 'FunctionExpression' && | ||
@@ -35,0 +35,0 @@ n?.id?.name?.length === 3 && |
@@ -11,4 +11,4 @@ const obfuscationName = 'function_to_array_replacements'; | ||
*/ | ||
function detectFunctionToArrayReplacemets(flatTree) { | ||
return flatTree.some(n => | ||
function detectFunctionToArrayReplacements(flatTree) { | ||
return (flatTree[0].typeMap.VariableDeclarator || []).some(n => | ||
n.type === 'VariableDeclarator' && | ||
@@ -22,2 +22,2 @@ n?.init?.callee?.type?.indexOf('unction') > -1 && | ||
export {detectFunctionToArrayReplacemets}; | ||
export {detectFunctionToArrayReplacements}; |
const obfuscationName = 'obfuscator.io'; | ||
function setCookieIndicator(flatTree) { | ||
const candidate = flatTree.find(n => | ||
const candidate = (flatTree[0].typeMap.ObjectExpression || []).find(n => | ||
n.type === 'ObjectExpression' && | ||
@@ -22,3 +22,3 @@ n.properties.length && | ||
function notBooleanTilde(flatTree) { | ||
const candidates = flatTree.filter(n => | ||
const candidates = (flatTree[0].typeMap.BlockStatement || []).filter(n => | ||
n.type === 'BlockStatement' && | ||
@@ -25,0 +25,0 @@ n.body.length === 2 && |
@@ -22,3 +22,3 @@ /** | ||
function findArrayDeclarationCandidates(flatTree) { | ||
return flatTree.filter(n => | ||
return (flatTree[0].typeMap.VariableDeclarator || []).filter(n => | ||
n.type === 'VariableDeclarator' && | ||
@@ -25,0 +25,0 @@ n?.init?.type === 'ArrayExpression' && |
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
922525
Updatedflast@^2.1.0