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

Add option to deconvert with non-deprecated functions #2

Open
kamil-kielczewski opened this issue Sep 1, 2020 · 0 comments
Open

Add option to deconvert with non-deprecated functions #2

kamil-kielczewski opened this issue Sep 1, 2020 · 0 comments

Comments

@kamil-kielczewski
Copy link
Owner

kamil-kielczewski commented Sep 1, 2020

(un)escape - gate for all

Having following characters: 123456789 aceflnmoprstu (which can be acheved one by one) we are able to get other lower/upper case letters and some characters without using deprecated methods like italics. Deprecated methods was used in jsfuck for size-optimizations. To avoid them we can use escape and unescape methods - technique base on this question and answer. We can do it by e.g. for letter C (which has hexadecimal escape code 43) as follows (we show 5 steps of formula evolution towards jsf)

step1:  unescape("%43")
step2:  unescape(escape(" ")[0]+43)
step3:  unescape(escape((NaN+[]["flat"])[11])[0]+43)
step4:  Function("return unescape")()(Function("return escape")()(" ")[0]+43)
step5:  []["flat"]["constructor"]("return unescape")()([]["flat"]["constructor"]("return escape")()((NaN+[]["flat"])[11])[0]+43)

Using this approach we have access to: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ abcdefghijklmnopqrstuvwxyz{|}~ + tilde character and more. Using this technique we don't need to use String.fromCharCode (which in old approach forced to use deprecated methods like 'italics' or 'fontcolor' etc.)

For letter "C" we can also use below shortcut based on escape only discovered by Siguza

step1: Function("return escape")()(",")[2]
step2: []["flat"]["constructor"]("return escape")()([[]]["concat"]([[]])+[])[2]

Give "checbox" which will alow to compile using deconverter based on above non-deprecated functions

List of all characters:

[...Array(256)].map((x,i)=> unescape(`%${i.toString(16)}`))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant