TheFalloutOf76 / CDP-bug-MouseEvent-.screenX-.screenY-patcher

68 stars 7 forks source link

CDP bug MouseEvent .screenX .screenY patcher

supports both headless and headful

bug that this fixes: https://issues.chromium.org/issues/40280325

When the CDP command Input.dispatchMouseEvent is ran, the MouseEvent/PointerEvent created will have a "fake" property for .screenX and .screenY (they will be same as the .x and .y properties respectively). Cloudflare Turnstile is able to detect this and will mark you as a bot, and you won't be able to get past (Interstitial) Turnstile.

This extension fixes this by providing fake values for .screenX and .screenY. One downside of this is that now even real clicks will use fake values. However manually clicking in an automated browser is mostly non-existant so its fine, and .screenX and .screenY are rarely used anyways, so it should be fine. Let me know if it breaks something and I'll see if I can fix it.

TL;DR: Chrome has a bug allowing fake clicks to be detected. This extension fixes those detections so you can continue scraping.

how to use

Load the extension in ./turnstilePatch/

tested libraries:

Docker:

status

Gets past Cloudflare Turnstile

turnstile success

for the memes

based web scraper gigachad