yoori / flare-bypasser

Server to bypass CloudFlare protection (solve challenges after Oct 2024)
MIT License
29 stars 9 forks source link

DDos-Guard error looping #10

Closed judyynailss closed 6 days ago

judyynailss commented 1 week ago

Hey there,

I've been trying to find a replacement for FlareSolverr since it hasn't been working with SimpCity and the sites it links to, which almost all use DDoS-Guard. If I try to run things through the proxy, I get this back.

2024-11-08 19:50:35 flare-bypasser  | Download chrome by url: https://storage.googleapis.com/chrome-for-testing-public/130.0.6669.0/linux64/chrome-linux64.zip
2024-11-08 19:50:41 flare-bypasser  | Run server (extensions = )
2024-11-08 19:50:41 flare-bypasser  | [2024-11-09 02:50:41 +0000] [24] [INFO] Starting gunicorn 23.0.0
2024-11-08 19:50:41 flare-bypasser  | [2024-11-09 02:50:41 +0000] [24] [INFO] Listening at: http://0.0.0.0:8080 (24)
2024-11-08 19:50:41 flare-bypasser  | [2024-11-09 02:50:41 +0000] [24] [INFO] Using worker: uvicorn.workers.UvicornWorker
2024-11-08 19:50:41 flare-bypasser  | [2024-11-09 02:50:41 +0000] [41] [INFO] Booting worker with pid: 41
2024-11-08 19:50:42 flare-bypasser  | [2024-11-09 02:50:42 +0000] [41] [INFO] Started server process [41]
2024-11-08 19:50:42 flare-bypasser  | [2024-11-09 02:50:42 +0000] [41] [INFO] Waiting for application startup.
2024-11-08 19:50:42 flare-bypasser  | [2024-11-09 02:50:42 +0000] [41] [INFO] Application startup complete.
2024-11-08 19:52:29 flare-bypasser  | 2024-11-09 02:52:29,140 [nodriver.core.browser] [INFO]: starting
2024-11-08 19:52:29 flare-bypasser  |   executable :/usr/bin/chrome
2024-11-08 19:52:29 flare-bypasser  | 
2024-11-08 19:52:29 flare-bypasser  | arguments:
2024-11-08 19:52:29 flare-bypasser  | --remote-allow-origins=*
2024-11-08 19:52:29 flare-bypasser  |   --no-first-run
2024-11-08 19:52:29 flare-bypasser  |   --no-service-autorun
2024-11-08 19:52:29 flare-bypasser  |   --no-default-browser-check
2024-11-08 19:52:29 flare-bypasser  |   --homepage=about:blank
2024-11-08 19:52:29 flare-bypasser  |   --no-pings
2024-11-08 19:52:29 flare-bypasser  |   --password-store=basic
2024-11-08 19:52:29 flare-bypasser  |   --disable-infobars
2024-11-08 19:52:29 flare-bypasser  |   --disable-breakpad
2024-11-08 19:52:29 flare-bypasser  |   --disable-component-update
2024-11-08 19:52:29 flare-bypasser  |   --disable-backgrounding-occluded-windows
2024-11-08 19:52:29 flare-bypasser  |   --disable-renderer-backgrounding
2024-11-08 19:52:29 flare-bypasser  |   --disable-background-networking
2024-11-08 19:52:29 flare-bypasser  |   --disable-dev-shm-usage
2024-11-08 19:52:29 flare-bypasser  |   --disable-features=IsolateOrigins,site-per-process
2024-11-08 19:52:29 flare-bypasser  |   --disable-session-crashed-bubble
2024-11-08 19:52:29 flare-bypasser  |   --disable-search-engine-choice-screen
2024-11-08 19:52:29 flare-bypasser  |   --user-data-dir=/tmp/uc_o7tg3a49
2024-11-08 19:52:29 flare-bypasser  |   --disable-features=IsolateOrigins,site-per-process
2024-11-08 19:52:29 flare-bypasser  |   --disable-session-crashed-bubble
2024-11-08 19:52:29 flare-bypasser  |   --no-sandbox
2024-11-08 19:52:29 flare-bypasser  |   --remote-debugging-host=127.0.0.1
2024-11-08 19:52:29 flare-bypasser  |   --remote-debugging-port=39347
2024-11-08 19:52:29 flare-bypasser  | 2024-11-09 02:52:29,905 [nodriver.core.browser] [INFO]: enabling autodiscover targets
2024-11-08 19:52:29 flare-bypasser  | CDP: send message (0): "{\"method\": \"Target.setDiscoverTargets\", \"params\": {\"discover\": true}, \"id\": 0}"
2024-11-08 19:52:29 flare-bypasser  | CDP: got message: {"method": "Target.targetCreated", "params": {"targetInfo": {"targetId": "6DC3284595668ADFC2333608A6AF8B83", "type": "page", "title": "New Tab", "url": "chrome://newtab/", "attached": false, "canAccessOpener": false, "browserContextId": "A150880DB84067FEFF136FF53E48ECE6"}}}
2024-11-08 19:52:29 flare-bypasser  | CDP: got message: {"id": 0, "result": {}}
2024-11-08 19:52:29 flare-bypasser  | CDP: send message (2): "{\"method\": \"Target.getTargets\", \"params\": {}, \"id\": 2}"
2024-11-08 19:52:29 flare-bypasser  | CDP: got message: {"id": 2, "result": {"targetInfos": [{"targetId": "6DC3284595668ADFC2333608A6AF8B83", "type": "page", "title": "New Tab", "url": "chrome://newtab/", "attached": false, "canAccessOpener": false, "browserContextId": "A150880DB84067FEFF136FF53E48ECE6"}]}}
2024-11-08 19:52:29 flare-bypasser  | 2024-11-09 02:52:29,915 [root] [INFO]: New instance of webdriver has been created to perform the request (proxy=None), timeout=60.0
2024-11-08 19:52:29 flare-bypasser  | CDP: got message: {"method": "Target.targetInfoChanged", "params": {"targetInfo": {"targetId": "6DC3284595668ADFC2333608A6AF8B83", "type": "page", "title": "New Tab", "url": "chrome://newtab/", "attached": true, "canAccessOpener": false, "browserContextId": "A150880DB84067FEFF136FF53E48ECE6"}}}
2024-11-08 19:52:29 flare-bypasser  | CDP: send message (0): "{\"method\": \"Page.navigate\", \"params\": {\"url\": \"https://simpcity.su/threads/essaere.11363\"}, \"id\": 0}"
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: got message: {"id": 0, "result": {"frameId": "6DC3284595668ADFC2333608A6AF8B83", "loaderId": "4B0352257F673F04273A7AD57B282746"}}
2024-11-08 19:52:30 flare-bypasser  | CDP: send message (0): "{\"method\": \"Target.getTargetInfo\", \"params\": {\"targetId\": \"6DC3284595668ADFC2333608A6AF8B83\"}, \"id\": 0}"
2024-11-08 19:52:30 flare-bypasser  | CDP: got message: {"id": 0, "result": {"targetInfo": {"targetId": "6DC3284595668ADFC2333608A6AF8B83", "type": "page", "title": "New Tab", "url": "", "attached": true, "canAccessOpener": false, "browserContextId": "A150880DB84067FEFF136FF53E48ECE6"}}}
2024-11-08 19:52:30 flare-bypasser  | CDP: got message: {"method": "Target.targetInfoChanged", "params": {"targetInfo": {"targetId": "6DC3284595668ADFC2333608A6AF8B83", "type": "page", "title": "simpcity.su/threads/essaere.11363", "url": "https://simpcity.su/threads/essaere.11363", "attached": true, "canAccessOpener": false, "browserContextId": "A150880DB84067FEFF136FF53E48ECE6"}}}
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: send message (0): "{\"method\": \"Target.getTargetInfo\", \"params\": {\"targetId\": \"6DC3284595668ADFC2333608A6AF8B83\"}, \"id\": 0}"
2024-11-08 19:52:30 flare-bypasser  | CDP: got message: {"id": 0, "result": {"targetInfo": {"targetId": "6DC3284595668ADFC2333608A6AF8B83", "type": "page", "title": "DDoS-Guard", "url": "https://simpcity.su/threads/essaere.11363", "attached": true, "canAccessOpener": false, "browserContextId": "A150880DB84067FEFF136FF53E48ECE6"}}}
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: send message (0): "{\"method\": \"Page.captureScreenshot\", \"params\": {\"format\": \"jpeg\", \"captureBeyondViewport\": false}, \"id\": 0}"
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:30 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: got message: {"id": 0, "result": {"data": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAA........

It then spits out a ton of data, followed by this.

2024-11-08 19:52:31 flare-bypasser  | CDP: send message (0): "{\"method\": \"DOM.getDocument\", \"params\": {\"depth\": -1, \"pierce\": true}, \"id\": 0}"
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:31 flare-bypasser  | CDP: recv timeout
2024-11-08 19:52:32 flare-bypasser  | CDP: got message: {"id": 0, "result": {"root": {"nodeId": 1, "backendNodeId": 1, "nodeType": 9, "nodeName": "#document", "localName": "", "nodeValue": "", "childNodeCount": 2, "children": [{"nodeId": 2, "parentId": 1, "backendNodeId": 5, "nodeType": 10,

Then a lot more data is spat out. Followed by this.

2024-11-08 19:52:32 flare-bypasser  | CDP: send message (0): "{\"method\": \"DOM.getOuterHTML\", \"params\": {\"backendNodeId\": 1}, \"id\": 0}"
2024-11-08 19:52:32 flare-bypasser  | CDP: got message: {"id": 0, "result": {"outerHTML": "<!DOCTYPE html><html><head><title>DDoS-Guard</title><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><link rel=\"stylesheet\" href=\"/.well-known/ddos-guard/js-challenge/index.css\"><script defer=\"defer\" src=\"/.well-known/ddos-guard/js-challenge/view.js\"></script><script defer=\"defer\" src=\"/.well-known/ddos-guard/js-challenge/index.js\"></script><script src=\"https://check.ddos-guard.net/check.js\"></script></head><body data-ddg-origin=\"true\" data-ddg-l10n=\"true\"><div class=\"container\"><div class=\"top\"><h1 id=\"ddg-l10n-title\">Checking your browser before accessing <span class=\"ddg-origin\">simpcity.su</span></h1><p id=\"ddg-l10n-description\">Please wait a few seconds. Once this check is complete, the website will open automatically</p><img id=\"ddg-img-loading\" src=\"data:image/svg+xml;base64,(bunch of data)\" alt=\"loading\"></div><div class=\"bottom\"><span id=\"request-info\" class=\"bottom-text\">Request ID: 1IRgZIK9lsv7x9hW | IP: ************* | Time: 2024-11-09 02:52:29 UTC</span> <span class=\"bottom-text\" id=\"ddg-l10n-link-text\">Protected by <a href=\"https://ddos-guard.net/en?utm_source=simpcity.su&amp;utm_medium=preloader\" target=\"_blank\" id=\"ddg-link\">DDoS-Guard</a></span></div></div></body></html>"}}
2024-11-08 19:52:32 flare-bypasser  | 2024-11-09 02:52:32,037 [root] [INFO]: Screenshot saved to '0_evil_logic'
2024-11-08 19:52:32 flare-bypasser  | CDP: send message (0): "{\"method\": \"DOM.getDocument\", \"params\": {\"depth\": -1, \"pierce\": true}, \"id\": 0}"
2024-11-08 19:52:32 flare-bypasser  | CDP: got message: {"id": 0, "result": {"root": {"nodeId": 35, "backendNodeId": 1, "nodeType": 9, "nodeName": "#document", "localName": "", "nodeValue": "", "childNodeCount": 2, "children": [{"nodeId": 36, "parentId": 35, "backendNodeId": 5, "nodeType": 10, "nodeName": "html".......

And it just keeps going and going, more or less just looping attempting to verify, struggling in some capacity and then pausing on recv timeouts a lot. I'm sure there are a lot of steps it tried to go through that I wasn't able to copy, or overlooked, but if you try it with simpcity.su you'll see what I'm talking about.

yoori commented 1 week ago

Please, try latest version, by presence of CDP messages looks like you got intermediate debug version with bugs ....

judyynailss commented 1 week ago

I've tried redownloading it as a zip and rebuilding, and cloning into WSL and building it under there, and had the same issues on both.

After it gives up, these are the most recent messages in my log.

2024-11-10 05:29:33 flare-bypasser  | CDP: recv timeout
2024-11-10 05:29:33 flare-bypasser  | CDP: recv timeout
2024-11-10 05:29:33 flare-bypasser  | CDP: recv timeout
2024-11-10 05:29:33 flare-bypasser  | CDP: recv timeout
2024-11-10 05:29:33 flare-bypasser  | CDP: recv timeout
2024-11-10 05:29:33 flare-bypasser  | CDP: recv timeout
2024-11-10 05:29:33 flare-bypasser  | CDP: recv timeout
2024-11-10 05:29:33 flare-bypasser  | CDP: recv timeout
2024-11-10 05:29:33 flare-bypasser  | CDP: recv timeout
2024-11-10 05:29:34 flare-bypasser  | CDP: recv timeout
2024-11-10 05:29:34 flare-bypasser  | CDP: recv timeout
2024-11-10 05:29:34 flare-bypasser  | 2024-11-10 12:29:34,140 [root] [INFO]: Close webdriver
2024-11-10 05:29:34 flare-bypasser  | 2024-11-10 12:29:34,140 [nodriver.core.browser] [INFO]: terminated browser with pid 45 successfully
2024-11-10 05:29:34 flare-bypasser  | Processing timeout (max_timeout=60.0)
2024-11-10 05:29:34 flare-bypasser  | Traceback (most recent call last):
2024-11-10 05:29:34 flare-bypasser  |   File "/usr/local/lib/python3.11/site-packages/flare_bypasser/flare_bypasser.py", line 224, in solve
2024-11-10 05:29:34 flare-bypasser  |     res = await self._resolve_challenge(req)
2024-11-10 05:29:34 flare-bypasser  |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-11-10 05:29:34 flare-bypasser  |   File "/usr/local/lib/python3.11/site-packages/flare_bypasser/flare_bypasser.py", line 253, in _resolve_challenge
2024-11-10 05:29:34 flare-bypasser  |     return await self._resolve_challenge_impl(req, start_time)
2024-11-10 05:29:34 flare-bypasser  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-11-10 05:29:34 flare-bypasser  |   File "/usr/local/lib/python3.11/site-packages/flare_bypasser/flare_bypasser.py", line 401, in _resolve_challenge_impl
2024-11-10 05:29:34 flare-bypasser  |     await self._challenge_wait_and_click_loop()
2024-11-10 05:29:34 flare-bypasser  |   File "/usr/local/lib/python3.11/site-packages/flare_bypasser/flare_bypasser.py", line 342, in _challenge_wait_and_click_loop
2024-11-10 05:29:34 flare-bypasser  |     await asyncio.sleep(_SHORT_TIMEOUT)
2024-11-10 05:29:34 flare-bypasser  |   File "/usr/local/lib/python3.11/asyncio/tasks.py", line 649, in sleep
2024-11-10 05:29:34 flare-bypasser  |     return await future
2024-11-10 05:29:34 flare-bypasser  |            ^^^^^^^^^^^^
2024-11-10 05:29:34 flare-bypasser  | asyncio.exceptions.CancelledError
2024-11-10 05:29:34 flare-bypasser  | 
2024-11-10 05:29:34 flare-bypasser  | The above exception was the direct cause of the following exception:
2024-11-10 05:29:34 flare-bypasser  | 
2024-11-10 05:29:34 flare-bypasser  | Traceback (most recent call last):
2024-11-10 05:29:34 flare-bypasser  |   File "/usr/local/lib/python3.11/site-packages/flare_bypasser/flare_bypasser.py", line 223, in solve
2024-11-10 05:29:34 flare-bypasser  |     async with asyncio.timeout(req.max_timeout):
2024-11-10 05:29:34 flare-bypasser  |   File "/usr/local/lib/python3.11/asyncio/timeouts.py", line 115, in __aexit__
2024-11-10 05:29:34 flare-bypasser  |     raise TimeoutError from exc_val
2024-11-10 05:29:34 flare-bypasser  | TimeoutError
2024-11-10 05:29:34 flare-bypasser  | 
2024-11-10 05:29:34 flare-bypasser  | During handling of the above exception, another exception occurred:
2024-11-10 05:29:34 flare-bypasser  | 
2024-11-10 05:29:34 flare-bypasser  | Traceback (most recent call last):
2024-11-10 05:29:34 flare-bypasser  |   File "/usr/local/lib/python3.11/site-packages/flare_bypasser/flare_bypass_server.py", line 82, in process_solve_request
2024-11-10 05:29:34 flare-bypasser  |     solve_response = await solver.solve(solve_request)
2024-11-10 05:29:34 flare-bypasser  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-11-10 05:29:34 flare-bypasser  |   File "/usr/local/lib/python3.11/site-packages/flare_bypasser/flare_bypasser.py", line 227, in solve
2024-11-10 05:29:34 flare-bypasser  |     raise Exception("Processing timeout (max_timeout=" + str(req.max_timeout) + ")")
2024-11-10 05:29:34 flare-bypasser  | Exception: Processing timeout (max_timeout=60.0)
2024-11-10 05:29:34 flare-bypasser  | 
2024-11-10 05:29:34 flare-bypasser  | CDP: got message: {"method": "Inspector.detached", "params": {"reason": "Render process gone."}}
2024-11-10 05:29:34 flare-bypasser  | CDP: recv error: no close frame received or sent
yoori commented 6 days ago

It is hCaptcha protection (not flare) I improved for correctly detect checkbox position for hCaptcha, but project isn't intended to solve hCaptcha challenge if it will appears.