zfcsoftware / cf-clearance-scraper

This package provides an api that returns cookies (cf-clearance) that you can request on a website protected by Cloudflare WAF (corporate or normal) without being blocked by WAF.
MIT License
91 stars 7 forks source link

getting error 403 #1

Closed XenaMery closed 1 month ago

XenaMery commented 1 month ago

Hey, hope you're doing great , your script works perfectly fine it retreives thes cookies but when i use them i always get 403

zfcsoftware commented 1 month ago

Hello, Cloudflare does not only check cookies. It also checks accept-language, accept, host, origin, user-agent information in the header. I will release an update to return this information from the header.

zfcsoftware commented 1 month ago

@XenaMery The library has been updated, please check again. The language list received with Cloudflare navigator.languages checks if there is accept-language value in the request header. This is why you cannot pass Cloudflara WAF especially on the enterprise plan. Updated library and tested on enterprise plan Captcha. If you use the headers object in the response when sending a request, you will not have a problem. I have done a lot of testing and there does not seem to be a problem. Please check it.

image

XenaMery commented 1 month ago

@zfcsoftware hey man thank you for your recent update , it's really helpful we've tried it & it works we no longer get 403 , we do sometimes but it's related to proxies . Thank you

zfcsoftware commented 1 month ago

@zfcsoftware hey man thank you for your recent update , it's really helpful we've tried it & it works we no longer get 403 , we do sometimes but it's related to proxies . Thank you

Thank you for your feedback.