Thought I would share...

$("#edit-captcha-response").attr('value', eval($("#edit-captcha-response-wrapper span.field-prefix").text().replace(/=/,'')));

Kale

Comments

soxofaan’s picture

Title: Crack number math captcha » Math challenge feature: autosolve with jQuery tricks?
Project: CAPTCHA Pack » CAPTCHA
Version: 6.x-1.x-dev » 6.x-2.x-dev
Component: Miscellaneous » User interface
Category: bug » feature
Priority: Normal » Minor
Status: Active » Needs work

First, I assume you are talking about the Math challenge from the core CAPTCHA module, not the one from the CAPTCHA Pack module, which is much harder to crack that way.

Second, I would not consider this a bug. The math challenge in CAPTCHA is as simple as it is on purpose.
And yes, this also means it is very easy to crack.
But that does not mean it is useless, it can be effective against simple spam bots on small scale low profile sites for example.

Third, what about changing this "bug" into a feature: autosolve the challenge for users with Javascript enabled? This could be useful as long as the spam bots only look at the HTML and don't process/execute the Javascript, which is still largely true I suspect.
To make it really useful, the javascript snippet should also hide the CAPTCHA widget, so the user is not bothered with it.

elachlan’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)