vvanglro / cf-clearance

Purpose To make a cloudflare v2 challenge pass successfully, Can be use cf_clearance bypassed by cloudflare, However, with the cf_clearance, make sure you use the same IP and UA as when you got it.
https://github.com/vvanglro/cf_clearance
353 stars 58 forks source link

feat: add new type of challege button inside a frame #34

Closed unsciorg closed 1 year ago

vvanglro commented 1 year ago

@unsciorg Hi, I have helped you improve the PR, do you think this code change is okay?

vvanglro commented 1 year ago

We just need to determine whether there is a clickable element in frame.

  for target_frame in page.main_frame.child_frames:
      click = await target_frame.query_selector("xpath=//input[@type='checkbox']")
      if click:
          await click.click()
unsciorg commented 1 year ago

I think this method of judgment seems somewhat imprecise. We should check if the URL of the iframe contains "challenge.cloudxxxx.com". To avoid detection. Therefore, we will only check for the presence of "challenge" in the URL.

How do you think?

vvanglro commented 1 year ago

I think this method of judgment seems somewhat imprecise. We should check if the URL of the iframe contains "challenge.cloudxxxx.com". To avoid detection. Therefore, we will only check for the presence of "challenge" in the URL.

Makes sense, I'll add that.

unsciorg commented 1 year ago

ok, thanks for your project 👍

vvanglro commented 1 year ago

Added: https://github.com/vvanglro/cf-clearance/pull/36