Answer the question
In order to leave comments, you need to log in
How to convert text to a string (sequence) like \xNN?
Hello.
On one of the projects, I covered the url from bots using some kind of online string converter.
The view string has been
converted to
var url = '/partners/ajax.php';
var url = '\x2F\x70\x61\x72\x74\x6E\x65\x72\x73\x2F\x61\x6A\x61\x78\x2E\x70\x68\x70';
Answer the question
In order to leave comments, you need to log in
var url = '/partners/ajax.php';
var obfuscated = url.split('')
.map(c => '\\x' + c.charCodeAt(0).toString(16).toUpperCase())
.join('');
// "\\x2F\\x70\\x61\\x72\\x74\\x6E\\x65\\x72\\x73\\x2F\\x61\\x6A\\x61\\x78\\x2E\\x70\\x68\\x70"
alert(obfuscated); // \x2F\x70\x61\x72\x74\x6E\x65\x72\x73\x2F\x61\x6A\x61\x78\x2E\x70\x68\x70
decodeURIComponent('\x2F\x70\x61\x72\x74\x6E\x65\x72\x73\x2F\x61\x6A\x61\x78\x2E\x70\x68\x70')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question