Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Beautifying The Code Obfuscated By https://obfuscator.io #1987

Open
HackNetAyush opened this issue Feb 16, 2022 · 1 comment
Open

Not Beautifying The Code Obfuscated By https://obfuscator.io #1987

HackNetAyush opened this issue Feb 16, 2022 · 1 comment

Comments

@HackNetAyush
Copy link

Description

It is not able to beautify the code obfuscated by https://obfuscator.io

Input

The code looked like this before beautification:

function _0x5181() {
    var _0x473dc1 = ['8286664ldsTfq', '159078Zipjmg', 'log', '522KeJXxE', '42gtpbCL', '313430onJxLP', '14ODqOFj', '74003446jQXyoJ', '68opHssO', '4155inMTKS', '2069628xkPLzp', 'Hello\x20World!', '1167978UFkeCV'];
    _0x5181 = function() {
        return _0x473dc1;
    };
    return _0x5181();
}

function _0x1324(_0x4e1289, _0x513181) {
    var _0x5181e9 = _0x5181();
    return _0x1324 = function(_0x13243d, _0x123d13) {
        _0x13243d = _0x13243d - 0x143;
        var _0x40e95c = _0x5181e9[_0x13243d];
        return _0x40e95c;
    }, _0x1324(_0x4e1289, _0x513181);
}(function(_0x444bf9, _0x465e44) {
    var _0x4fa4c8 = _0x1324,
        _0x528f96 = _0x444bf9();
    while (!![]) {
        try {
            var _0x248387 = -parseInt(_0x4fa4c8(0x14a)) / 0x1 * (parseInt(_0x4fa4c8(0x14f)) / 0x2) + -parseInt(_0x4fa4c8(0x146)) / 0x3 + parseInt(_0x4fa4c8(0x144)) / 0x4 * (parseInt(_0x4fa4c8(0x145)) / 0x5) + parseInt(_0x4fa4c8(0x148)) / 0x6 * (-parseInt(_0x4fa4c8(0x14d)) / 0x7) + -parseInt(_0x4fa4c8(0x149)) / 0x8 + parseInt(_0x4fa4c8(0x14c)) / 0x9 * (-parseInt(_0x4fa4c8(0x14e)) / 0xa) + parseInt(_0x4fa4c8(0x143)) / 0xb;
            if (_0x248387 === _0x465e44) break;
            else _0x528f96['push'](_0x528f96['shift']());
        } catch (_0x285e68) {
            _0x528f96['push'](_0x528f96['shift']());
        }
    }
}(_0x5181, 0xdfc6a));

function hi() {
    var _0x50fde1 = _0x1324;
    console[_0x50fde1(0x14b)](_0x50fde1(0x147));
}
hi();

Current Output

The code actually looked like this after beautification:

function _0x5181() {
    var _0x473dc1 = ['8286664ldsTfq', '159078Zipjmg', 'log', '522KeJXxE', '42gtpbCL', '313430onJxLP', '14ODqOFj', '74003446jQXyoJ', '68opHssO', '4155inMTKS', '2069628xkPLzp', 'Hello\x20World!', '1167978UFkeCV'];
    _0x5181 = function() {
        return _0x473dc1;
    };
    return _0x5181();
}

function _0x1324(_0x4e1289, _0x513181) {
    var _0x5181e9 = _0x5181();
    return _0x1324 = function(_0x13243d, _0x123d13) {
        _0x13243d = _0x13243d - 0x143;
        var _0x40e95c = _0x5181e9[_0x13243d];
        return _0x40e95c;
    }, _0x1324(_0x4e1289, _0x513181);
}(function(_0x444bf9, _0x465e44) {
    var _0x4fa4c8 = _0x1324,
        _0x528f96 = _0x444bf9();
    while (!![]) {
        try {
            var _0x248387 = -parseInt(_0x4fa4c8(0x14a)) / 0x1 * (parseInt(_0x4fa4c8(0x14f)) / 0x2) + -parseInt(_0x4fa4c8(0x146)) / 0x3 + parseInt(_0x4fa4c8(0x144)) / 0x4 * (parseInt(_0x4fa4c8(0x145)) / 0x5) + parseInt(_0x4fa4c8(0x148)) / 0x6 * (-parseInt(_0x4fa4c8(0x14d)) / 0x7) + -parseInt(_0x4fa4c8(0x149)) / 0x8 + parseInt(_0x4fa4c8(0x14c)) / 0x9 * (-parseInt(_0x4fa4c8(0x14e)) / 0xa) + parseInt(_0x4fa4c8(0x143)) / 0xb;
            if (_0x248387 === _0x465e44) break;
            else _0x528f96['push'](_0x528f96['shift']());
        } catch (_0x285e68) {
            _0x528f96['push'](_0x528f96['shift']());
        }
    }
}(_0x5181, 0xdfc6a));

function hi() {
    var _0x50fde1 = _0x1324;
    console[_0x50fde1(0x14b)](_0x50fde1(0x147));
}
hi();

Expected Output

The code should have looked like this after beautification:

/* Your desired output text */

// Paste your JavaScript code here
function hi() {
  console.log("Hello World!");
}
hi();

Environment

Browser User Agent:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36

Language Selected:
Beautify JavaScript

Settings

{
  "indent_size": "4",
  "indent_char": " ",
  "max_preserve_newlines": "5",
  "preserve_newlines": true,
  "keep_array_indentation": false,
  "break_chained_methods": false,
  "indent_scripts": "normal",
  "brace_style": "collapse",
  "space_before_conditional": true,
  "unescape_strings": false,
  "jslint_happy": false,
  "end_with_newline": false,
  "wrap_line_length": "0",
  "indent_inner_html": false,
  "comma_first": false,
  "e4x": false,
  "indent_empty_lines": false
}
@mbartlett21
Copy link

The actual obfuscator code is here:

https://github.com/javascript-obfuscator/javascript-obfuscator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants