cf-scanner is a simple, human-friendly multi-threaded IP range scanner. It quickly checks which hosts in a range are alive and whether their HTTP (port 80) and HTTPS (port 443) services are reachable, and shows everything in a clean, aligned terminal table.
- ICMP ping to detect live hosts
- TCP port 80 (HTTP) and TCP port 443 (HTTPS) checks
- Clean terminal table with proper row numbering (1, 2, 3, …)
- Saves live IPs to
actives.txt - Multi-threaded for faster scanning
- Includes a ready-made
hosts.txtfile with all Cloudflare IP ranges → you can scan all Cloudflare IPs just by entering this file name
- Author: Matin
- Telegram-Channel: A Hunter
project/
├── scanner.py
├── hosts.txt # Full Cloudflare IP ranges
└── modules/
├── __init__.py
├── banner.py
├── ip.py
├── ip_reader.py
├── ping_scanner.py
├── port_checker.py
├── domain_resolver.py
├── create_result.py
├── screen_display.py
├── scan_worker.py
└── state_reporter.py
- Python 3.9+
- colorama for colored terminal output:
pip install colorama- OS: Tested on Windows, should work on any OS with Python and
ping.
The project includes a hosts.txt file that contains all Cloudflare IP ranges.
To scan all Cloudflare IPs:
- Make sure
hosts.txtis in the same directory asscanner.py. - When the scanner asks for the range file name, simply type:
hosts.txt
The scanner will go through all Cloudflare IPs from hosts.txt and:
- show the result in the table,
- save all live IPs into
actives.txt.
This method is for when you host the code in a Git repository (GitHub, GitLab, etc.).
git clone https://github.com/hu-matin/cf-scanner.git
cd cf-scannerIf you have a requirements.txt:
pip install -r requirements.txtOption A – your own ranges
Create a text file, e.g. ranges.txt, and put one range per line.
In this simple version, each line is assumed to be a /24 block:
3.25.205.0/24
10.0.0.0/24
Option B – Cloudflare
Just use the included hosts.txt file – no extra work needed.
python scanner.pyThen:
- To scan your own ranges, enter:
ranges.txt - To scan Cloudflare IPs, enter:
hosts.txt - Choose thread count (e.g. 50, or press Enter for default)
Example output:
[#] IP address PING P80 P443 DOMAIN
────────────────────────────────────────────────────────
[ 1] 3.25.205.10 OK OPEN CLOSE example.com
[ 2] 3.25.205.11 FAIL CLOSE CLOSE no-domain
...
All live hosts will also be saved in actives.txt.
If you received the project as a ZIP file (from Telegram, web, etc.):
- Place the ZIP (e.g.
cf-scanner.zip) somewhere (like Desktop) - Right click → Extract All... (or use WinRAR / 7-Zip)
- Go into the extracted folder – you should see
cf-scanner.py,hosts.txtandmodules/.
On Windows:
- Click the path bar in Explorer, type
cmd, press Enter or - Shift + Right Click → Open PowerShell window here
With requirements.txt:
pip install -r requirements.txt- For your own IP ranges: create
ranges.txtand add your ranges (one per line). - For Cloudflare: simply use the provided
hosts.txtas-is.
python scanner.pyThen:
- For Cloudflare scan → enter:
hosts.txt - For your own ranges → enter:
ranges.txt(or whatever filename you chose) - Set thread count
You’ll see the live, ordered table in the terminal, and actives.txt will contain all responding hosts.
- Want slower but more stable scans? Use fewer threads (e.g. 10).
- Need faster scans on a strong network? Increase the thread count, but watch your network load.
- You can reuse
actives.txtas input for other tools or for further analysis. - For a quick Cloudflare health check, just always use
hosts.txtas the range file.
For bugs, ideas, or contributions, feel free to reach out:
- Matin – Telegram: Matin