Obfuscation Detector

Detect different types of JS obfuscation by their AST structure.

Installation

npm install obfuscation-detector

Usage

const fs = require('fs');
const detectObfuscation = require('obfuscation-detector');

const code = fs.readFileSync('obfuscated.js', 'utf-8');
// const all_matching_obfuscation_types = detectObfuscation(code, false);
const most_likely_obfuscation_type = detectObfuscation(code);
console.log(`Obfuscation type is probably ${most_likely_obfuscation_type}`);

Supported Obfuscation Types

You can find descriptions of the different types in the code itself, and more info here.

Contribution

To contribute to this project see our contribution guide

GitHub

View Github