K
K
Konstantin Suk2018-11-02 05:12:38
JavaScript
Konstantin Suk, 2018-11-02 05:12:38

How to encode and decode?

I have scripts written in JavaScript, I bought them, I bought an encoded one from one programmer, I want to decode it and encode the rest according to the same principle.
Here are some examples from one script:
1. \x6F\x6D\x2F\x75\x63\x3F\x65\x78\x70\x6F
2. console['log']('\u0438\u0435\u0442\u0430');
3. var _0x24dax20 = _0x24dax1a['getDate']();
Tell me how to decode it! And then encode the rest of the scripts as well!
Maybe there is a program or a good Internet resource that you can encode and decode!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AngReload, 2018-11-02
@AngReload

The script is not encoded, it is difficult to read. Code deobfuscation is only needed to understand how it works.
There are tools for this, as mentioned above - code obfuscators . There are tools for reverse conversion , but they do not work very well, they can even break the code in some cases.
I pasted the lines into the console to see what was written in them, and replaced property access through square brackets with dot notation . What happened:

'om/uc?expo'
console.log('иета');
var _0x24dax20 = _0x24dax1a.getDate();

Here it is also worth renaming the names of the variables according to the meaning and then the code will look good.
var day = dateObj.getDate();

I
Isaac_Taitor, 2018-11-02
@Isaac_Taitor

decodeURI for decoding and encodeURI for encoding

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question