3 ms·
Is there a limit to what one can do with these six characters? Like, now we're reading values from the string "false". We also could read from "true", and maybe
by matsemann 7y ago
Is there a limit to what one can do with these six characters? Like, now we're reading values from the string "false". We also could read from "true", and maybe undefined (how?). But can one do more? If one can generate "window", one should be able to call functions through window["functionName"]() and do general computing with this, I think?
- maury91 7y agoyou can obtain undefined by accessing the first element of an empty array. `([])[+!![]]`
- ewendel 7y agoAs I understand, there's no limit to what you can do with these six characters. It quickly gets more complicated though, and will require alot more code: "undefined": [][![]]+[] (empty array accessed at index 0 turned into string) "NaN": +{} "[object Object][object Object]": {}+{} .. etc See the full list here: https://github.com/aemkei/jsfuck/blob/master/jsfuck.js https://github.com/aemkei/jsfuck/blob/master/jsfuck.js