Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S-prt-X — fast port scanner written in Go

A lightweight port scanner with banner grabbing. Built for speed using goroutines.

Requirements

  • Go 1.21+

Build

go build -o prt prt.go

Usage

./prt [flags]
Flag Default Description
-h 127.0.0.1 Target host
-p top1000.txt File with port list
-aP off Scan all 65535 ports
-timeout 2s Connection timeout
-t 300 Concurrent threads

Examples

# Scan top 1000 ports
./prt -h scanme.nmap.org

# Scan all ports
./prt -h scanme.nmap.org -aP

# Custom threads and timeout
./prt -h 192.168.1.1 -t 500 -timeout 3s

# Custom port list
./prt -h 192.168.1.1 -p myports.txt

Output

[*] Scanning ports from top1000.txt on scanme.nmap.org
[*] Timeout: 2s, Threads: 300
[*] Starting scan...
[+] scanme.nmap.org:22/tcp open | "SSH-2.0-OpenSSH_6.6.1p1"
[+] scanme.nmap.org:80/tcp open
[*] Scan complete

Notes

  • Banner grabbing works for services that send data on connect (SSH, FTP, SMTP, etc.)
  • Higher -t values speed up the scan but may trigger rate limiting or IDS
  • Port list file should have one port per line

Legal

Only use against systems you have permission to scan.

About

A very fast port scanner for further transmission to nmap

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages