Giter VIP home page Giter VIP logo

deobfuscator-io's Introduction

A JavaScript deobfuscator for obfuscator.io

A (incomplete) deobfuscator for scripts obfuscated with obfuscator.io, feel free to use it.
I may add more features or clean the code up at some point.

Current Features

  • Reverses string array obfuscation
  • Reverses rotated and shuffled string array obfuscation
  • Removes string array wrapper chained calls
  • Will remove self defending calls (that prevent you from beautifying the obfuscated script)
  • Simplifies the nasty _0x23b78c variable names to something more readable
  • Beautifies the code

Example

Obfuscated script (beautified for easier viewing)

var _0x19be = ['Bg9N', 'q0T0uwe='];
(function(_0x3fa0c3, _0x19bec9) {
    var _0x40d3d0 = function(_0x5180bc) {
        while (--_0x5180bc) {
            _0x3fa0c3['push'](_0x3fa0c3['shift']());
        }
    };
    _0x40d3d0(++_0x19bec9);
}(_0x19be, 0x143));
var _0x40d3 = function(_0x3fa0c3, _0x19bec9) {
    _0x3fa0c3 = _0x3fa0c3 - 0x0;
    var _0x40d3d0 = _0x19be[_0x3fa0c3];
    if (_0x40d3['xHUwua'] === undefined) {
        var _0x5180bc = function(_0x4f8e26) {
            var _0x2d6eea = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=',
                _0x1f9584 = String(_0x4f8e26)['replace'](/=+$/, '');
            var _0xe582fc = '';
            for (var _0x3c4a7a = 0x0, _0x52dbfd, _0x112e70, _0x4ded32 = 0x0; _0x112e70 = _0x1f9584['charAt'](_0x4ded32++); ~_0x112e70 && (_0x52dbfd = _0x3c4a7a % 0x4 ? _0x52dbfd * 0x40 + _0x112e70 : _0x112e70, _0x3c4a7a++ % 0x4) ? _0xe582fc += String['fromCharCode'](0xff & _0x52dbfd >> (-0x2 * _0x3c4a7a & 0x6)) : 0x0) {
                _0x112e70 = _0x2d6eea['indexOf'](_0x112e70);
            }
            return _0xe582fc;
        };
        _0x40d3['CiDTFB'] = function(_0x3452b6) {
            var _0x4265f0 = _0x5180bc(_0x3452b6);
            var _0x23525c = [];
            for (var _0x4e74ff = 0x0, _0x188f0f = _0x4265f0['length']; _0x4e74ff < _0x188f0f; _0x4e74ff++) {
                _0x23525c += '%' + ('00' + _0x4265f0['charCodeAt'](_0x4e74ff)['toString'](0x10))['slice'](-0x2);
            }
            return decodeURIComponent(_0x23525c);
        }, _0x40d3['PiGWwq'] = {}, _0x40d3['xHUwua'] = !![];
    }
    var _0x29219e = _0x40d3['PiGWwq'][_0x3fa0c3];
    return _0x29219e === undefined ? (_0x40d3d0 = _0x40d3['CiDTFB'](_0x40d3d0), _0x40d3['PiGWwq'][_0x3fa0c3] = _0x40d3d0) : _0x40d3d0 = _0x29219e, _0x40d3d0;
};

function _0x4e3536() {
    var _0x5c5a38 = _0x40d3,
        _0x4e384e = {};
    _0x4e384e[_0x5c5a38('0x0')] = 'Hello World!';
    var _0x26386b = _0x4e384e;
    console[_0x5c5a38('0x1')](_0x26386b[_0x5c5a38('0x0')]);
}
_0x4e3536();

Deobfuscated script

function a() {
    var c = {};
    c.CKtQa = 'Hello World!';
    var d = c;
    console.log(d.CKtQa);
}
a();

To Run

Put the obfuscated script in source/obfuscated.js and run:
npm start

deobfuscator-io's People

Contributors

ben-sb avatar

Watchers

James Cloos 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.