69 lines
1.6 KiB
Markdown
69 lines
1.6 KiB
Markdown
# Portus
|
|
|
|
Portus checks a range of ports on multiple hosts and can list the open ports in a log file.
|
|
|
|
## Usage
|
|
|
|
```bash
|
|
Usage of portus:
|
|
-D Debug mode
|
|
-d Start in daemon mode to scan all IPs continuously
|
|
-i string
|
|
File containing list of IPs (default "ips.txt")
|
|
-l string
|
|
Directory to store logs
|
|
-p string
|
|
Ports to scan (default "1-1024")
|
|
-t int
|
|
Timeout in milliseconds (default 200)
|
|
-w int
|
|
Wait time between scans in milliseconds (default 2000)
|
|
```
|
|
|
|
## Installation
|
|
|
|
This is an example of installation on an amd64 Linux system with systemd.
|
|
|
|
Download the binary and the systemd service file:
|
|
```bash
|
|
wget https://git.rznet.fr/tchivert/portus/releases/download/latest/portus-linux-amd64 -O /usr/local/bin/portus
|
|
chmod +x /usr/local/bin/portus
|
|
```
|
|
|
|
If you want to use the systemd service file, download it:
|
|
```bash
|
|
wget https://git.rznet.fr/tchivert/portus/raw/branch/main/systemd/portus.service -O /etc/systemd/system/portus.service
|
|
```
|
|
|
|
Or configure a cron job to use portus without daemon mode:
|
|
```bash
|
|
crontab -e
|
|
0 */6 * * * /usr/local/bin/portus -i /etc/portus/ips.txt -l /var/log/portus -p 1-10000
|
|
```
|
|
|
|
Create the logs and configuration directories:
|
|
```bash
|
|
mkdir /var/log/portus
|
|
mkdir /etc/portus
|
|
```
|
|
|
|
Add your IPs list in the `ips.txt` file:
|
|
```bash
|
|
vim /etc/portus/ips.txt
|
|
```
|
|
|
|
Edit the systemd service if needed, then enable and start it:
|
|
```bash
|
|
vim /etc/systemd/system/portus.service
|
|
systemctl enable --now portus
|
|
```
|
|
|
|
## Build
|
|
```bash
|
|
go build -o portus
|
|
```
|
|
|
|
## License
|
|
|
|
This project is licensed under the MIT License. See the [LICENSE](https://git.rznet.fr/tchivert/portus/src/branch/main/LICENSE) file for more information.
|