Lightweight port scanner CLI tool written in Go
Pull the latest image:
docker pull omercengel/port-scanner:latestRun the container:
docker run --rm omercengel/port-scanner -hClone the repository:
git clone https://github.com/omercengel/port-scanner.gitChange directory:
cd port-scannerBuild image from Dockerfile:
docker build -t port-scanner .Run the container:
docker run --rm port-scanner -hThis project requires Go 1.25 or later to build from source.
Clone the repository:
git clone https://github.com/omercengel/port-scanner.gitChange directory:
cd port-scannerBuild the binary:
go build -o port-scanner ./cmd/main.goRun the binary:
./port-scanner -hdocker run --rm -v /path/to/your/output:/output port-scanner -a 192.168.1.134docker run --rm -v /path/to/your/output:/output port-scanner -a 192.168.1.134 -p 1-1024 -m stealthdocker run --rm -v /path/to/your/output:/output port-scanner -a 192.168.1.134 -p 80,443 -o results -f json./port-scanner -a 192.168.1.134./port-scanner -a 192.168.1.134 -p 1-1024 -m stealth./port-scanner -a 192.168.1.134 -p 80,443 -o results -f json| Flag | Short | Type | Required | Default | Description |
|---|---|---|---|---|---|
address |
-a |
string | true |
- | domain or ip address |
ports |
-p |
string | false |
1-65535 | range: 1-1024 or list: 80,443 |
mode |
-m |
string | false |
default | stealth, default, rapid |
output |
-o |
string | false |
YYYY-MM-DD_HH:MM:SS | output file name |
format |
-f |
string | false |
txt | txt, json, csv |
timeout |
-t |
int | false |
mode's timeout | timeout per port in milliseconds |
Contributions are welcome! Whether you want to fix bugs, add new features, improve documentation, you can contribute to this project by following these steps:
Click the "Fork" button at the top-right of the repo page to create your own copy.
git clone https://github.com/your-username/port-scanner.gitcd port-scannergit checkout -b feature-or-bugfix-name- Fix bugs, add features, or update documentation.
- Keep your code clean and follow existing formatting conventions.
git add .git commit -m "Brief description of changes"git push origin feature-or-bugfix-name- Go to the original repository on GitHub and click "Compare & pull request".
- Provide a clear description of your changes and submit the PR.
This project is licensed under the MIT License.
For details, see the LICENSE file.