Hacker News new | past | comments | ask | show | jobs | submit login

I figured out how to do "SQL Injection" types of attacks against a lot of the levels. I figured this all out without examining any source, BTW - this solution was made purely from in game information. For example, I would never have known about "_endOfStartLevelReached" if the game didn't complain about it being "not a function"

For example, this was my Level 12 solution:

https://gist.github.com/Untrusted-Game/d0f0e7493b39d109a5fe9...

You are supposed to program a robot to traverse a maze, but instead I just ended the robot's function so I could get access to the main scope and do whatever I want:

        }
     });

    map.placeObject(map.getWidth() - 2, 20, 'greenKey');
    map.placeObject(map.getWidth() - 1, map.getHeight() - 1, 'exit');
    
    var tmp = map._endOfStartLevelReached
    
    //Needed so the rest of the function is ignored
    map = {
    "defineObject": () => {},
    "getWidth": () => {},
    "getHeight": () => {},
    "placeObject": () => {},
    "_endOfStartLevelReached": tmp
    };
    
    map.defineObject('robot2', {
        'behavior': function (me) {
        }
    });
I hope they don't fix this though, it was exhilarating (and rewarding) trying to outsmart the game



It's also possible to just return early (instead of redefining map)

    map._endOfStartLevelReached();
    return;




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: