Created
November 8, 2018 16:39
-
-
Save mearns/7c45fc4dd4dac62702804cceb2a06fc1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on : https://github.com/aemkei/jsfuck/blob/master/jsfuck.js | |
_zero = +[] // 0 | |
_false = !!+[] // false | |
_falseStr = !!+[]+[] // 'false' | |
_f = (!!+[]+[])[+[]] // 'f' <= 'false'[0] | |
_undefined = [][[]] // undefined <= [][''] (the property named '' on the array object, which is undefined (property accessors are always cast to strings)) | |
_undefinedStr = [][[]]+[] // 'undefined' | |
_true = !+[] // true <= !0 | |
_one = +!+[] // 1 <= +true (true, cast to a number) | |
_two = +!+[]+(+!+[]) // 2 <= 1+1 | |
_three = +!+[]+(+!+[])+(+!+[]) | |
_four = +!+[]+(+!+[])+(+!+[])+(+!+[]) | |
_five = +!+[]+(+!+[])+(+!+[])+(+!+[])+(!+[]) | |
_i = ([][[]]+[])[+!+[]+(+!+[])+(+!+[])+(+!+[])+(!+[])] // 'i' <= 'undefined'[5] | |
_l = (!!+[]+[])[+!+[]+(+!+[])] // 'l' <= 'false'[2] | |
_fillStr = (!!+[]+[])[+[]]+([][[]]+[])[+!+[]+(+!+[])+(+!+[])+(+!+[])+(!+[])]+(!!+[]+[])[+!+[]+(+!+[])]+(!!+[]+[])[+!+[]+(+!+[])] // 'fill' <= 'f'+'i'+'l'+'l' | |
_fillFunction = [][(!!+[]+[])[+[]]+([][[]]+[])[+!+[]+(+!+[])+(+!+[])+(+!+[])+(!+[])]+(!!+[]+[])[+!+[]+(+!+[])]+(!!+[]+[])[+!+[]+(+!+[])]] // <= []['fill'] | |
_fillFunctionStr = [][(!!+[]+[])[+[]]+([][[]]+[])[+!+[]+(+!+[])+(+!+[])+(+!+[])+(!+[])]+(!!+[]+[])[+!+[]+(+!+[])]+(!!+[]+[])[+!+[]+(+!+[])]]+[] // 'function fill() { [native code] }' | |
_c = ([][(!!+[]+[])[+[]]+([][[]]+[])[+!+[]+(+!+[])+(+!+[])+(+!+[])+(!+[])]+(!!+[]+[])[+!+[]+(+!+[])]+(!!+[]+[])[+!+[]+(+!+[])]]+[])[+!+[]+(+!+[])+(+!+[])] // 'c' <= 'function fill...'[3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment