Port Scanner
This is a simple terminal application that allows you to find opened ports on your network.
Inspired by nmap
Setup
First, you need to download Go
Then clone this repository:
git clone https://github.com/0l1v3rr/port-scanner.git
cd port-scanner
On Linux or Mac, use the make run
command, to run the app.
On Windows: go run cmd\port-scanner\main.go
Flags
--protocol
-> tcp/udp - default is tcp.
Example usage: go run cmd\port-scanner\main.go --protocol udp
--ip
-> The IP address you want to scan. Default is your device's IP.
Example usage: go run cmd\port-scanner\main.go --ip 192.168.0.1
--port
-> The only port you want to scan. By default, the app will scan the most known ports.
Example usage: go run cmd\port-scanner\main.go --port 443
--closed
-> With this flag, the app won't show the closed ports.
Example usage: go run cmd\port-scanner\main.go --closed
--all
-> With this flag, the app will scan all the ports from 1 to 65535.
Example usage: go run cmd\port-scanner\main.go --all
--dialtime
-> The dial timeout you want to use.
Example usage: go run cmd\port-scanner\main.go --dialtime 10
--domain
-> The domain name you want to scan. Overrides the --ip flag.
Example usage: go run cmd\port-scanner\main.go --domain google.com
You can combine the flags.
For example: go run cmd\port-scanner\main.go --ip 192.168.0.1 --port 23
The line above means that you are scanning port 23 of IP 192.168.0.1.
Use anywhere as a command
For example on Linux, open a terminal and type this command:
nano ~/.profile
Now scroll to the bottom and paste this:
export PATH="$PATH:/usr/local/port-scanner/bin"
This is just an example, you should use your own path.