javascript - How to detect cracked JS validation? -
i have website quiz on it. users cannot gain directly doing on quiz, can share result on facebook , twitter.
the problem can't figure out how check if answer correct or not. after each question, user should able restart or continue if got wrong, or automatically continue if user got right.
if check done server side, user have wait second after submitting answer before either next question pops or 2 alternatives pop up. however, if on client side, there no delay , users more happy.
so there isn't extremely gain on cheating, people show off on facebook , twitter.
so, there way spot checks or other method of detecting users cheating on client side? or have decide want validation?
no, cannot prevent cheating if validation on client side. can make little harder, @ end of day not control user's browser, , code must executable. unless take steps, easy cheat viewing page source , looking @ code correct answer. if care cheating, validation on server side. use ajax create seamless user experience during validation. couple seconds of waiting ajax request not bad, , not create poor user experience.
if dead set on client side validation, 1 trick make pain in behind attacker obfuscate javascript routine. if wrap obfuscated code generator js eval function call, attacker have de-obfuscate before determine "correct" answer question. done using spidermonkey, thwart script kiddies , lazies. idea of using wrong answer here , there may well, when paired obfuscation.
at end of day though, wouldn't validation client side @ all. use ajax/server side combo create experience users fair.
Comments
Post a Comment