Giter Site home page Giter Site logo

g2asell2019 / datadome-interstitial-deobfuscator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from glizzykingdreko/datadome-interstitial-deobfuscator

0.0 0.0 0.0 1.76 MB

A streamlined tool for decoding and simplifying JavaScript obfuscated by Datadome's Interstitial challenge, enhancing readability and maintainability of the code.

License: MIT License

JavaScript 100.00%

datadome-interstitial-deobfuscator's Introduction

Datadome Interstitial Deobfuscator

This project, is designed to decode and simplify JavaScript files obfuscated by Datadome's new Interstitial challenge. The original script, typically obfuscated, can be transformed into a more readable and maintainable format.

Original script location The original script can be found as one line minimized code in the HTML file of the Interstitial challenge.

Table of Contents

Features

  • Specifically targets the obfuscation patterns used in Datadome's Interstitial challenge.
  • Efficiently decodes hexadecimal encoded strings within the JavaScript file.
  • Transforms and simplifies initial function calls and variables for enhanced readability.
  • Eliminates dead code, including unused functions and variables.
  • Improves overall code clarity, making it easier to understand and maintain.
  • Higly improved for the newest version of the challenge.

Prerequisites

  • Node.js
  • Required Babel libraries: @babel/parser, @babel/traverse, @babel/generator, @babel/core, @babel/types

Usage

Execute the deobfuscator using the following command:

node main.js <input> [output]
  • <input>: Path to the input JavaScript file (obfuscated by Datadome's Interstitial challenge).
  • [output]: (Optional) Path for saving the deobfuscated code. Defaults to out.js if not specified.

Structure

The project structure is as follows:

.
├── README.md
├── index.html
├── main.js
├── package-lock.json
├── package.json
└── transformers
    ├── cleanCode.js
    ├── cleanSwitchCases.js
    └── evaluateStringObf.js
  • main.js: The main script that orchestrates the deobfuscation process.
  • transformers/: Contains scripts for specific transformations.
    • evaluateStringObf.js: Handles the deobfuscation of the file.
    • cleanSwitchCases.js: Removes the usless switch cases obfuscation inside functions.
    • cleanCode.js: Improves the readability of the code post-deobfuscation.

Before and After Comparison

A screenshot demonstrating the original obfuscated script and its deobfuscated version will be attached to visually highlight the effectiveness of this tool. (just a snippet of the code)

  • Original obfuscated script: (3399 lines) Original obfuscated script
  • Deobfuscated script: (1266 slines) Deobfuscated script

Contributing

Contributions to enhance or extend the functionality of this tool are welcome. Please feel free to submit pull requests. For significant changes or suggestions, kindly open an issue to discuss your ideas.

License

This project is made available under the MIT License. For more information, refer to the LICENSE file.

Contact

datadome-interstitial-deobfuscator's People

Contributors

glizzykingdreko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.