Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force Google Recaptcha Challenge

Tags:

recaptcha

Is it possible to set some flag in my browser so that I always get the RECAPTHCA image challenges? Sometimes when you click on the "I am not a robot" button, it gives you a pop up challenge with something like "Click all the images which contain a car", but sometimes it just checks off the box and takes your word for the fact that you're not a robot.

I would like to test the UI of my tool both on a desktop and on mobile, and make sure that the challenge pop up shows up and interacts well with other elements of the page.

In other words, as a developer, I want Google to think that I'm a robot so that it always gives me the visual challenge.

Is there any way to force this behavior?

Note: I've done some research and was unable to find any relevant questions or blog posts that might yield an answer.

  • Force Google recaptcha to use simple checkbox click challenge asks for a way to force Google to NOT use the visual challenge, only the checkbox
  • How to force recheck user with reCAPTCHA? talks about forcing a recheck of some kind, but has no answers
  • https://groups.google.com/forum/#!topic/recaptcha/2ed-s3KK3Do actually asks my same question, but users did not seem keen on providing answers, with one user just suggesting not to use RECAPTCHA at all!
  • https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha-v2-what-should-i-do is straight from Google, but it does exactly the opposite of what I want - it sets your site up such that the captcha appears on the page but is actually a test captcha that always lets you pass, and NEVER gives you the challenge. I want the exact inverse of this.
like image 259
Jake Avatar asked Jan 24 '18 20:01

Jake


2 Answers

The methods told here should generally work, but there is no guarantee of the same. There is a very easy way to guarantee that Google reCAPTCHA challenge always show up. All you need to do is to add a custom BOT device in developer tools and then use the same to test.

  1. In Chrome Dev Tools, open Settings. Open Devices after that.
  2. Add a custom device with any name and set User Agent String to Googlebot/2.1
  3. Finally, in Device Mode, at the left of the top bar, choose the custom device that you created (the default is Responsive).

Thanks to the SO users who had put it up in the answer and follow-up comment here.

like image 126
thisisashwani Avatar answered Oct 23 '22 12:10

thisisashwani


I too have been looking for similar functionality. While I have not found a code-based solution to force the challenge, I have found a fairly reliable hack.

Grab a VPN tool (I happen to use IP Vanish), then connect to a remote server (I've had success connecting to China). Then, open up a private/incognito window and fill out your form.

From my testing, the combination of the remote IP and the blank user session triggers the challenge.

like image 17
Matt Kreikemeier Avatar answered Oct 23 '22 12:10

Matt Kreikemeier