A high-performance TCP connect port scanner written in Go using a worker pool concurrency model.
This tool scans a target host for open TCP ports and supports CLI configuration, service detection, and exportable results.
- Concurrent TCP scanning using worker pools
- Configurable number of workers
- Adjustable timeout per connection
- Fast scan mode (reduced timeout)
- Service name detection (common ports)
- Progress indicator during scan
- JSON and CSV export support
- Clean CLI interface
This scanner uses a worker pool architecture:
Main Goroutine
├── Job Channel (ports)
├── Worker Goroutines (TCP scanners)
└── Result Channel (scan results)
Each worker:
1. Receives a port from the job queue
2. Attempts a TCP connection using net.DialTimeout
3. Returns whether the port is open
go run . -host scanme.nmap.orggo run . -host scanme.nmap.org -ports 1-2000go run . -host scanme.nmap.org -workers 200go run . -host scanme.nmap.org -fastCSV:
go run . -host scanme.nmap.org -out results.csvJSON:
go run . -host scanme.nmap.org -json -out results.json====================================
Go Concurrent Port Scanner
====================================
Target : scanme.nmap.org
Ports : 1-1024
Workers : 100
Timeout : 300ms
[OPEN] 22 /tcp ssh
[OPEN] 80 /tcp http
Scanning... 1024/1024 ports
====================================
Scan Complete
====================================
Open Ports : 2
Ports Scanned : 1024
Elapsed Time : 1.7s
- Worker pool concurrency model
- Buffered channels for job distribution
- net.DialTimeout TCP connect scanning
- Atomic counters for safe progress tracking
- Only scan systems you own or are authorized to test
- Some ports may appear closed due to timeout limits
- Fast mode may introduce false negatives
scanme.nmap.org
Provided by Nmap for educational purposes.