Joe Levy has a day job, but he also likes to tinker with code. His favorite hacking targets are popular games and apps. For instance, according to him, in 2010 he discovered a vulnerability in the Foursquare app that allowed him to become the mayor of anything.

And so, as the 25-year-old tells it, one day he became the mayor of the White House and "held a title higher than President of the United States."

Following this act of digital civil disobedience, Levy says he was promptly banned from Foursquare. (Business Insider contact Foursquare and will update if we hear back.)

Since then Levy has spent his free time trying to find other technical glitches on which he could capitalize. His latest exploit focuses on a popular online game, and has even landed him a nice sum of money.

The coder was able to find a way to hack the popular trivia app Trivia Crack to always select the correct answer. And he’s been selling it as a Chrome extension for months now.

In an email to Business Insider, Levy explained his discovery. He analyzed the way Trivia Crack sends data from its server to players. Doing this, he realized that not only are the questions and multiple choice answers given to the device at each turn, but it "also says which answer is correct!"

So the data sent from the server to the player always includes the knowledge of which answer is correct.

Capitalizing on this, he was able to build a Chrome extension that automatically selects the correct answer during each turn. According to Levy, this was initially built as a personal tool to trick friends.

But then he got bored consistently beating his friends and decided to see if he could make some money. "I released the Chrome extension publicly so others could do the same thing, for a price," he wrote to Business Insider.

The extension, dubbed Trivia Cracker, works by adding a button onto the desktop version of Trivia Crack. When users are presented a question in the game, they click the button and the correct answer is automatically selected. So the 'game' becomes a series of pressing the hack button and then pressing 'continue.' These two steps automatically lead to victory.

Levy posted a video of his extension at work on YouTube.

And it seems people took to his extension. Since its initial release late last year, he says over 23,000 downloaded it. He won't give an exact number for how many people paid for it (there's both a free trial and a $1.99 full version), but said it was "thousands of people." Levy added, "it’s enough to fund a nice vacation to Trivia Crack’s headquarters in Argentina to say 'Hi'."

Despite the fact that his extension exploits a direct vulnerability in the Trivia Crack, the game has yet to offer a fix. Levy thinks this is because the app makers never thought someone would take the time to build such an extension. Additionally, it's possible that a fix would make the game run significantly slower.

Until Trivia Crack patches the bug, Levy stands to keep making money. He currently works full time at a tech company, so this is just a nice added bonus.

But even with all the cheaters paying to win, Levy says that mere mortals have been able to prevail. A friend of his, whom Levy describes as "one of the best Trivia Crack players in the world," was once able to beat him despite the app. What actually happened was that they both tied and the game gives preference to the player who answered last.

Levy wryly added: "And yes, I checked to make sure he wasn’t using Trivia Cracker too."