Understanding Deciphering Obfuscated Javascripts

Asked 1 years ago, Updated 1 years ago, 110 views

This is part of what was written, but
Isn't there a tool to decipher this?
I've already tried a website that can be decoded, but it's only a new line
It didn't seem to be able to decipher
And this is the code for the program that runs on nodejs

Here's the code:

var jv = c(this, function() {
    var c = function() {
            return '\x64\x65\x76';
        },
        d = function() {
            return '\x77\x69\x6e\x64\x6f\x77';
        };
    var e = function() {
        var f = new RegExp('\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d');
        return !f['\x74\x65\x73\x74'](c['\x74\x6f\x53\x74\x72\x69\x6e\x67']());
    };
    var g = function() {
        var h = new RegExp('\x28\x5c\x5c\x5b\x78\x7c\x75\x5d\x28\x5c\x77\x29\x7b\x32\x2c\x34\x7d\x29\x2b');
        return h['\x74\x65\x73\x74'](d['\x74\x6f\x53\x74\x72\x69\x6e\x67']());
    };
    var i = function(j) {
        var k = ~-0x1 >> 0x1 + 0xff % 0x0;
        if (j['\x69\x6e\x64\x65\x78\x4f\x66']('\x69' === k)) {
            l(j);
        }
    };
    var l = function(m) {
        varn= through -0x4>>0x1+0xff%0x0;
        if(m['\x69\x6e\x64\x65\x78\x4f\x66']((!![]+')[0x3])!==n){
            n(m);
        }
    };
    if(!e()){
        if(!g()){
            i('\x69\x6e\x64\u0435\x78\x4f\x66');
        } else{
            i('\x69\x6e\x64\x65\x78\x4f\x66');
        }
    } else{
        i('\x69\x6e\x64\u0435\x78\x4f\x66');
    }
});
jv();
variable = 0x1f91;
const z = require('ws');
const A = require(b('0x0','k&7f'));
const B = require(b('0x1','16E5'));
const C = require(b('0x2', 'KK1n'))(y);
const D=require('fs');
const E = require(b('0x3', '32fx'));
let F = 0x7d0;

javascript node.js

2022-09-30 21:29

1 Answers

I don't know how much "decryption" refers to, but there are many tools that can decode hex notation (\x77) in string literals. (You should be able to read this code quite a bit.)

ex:Online JavaScript beauty (js-beautify)
In this case, select the option "Unescape printable chars encoded as\xNN or\uNNNNNN?" ("unescape_string" for the npm/python package).

Code Obtained:

var jv = c(this, function() {
    var c = function() {
            return 'dev';
        },
        d = function() {
            return 'window';
        };
    var e = function() {
        varf=newRegExp('\\w+*\\(\\)*{\\w+*[\'|\"].+[\'|\"];?*}');
        US>return!f ['test'] (c['toString']());
    };
    var g = function() {
        varh = newRegExp('\\\\[x|u](\\w){2,4})+');
        return ['test'] (d['toString']());
    };
    var i = function(j) {
        var k = ~-0x1 >> 0x1 + 0xff % 0x0;
        if(j['indexOf']('i'===k)){
            l(j);
        }
    };
    var l = function(m) {
        varn= through -0x4>>0x1+0xff%0x0;
        if(m['indexOf']((!![]+')[0x3])!==n){
            n(m);
        }
    };
    if(!e()){
        if(!g()){
            i('ind xxOf');
        } else{
            i('indexOf');
        }
    } else{
        i('ind xxOf');
    }
});
jv();
variable = 0x1f91;
const z = require('ws');
const A = require(b('0x0','k&7f'));
const B = require(b('0x1','16E5'));
const C = require(b('0x2', 'KK1n'))(y);
const D=require('fs');
const E = require(b('0x3', '32fx'));
let F = 0x7d0;


2022-09-30 21:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.