Page 1 of 1

reCAPTCHA issues when using CEF

PostPosted: Mon May 11, 2020 6:13 am
by charles
Hello,

I am automating certain administrative tasks using CEF without displaying a GUI. Two websites that I'm integrating with are using reCAPTCHAs on their login forms to block (I assume bots for password hacking?) to log in to their service.

When loading these from my normal browser, even in incognito mode, I don't get prompted to enter a captcha. When I load the websites through CEF, it shows me blank reCAPTCHA view that states "Please upgrade to a supported browser to get a reCAPTCHA challenge".

Is there a solution to this? Or is this just a limitation of Google limiting CEF access to certain services, which includes their reCAPTCHA service?

Thanks for all feedback.

Re: reCAPTCHA issues when using CEF

PostPosted: Mon May 11, 2020 10:11 am
by charles
Just updated to CEF + Chromium 81 and the issue still persists

Re: reCAPTCHA issues when using CEF

PostPosted: Mon May 11, 2020 8:54 pm
by naoki5
reCAPTCHA will not work if user agent has changed.
Because of that reCAPTCHA didn't work in my application.
There seem to be some other conditions.

Re: reCAPTCHA issues when using CEF

PostPosted: Tue May 12, 2020 12:17 am
by amaitland
You can load https://recaptcha-demo.appspot.com/reca ... scores.php in different browsers to see what score they've given.

Re: reCAPTCHA issues when using CEF

PostPosted: Tue May 12, 2020 11:14 am
by magreenblatt
amaitland wrote:You can load https://recaptcha-demo.appspot.com/reca ... scores.php in different browsers to see what score they've given.

Interesting link. I'm getting the same results with cefclient 80.1.15+g7b802c9+chromium-80.0.3987.163, cefclient 81.3.5+gb547de9+chromium-81.0.4044.138 and Google Chrome 81.0.4044.138 (Official Build) (64-bit) on Windows 10. I wonder what would cause a worse result (maybe a really old Chromium version, or some networks-specific conditional like IP address range?).

{
"success": true,
"hostname": "recaptcha-demo.appspot.com",
"challenge_ts": "2020-05-12T16:07:42Z",
"apk_package_name": null,
"score": 0.9,
"action": "examples/v3scores",
"error-codes": []
}

Re: reCAPTCHA issues when using CEF

PostPosted: Tue May 12, 2020 11:17 am
by magreenblatt
I get a different (worse?) score in the current version of Firefox (76.0.1 (64-bit)).

{
"success": true,
"hostname": "recaptcha-demo.appspot.com",
"challenge_ts": "2020-05-12T16:16:13Z",
"apk_package_name": null,
"score": 0.7,
"action": "examples/v3scores",
"error-codes": []
}

Re: reCAPTCHA issues when using CEF

PostPosted: Tue May 12, 2020 1:09 pm
by Czarek
reCaptcha score depends on IP address, browser cookies and possibly other things. It can quickly change if you make too many queries from that ip address and restarts back to good score after some time.

Re: reCAPTCHA issues when using CEF

PostPosted: Tue May 12, 2020 2:26 pm
by amaitland
A few years ago CefSharp was scoring a 0.1 which made it totally impossible to solve, cefclient in comparison was scoring a 0.7 which was harder to solve than chrome, still usable. Turns out they were fingerprinting CefSharp specifically based on a v8 extension(CefRegisterExtension).

From memory CEF's score improved when mp3 patent expired and default builds include support (the accessible recaptch was an mp3 audio file).

I'd be testing with cefclient on the OPs machine to see what score they're given.

Re: reCAPTCHA issues when using CEF

PostPosted: Wed May 13, 2020 3:54 pm
by charles
Update: Google states reCaptcha is only supported on the last 2 browser versions of Chrome. Since updating to Chromium 81 (using the latest Spotify build) I'm now getting 0.9 as my CEF score. This is with the default Chrome user agent string. Before I was using 79 and that wouldn't even load the captcha.