fasttime / JScrewIt

Write any JavaScript with six characters: ! ( ) + [ ]
https://jscrew.it
ISC License
159 stars 12 forks source link

Old jsfuck #21

Closed 837951602 closed 6 years ago

837951602 commented 7 years ago

There was time when [].filter is not defined, and jsfuck allowed 8 char types ! + ( ) [ ] { }.

  1. Can I slightly modify JScrewIt to make it use 8ct and allow old environments like IE7?
  2. Can I modify it so it allows 6ct as well as 8ct?

8ct Function == [][([]+![])[!![]+!![]+!![]]+({}+[])[+!![]]+([]+!![])[+!![]]+([]+!![])[+[]]][({}+{})[+!![]+!![]+[+[]]]+({}+{})[+!![]]+([][[]]+[])[+!![]]+([]+![])[!![]+!![]+!![]]+([]+!![])[+[]]+([]+!![])[+!![]]+([][[]]+[])[+[]]+({}+{})[+!![]+!![]+[+[]]]+([]+!![])[+[]]+({}+{})[+!![]]+([]+!![])[+!![]]]

fasttime commented 7 years ago

JScrewIt is free software, so feel free to modify it as you wish. I don't see any big problem in extending the character set to include { and }, except that some unit tests will start to fail. IE7 compatibility should be harder to do I guess. You'd need to exclude or rethink some optimizations that would otherwise break your code.

You can take a look at this project for inspiration: https://github.com/alcuadrado/hieroglyphy

837951602 commented 7 years ago

Oh, 'false'[3] returns undefined in IE7, so maybe it's not so much freedom. Yet in IE8 it's okay