Async TCP Port Scanner is a high-performance, asynchronous scanner built in Python.
It supports plain TCP & TLS, CIDR/IP scanning, banner grabbing, rate limiting, and JSON output β all powered by Pythonβs asyncio.
- π Asynchronous TCP scanner with high concurrency
- π TLS support (manual, auto-detect, and fallback)
- πͺͺ Banner grabbing (HTTP, SMTP, IMAP, Redis probes)
- π JSON output (
linesorarrayformat) - π― CIDR & IP range scanning
- β‘ Rate limiting (token bucket algorithm)
- π Fallback to plain TCP on TLS failure
Install Python 3.8+:
sudo apt update && sudo apt install python3 python3-pip -yNo external dependencies are required (standard library only).
Clone the repo:
git clone https://github.com/YourUsername/async-port-scanner.git
cd async-port-scanner
chmod +x scanner.pyRun a simple scan:
python3 scanner.py --ips 127.0.0.1 --ports 22,80,443python3 scanner.py --ips 192.168.1.10 --ports 22,80,443python3 scanner.py --cidr 10.0.0.0/28 --ports 1-1024python3 scanner.py --cidr 192.168.1.0/24 --ports 80,443 --shuffle --rate 100 --burst 200python3 scanner.py --ips example.com --ports 443,8443 --mode auto --fallback-plainpython3 scanner.py --ips 192.168.1.10 --ports 22,80 --output scan_results.json --format arrayExample JSON (line format):
{"ip": "192.168.1.10", "port": 22, "state": "open", "is_tls": false, "banner": "SSH-2.0-OpenSSH_8.9p1", "connect_time_ms": 10.5}
{"ip": "192.168.1.10", "port": 80, "state": "open", "is_tls": false, "banner": "HTTP/1.1 200 OK", "connect_time_ms": 8.3}For a quick test on your own machine:
python3 scanner.py --ips 127.0.0.1 --ports 22,80,443 --probeIf you wanna run directly without terminal(not recommended) create a workspace folder and edit the launch.json file given in the folder