Double encoding javascript

I found a nice variation which allows multiple types of encoding without performing eval twice on the string. The code works using the Script function and because of this the code is rewritten by the javascript engine and converts the unicode into standard text.

First a base of unicode is used first “\u0061\u006c\u0065\u0072\u0074\u0028\u0031\u0029” then each section of the is encoded with hex or octal. The final result can be viewed below:-

alert(Script('\x5c\x7500\66\61\134\165\6006c\x5c\x75\x30\x30\x36\x35
\134\165\60\60\67\62\x5c\x75\x30\x30\x37\x34\x5c\x75\x30\x30\x32
\x38\x5c\x75\x30\x30\x33\x31\x5c\x75\x30\x30\x32\x39'))

The code can be executed like this:-

Script('\x5c\x7500\66\61\134\165\6006c\x5c\x75\x30\x30\x36\x35
\134\165\60\60\67\62\x5c\x75\x30\x30\x37\x34\x5c\x75\x30\x30\x32
\x38\x5c\x75\x30\x30\x33\x31\x5c\x75\x30\x30\x32\x39')()

3 Responses to “Double encoding javascript”

  1. No Connexion writes:

    Can you pls provide the hackvertor tags for this ?

  2. Gareth Heyes writes:

    @No Connexion

    Here you go:-
    http://www.businessinfo.co.uk/labs/hackvertor/hackvertor.php?input=Ly9TdGVwIDEKLy8tLS0tLS0KCjxAdW5pXzAoXHUpPmFsZXJ0KDEpPEAvdW5pXzA%2BCgovL1N0ZXAgMgovLy0tLS0tLQoKU2NyaXB0KCc8QGhleF8xPlx1MDA2MTxAL2hleF8xPjxAb2N0XzI%2BXHUwMDZjXHUwMDY1XHUwMDcyPEAvb2N0XzI%2BPEBoZXhfMz5cdTAwNzRcdTAwMjhcdTAwMzFcdTAwMjk8QC9oZXhfMz4nKSgp

  3. Gareth Heyes writes:

    Here’s a better one :-
    http://www.businessinfo.co.uk/labs/hackvertor/hackvertor.php?input=U2NyaXB0KCc8QHVuaV8zKDxAb2N0XzQ%2BXHU8QC9vY3RfND4pPmFsZXJ0KDEpPEAvdW5pXzM%2BJykoKQ%3D%3D