makindotcc / FlarelessHeadlessChrome

Pass cloudflare IUAM using headless chrome without hassle. Vercel WAF, friendlycaptcha too, and probably many more.
31 stars 3 forks source link

Not compatible with Playwright/Puppeteer #1

Closed exiutech closed 5 months ago

exiutech commented 6 months ago

(base) PS E:\Test> fabricbin windows_patch.yaml Using config: windows_patch.yaml Input file: E:\Test\chrome_org.dll Patching signature: blink::Navigator::webdriver Error: Could not apply patch to file

Caused by: 0: Could not apply patch blink::Navigator::webdriver 1: Could not find pattern

makindotcc commented 6 months ago

Which chrome version do you want to patch? It works for version (latest) 120.0.6099.200. Can you make sure you copied right chrome file (chrome.dll as chrome_org.dll)?

$ fabricbin windows_patch.yaml
Using config: windows_patch.yaml
Input file: \\?\C:\[...]\flarelessheadlesschrome\chrome_win_x64\120.0.6099.200\chrome_org.dll
Patching signature: blink::Navigator::webdriver
  Pattern found at 5a0a6c0
Patching signature: embedder_support::GetUserAgentInternal headless switch
  Pattern found at d08d55
Patched file successfully.
exiutech commented 6 months ago

I have found some of these: 1.can patch on Chrome 120.0.6099.217(but can`t pass cloudFlare when use playwright connected by cdp ) 2.patch err on ungoogled-chromium 120.0.6099.199-1.1 3..patch err chromium 120.0.6099.216 (download by playwright).

makindotcc commented 6 months ago

iirc I tried using it with puppeeter and it also didn't pass cf but I didn't bother because chromiumoxide works flawlessly.

Both of them (puppeteer and playwright) probably runs some JS before page/iframe load. CF creates proxy on things like document.querySelector etc. maybe this way it gets detected.

If you don't wanna use rust you can try to find pure CDP lib for js like this https://github.com/cyrus-and/chrome-remote-interface

makindotcc commented 6 months ago

Yeah, chrome-remote-interface works. https://github.com/makindotcc/FlarelessHeadlessChrome/assets/9150636/dc690eea-5c1d-4e31-87c8-3359af376e85

exiutech commented 6 months ago

You're really good.Thanks.