radive15/tcp-port-scanner

GitHub: radive15/tcp-port-scanner

Stars: 0 | Forks: 0

# TCP Port Scanner A simple CLI tool to scan TCP ports on a host. Built with pure Go — no external dependencies. ## Features - Scan a single port on a host - Scan a port range (e.g. 1–1024) - Concurrent scanning with goroutines (much faster) - Control worker count (goroutines) via `-workers` flag - Configurable per-port timeout via `-timeout` flag (in milliseconds) - Output includes total open ports and scan duration ## Installation Make sure [Go](https://go.dev/dl/) 1.21 or later is installed. git clone https://github.com/radive15/tcp-port-scanner.git cd tcp-port-scanner go build -o port-scanner . ## Usage ### Scan a single port ./port-scanner -host scanme.nmap.org -port 80 ### Scan a port range (concurrent, default 100 workers) ./port-scanner -host scanme.nmap.org -start 1 -end 1024 ### Scan with custom worker count # Faster scan ./port-scanner -host scanme.nmap.org -start 1 -end 1024 -workers 200 # More resource-efficient ./port-scanner -host scanme.nmap.org -start 1 -end 1024 -workers 50 ### Scan with custom timeout (in milliseconds) # 300ms timeout — suitable for local or fast networks ./port-scanner -host 192.168.1.1 -start 1 -end 1024 -timeout 300 # 2000ms timeout — suitable for slow or remote networks ./port-scanner -host scanme.nmap.org -start 1 -end 1024 -timeout 2000 ## Example Output Scanning scanme.nmap.org port 1-1024 (workers: 100)... Port 22 OPEN Port 80 OPEN Total: 2 open out of 1024 ports Scan time: 1.043s ## Roadmap - [ ] Stage 1 — Scan a single port via CLI flag - [ ] Stage 2 — Sequential port range scan - [ ] Stage 3 — Concurrent scan with goroutines - [ ] Stage 4 — Configurable per-port timeout via `-timeout` flag ## License MIT License — see [LICENSE](LICENSE)
标签:EVTX分析