Premise:
Recently I came across an ad, that according to facebook had only yet been shown to 2k people. The advertisement presented a game,
a picture-based challenge that required players to identify the field of study or degree represented by a student wearing their student-overalls.
Student-overalls are a huge thing amongst Universities of Finland, and the concept is that each field of study gets their own kind with varying colours.
While the game is initially entertaining, it soon revealed several flaws
that allowed players to cheat and potentially break the game. It seemed as though it was a small, rushed hobby project.
This article explores how I, with great care and attention to detail, developed a bot to dominate the highscores for this unheard game about .. Finnish student overalls.
The game presents players a picture of a student wearing overalls and four possible options,
each corresponding to a degree or field of study. The players goal is to correctly guess which option
corresponds to the overalls. Players are allowed three incorrect guesses, with each guess earning them
100 points. The game ends when the player has made three incorrect guesses.
At the end of the game, players with the most points are displayed on a
leaderboard.
So what's wrong? Well two things:
So I built a bot. Let's look at it!
To actually gather points and stand a chance of winning the game, we'll first have to find out the right answers. As mentioned above the correct answers could just be parsed out from the static .js file. Let's do that with Python.
After that, we'll have to somehow interact with the game. We can achieve that with selenium, and beautiful soup. First we need to initialize the web driver for Selenium. Let's use Firefox.
We can scrape the name of the image with beautiful soup and then compare it to the data we scraped off
of the static js file. If no correct answer is found, we can throw an error.
With said functionalities, what can and what should we do? We can see that the leaderboard. is filled with 9 names, and if the same score occurs the later one gets the "spot". So we should then aim for 9 of the latest insertions of the highest score possible. We know there's (currently) only 97 questions, so we can only get the highscore of 94 before having to "end the game" with 3 wrong answers.
So does it work?
Yeah! We can leave it running and it will fill up us for all of the spots on the leaderboard. As the frontend takes around 20-30ms to load new elements, we can only reliably answer questions every 50 milliseconds. This results in a round time of 55 - 75 seconds total. Like 3,5 röntgen, it's not great but not terrible. Technically we could now leave it on loop, and enjoy our "reign" on top of the game -- that has enjoyed the exposure of just around 2 thousand people..
The game presents a fun challenge for players to test their knowledge of different student overalls.
However, the game is flawed in that it is incredibly easy to cheat and bot the game.
The bot developed in this article demonstrated how these flaws could be exploited to
consistently achieve a high score and dominate the leaderboard.
While the bots strategy is successful in achieving the highest score and occupying all the spots
on the leaderboard, it completely undermines the purpose of the game and deprives other players of the
opportunity to compete fairly. While it's tempting to exploit games,
it ultimately damages the fun of the game for everyone else.
Games should be designed in a way that tries to prevent this exploiting and cheating,
and this article demonstrates some ways a michevious player could "exploit the system."
There we go! The source for the bot can be found here: Haalar-it bot.
Thanks for reading, and I hope you learned something!
-Vs1m.