Skip to content

redhatua/PScanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

PScanner

A minimal TCP port scanner written in Go.

Usage

pscanner -h <host> -p <ports>
Flag Description
-h Target host (hostname or IP)
-p Port specification (see formats below)

Port formats

Format Example Description
Single 80 One port
List 80,443,8080 Comma-separated ports
Range 8000-8080 Inclusive range
Mixed 22,80,8000-8080 Any combination

Examples

# Single port
pscanner -h example.com -p 80

# Common web ports
pscanner -h 192.168.1.1 -p 80,443,8080,8443

# Port range
pscanner -h 10.0.0.1 -p 1-1024

# Mixed
pscanner -h example.com -p 22,80,443,8000-9000

Output

Each non-closed port is logged with its state:

  • Open — connection accepted
  • Filtered — connection timed out (firewall likely present)

Closed ports are suppressed. A summary line shows total ports scanned and elapsed time.

2026/06/27 12:00:00 Scanned 1024 ports in 3.42 seconds
2026/06/27 12:00:00 Port 22 Open
2026/06/27 12:00:00 Port 80 Open
2026/06/27 12:00:00 Port 443 Open

Build

cd src
go build -o pscanner scanner.go

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages