Re:Show HN: Untrusted, a JavaScript adventure game you play ...
by 9193-on on Tuesday April 08, 2014 @07:00PM
(#7556571)
I approached it like this:
player.removeItem('greenKey'); return 0;} if(1==1){('');
Full link: https://gist.github.com/anonymous/c78b439d8f2369e03f68
Basically, this let's you delete the green item once. After that, it makes sure that return true is never reached (because of the 1==1), so next passages through green are allowed. Kinda liked the sneaky (''); myself :P
Re:Show HN: Untrusted, a JavaScript adventure game you play ...
by Lozzer on Tuesday April 08, 2014 @03:54PM
(#7555584)
I thought https://gist.github.com/anonymous/cfe03f2ddb0052b38081 was kind of neat, as you still have to solve the puzzle a bit after using it.
Additionally it doesn't support injection there, so while "player.removeItem('greenKey'); player.additem('greenKey');" should work, it says "TypeError: undefined is not a function".