Force Google Recaptcha Challenge

£可爱£侵袭症+ 提交于 2020-01-12 12:25:33

问题


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.

回答1:


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.




回答2:


I use reCAPTCHA's SDK in Android, and I also encounter the need to force validation when testing. I tried it many times. At last, I turned off or turned on the flight mode, which can be verified in the retest. I guess it may be that Google put my IP on the white list in the background, so I passed the verification without any challenge.




回答3:


I was looking for something like this and after some research plus trial & error what worked for me is to use the invisible recaptcha and invoke the challenge with JS.

After you have loaded the recaptcha script on your page then do

grecaptcha.execute()

and the challenge might be invoked.



来源:https://stackoverflow.com/questions/48431361/force-google-recaptcha-challenge

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!