Skip to content

Crimson-blue/Async-Scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ Async TCP Port Scanner

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.


πŸ“¦ Features

  • πŸš€ Asynchronous TCP scanner with high concurrency
  • πŸ” TLS support (manual, auto-detect, and fallback)
  • πŸͺͺ Banner grabbing (HTTP, SMTP, IMAP, Redis probes)
  • πŸ“Š JSON output (lines or array format)
  • 🎯 CIDR & IP range scanning
  • ⚑ Rate limiting (token bucket algorithm)
  • πŸ”„ Fallback to plain TCP on TLS failure

πŸ› οΈ Prerequisites

Install Python 3.8+:

sudo apt update && sudo apt install python3 python3-pip -y

No external dependencies are required (standard library only).


🐍 Running Locally

Clone the repo:

git clone https://github.com/YourUsername/async-port-scanner.git
cd async-port-scanner
chmod +x scanner.py

Run a simple scan:

python3 scanner.py --ips 127.0.0.1 --ports 22,80,443

πŸ“– Examples

πŸ” Scan a single host

python3 scanner.py --ips 192.168.1.10 --ports 22,80,443

🌐 Scan a CIDR range

python3 scanner.py --cidr 10.0.0.0/28 --ports 1-1024

🎲 Shuffle targets & rate-limit

python3 scanner.py --cidr 192.168.1.0/24 --ports 80,443 --shuffle --rate 100 --burst 200

πŸ” TLS auto mode with fallback

python3 scanner.py --ips example.com --ports 443,8443 --mode auto --fallback-plain

πŸ’Ύ Save results to JSON

python3 scanner.py --ips 192.168.1.10 --ports 22,80 --output scan_results.json --format array

πŸ“Š Output

Example 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}

⚑ Quick Start

For a quick test on your own machine:

python3 scanner.py --ips 127.0.0.1 --ports 22,80,443 --probe

FYI

If you wanna run directly without terminal(not recommended) create a workspace folder and edit the launch.json file given in the folder



About

My domain based projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages