christophetd / CloudFlair

🔎 Find origin servers of websites behind CloudFlare by using Internet-wide scan data from Censys.
https://blog.christophetd.fr/bypassing-cloudflare-using-internet-wide-scan-data/
2.58k stars 358 forks source link

https://... responded with an unexpected HTTP status code 403 #29

Closed rrhg closed 5 years ago

rrhg commented 5 years ago

... [] Testing candidate origin servers [] Retrieving target homepage at https://....com [-] https://....com responded with an unexpected HTTP status code 403

Is Cloudflare detecting your tool ? I receive the same response when using curl. But visiting the site from the browser works fine. I'm running it with docker, if it makes any difference.

christophetd commented 5 years ago

Most likely related to #14, I assume the initial request is blocked because of the default Python requests user-agent.

christophetd commented 5 years ago

Fixed this in #30. Could you try again and let me know if that solves your issue?

rrhg commented 5 years ago

It gave me same 403 response. This the command I'm running. sudo docker run --rm -e CENSYS_API_ID=mykey -e CENSYS_API_SECRET=mysecret christophetd/cloudflair awebsite.com

christophetd commented 5 years ago

Did you pull the image before running it again?

$ sudo docker pull christophetd/cloudflair
$ sudo docker run --rm -e CENSYS_API_ID=mykey -e CENSYS_API_SECRET=mysecret christophetd/cloudflair awebsite.com
rrhg commented 5 years ago

Now it worked!.