Add TCP port scan persistence and API endpoint.
Probe configured ports for alive hosts, persist port states, and expose scan port results via REST. Made-with: Cursor
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
- `GET /api/scans` - список сканов.
|
||||
- `GET /api/scans/{id}` - просмотр созданного задания.
|
||||
- `GET /api/scans/{id}/hosts` - результаты проверки хостов по скану.
|
||||
- `GET /api/scans/{id}/ports` - результаты проверки TCP-портов по скану.
|
||||
- Валидация CIDR и exclude IP.
|
||||
- Два backend-хранилища: in-memory и PostgreSQL.
|
||||
- После создания scan запускается фоновый discovery с обновлением статуса и прогресса.
|
||||
@@ -137,6 +138,12 @@ curl -s http://localhost:8080/api/scans?limit=20
|
||||
curl -s http://localhost:8080/api/scans/<scan_id>/hosts?limit=200
|
||||
```
|
||||
|
||||
Получить результаты по портам:
|
||||
|
||||
```bash
|
||||
curl -s http://localhost:8080/api/scans/<scan_id>/ports?limit=500
|
||||
```
|
||||
|
||||
## Запуск как сервис на Linux (systemd)
|
||||
|
||||
1. Собрать бинарник:
|
||||
|
||||
Reference in New Issue
Block a user