{"id":13433401,"url":"https://github.com/PerimeterX/obfuscation-detector","last_synced_at":"2025-03-17T12:31:44.704Z","repository":{"id":58340618,"uuid":"510385392","full_name":"PerimeterX/obfuscation-detector","owner":"PerimeterX","description":"Detect different types of JS obfuscation by their AST structure","archived":false,"fork":false,"pushed_at":"2023-09-10T11:19:31.000Z","size":399,"stargazers_count":38,"open_issues_count":1,"forks_count":8,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-14T14:59:36.840Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PerimeterX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-04T14:11:23.000Z","updated_at":"2024-06-19T13:33:10.447Z","dependencies_parsed_at":"2024-06-19T13:33:03.819Z","dependency_job_id":"7d038839-4ea7-469e-8e73-323e72537961","html_url":"https://github.com/PerimeterX/obfuscation-detector","commit_stats":{"total_commits":20,"total_committers":3,"mean_commits":6.666666666666667,"dds":0.4,"last_synced_commit":"8f59816e4fe049495ad161699d46ddcf7e6ec937"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerimeterX%2Fobfuscation-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerimeterX%2Fobfuscation-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerimeterX%2Fobfuscation-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerimeterX%2Fobfuscation-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerimeterX","download_url":"https://codeload.github.com/PerimeterX/obfuscation-detector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244033819,"owners_count":20387009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T02:01:25.276Z","updated_at":"2025-03-17T12:31:44.699Z","avatar_url":"https://github.com/PerimeterX.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Obfuscation Detector\n[![Node.js CI](https://github.com/PerimeterX/obfuscation-detector/actions/workflows/node.js.yml/badge.svg?branch=main)](https://github.com/PerimeterX/obfuscation-detector/actions/workflows/node.js.yml)\n[![Downloads](https://img.shields.io/npm/dm/obfuscation-detector.svg?maxAge=43200)](https://www.npmjs.com/package/obfuscation-detector)\n\nDetect different types of JS obfuscation by their AST structure.\n\n## Installation\n`npm install obfuscation-detector`\n\n## Usage\n### Module\n```javascript\nimport fs from 'node:fs';\nimport detectObfuscation from 'obfuscation-detector';\n\nconst code = fs.readFileSync('obfuscated.js', 'utf-8');\nconst most_likely_obfuscation_type = detectObfuscation(code);\n// const all_matching_obfuscation_types = detectObfuscation(code, false);\nconsole.log(`Obfuscation type is probably ${most_likely_obfuscation_type}`);\n```\n\n### CLI\n```bash\nobfuscation-detector /path/to/obfuscated.js [stopAfterFirst]\n```\n\nGetting all matching obfuscation types for a file:\n```bash\n$ obfuscation-detector /path/to/obfuscated.js\n[+] function_to_array_replacements, augmented_proxied_array_function_replacements\n``` \n\nGetting just the first match:\n```bash\n$ obfuscation-detector /path/to/obfuscated.js stop\n[+] function_to_array_replacements\n```\n\n\nThe `stopAfterFirst` arguments doesn't have to be any specific string, it just needs not to be empty.\n\n## Supported Obfuscation Types\nYou can find descriptions of the different types in the code itself, and more info [here](src/detectors/README.md). \n- [Array Replacements](src/detectors/arrayReplacements.js)\n- [Augmented Array Replacements](src/detectors/augmentedArrayReplacements.js)\n- [Array Function Replacements](src/detectors/arrayFunctionReplacements.js)\n- [Augmented Array Function Replacements](src/detectors/augmentedArrayFunctionReplacements.js)\n- [Function To Array Replacements](src/detectors/functionToArrayReplacements.js)\n- [Obfuscator.io](src/detectors/obfuscator-io.js)\n- [Caesar Plus](src/detectors/caesarp.js)\n\n## Contribution\nTo contribute to this project see our [contribution guide](CONTRIBUTING.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPerimeterX%2Fobfuscation-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPerimeterX%2Fobfuscation-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPerimeterX%2Fobfuscation-detector/lists"}