Hacker News new | ask | show | jobs
by kaahne 4507 days ago
Cool little Game ! As a lot of people here, I threw together some JS to try and 'hack' the challenge. As mentioned by OP, this is "staggeringly" easy to do. Yet, I was wondering : How would you go around to preventing such a behavior ?

I would try obfuscating the problem a little bit :

* Display an image instead of a text (using canvas for quick drawing ? You'd have to create the images server side to really be sure)

* If you really want to display text, use a custom made font (Reverse-engineering the characters match would take a little time)

* Changing the elements id (#answer and #question) every question.

Any ideas ?

1 comments

since it's client side, it's physically impossible to completely prevent cheating :( using images instead of text and changing element id's and things would certainly make it harder to hack though!
keeping questions captcha-like and calculating the score on server side, is one solution.