function sidologyRemixCheckAnswer(WC_Challenge $chall, $answer) { if (false !== ($error = $chall->isAnswerBlocked(GWF_User::getStaticOrGuest()))) { echo $error; return; } $solution = '726f3a30c8ae485b4f34d5ff0fed05552d3da60b'; # :) HappyCracking! $hash = $answer; for ($i = 0; $i < 100000; $i++) { $hash = sha1($hash); } // echo "$hash<br/>\n"; if ($hash === $solution) { $chall->onChallengeSolved(); } else { echo WC_HTML::error('err_wrong'); } }