Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

obfuscation-detector

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obfuscation-detector - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

6

package.json
{
"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' &&

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc