/cloudflare-origin-ip

Try to find the origin IP of a webapp protected by Cloudflare.

Primary LanguagePythonMIT LicenseMIT

cloudflare-origin-ip

Try to find the origin IP of a webapp protected by Cloudflare.

python badge MIT license badge twitter badge


Description

This Python tool compares the HTTP response of the given subdomain to HTTP responses of a list of IPs addresses. This list is based on:

  • subdomains supplied by the user
  • subdomains found on external sources
  • IPs found external sources

Then, a score of similarity is calculated for each response using the Levenshtein algorithm.

Install

git clone https://github.com/gwen001/cloudflare-origin-ip
cd cloudflare-origin-ip
pip3 install -r requirements.txt

Usage

$ python3 cloudflare-origin-ip.py <url>
usage: cloudflare-origin-ip.py [-h] [-u URL] [-s SOURCE]

options:
  -h, --help            show this help message and exit
  -u URL, --url URL     url to test
  -s SOURCE, --source SOURCE
                        datas sources separated by coma, can be: censys,crtsh,local file

Examples:
cloudflare-origin-ip.py -u https://xxx.xxxxxxxxxxxx.xxx
cloudflare-origin-ip.py -u https://xxx.xxxxxxxxxxxx.xxx -s censys,crtsh (default)
cloudflare-origin-ip.py -u https://xxx.xxxxxxxxxxxx.xxx -s /home/local/ips.txt
cloudflare-origin-ip.py -u https://xxx.xxxxxxxxxxxx.xxx -s censys,crtsh,/home/local/ips.txt,/home/local/subdomains.txt


Feel free to open an issue if you have any problem with the script.