first commit

This commit is contained in:
Mateusz Gruszczyński
2026-02-05 12:11:32 +01:00
parent a547894adc
commit e90ea1631c

View File

@@ -51,14 +51,14 @@ python ip_analyzer.py
By default the app listens on:
- Web UI: <http://localhost:5000>
- API docs: <http://localhost:5000/api>
- Web UI: <http://localhost:8799>
- API docs: <http://localhost:8799/api>
You can change host/port in `ip_analyzer.py` if needed.
## Usage (Web UI)
1. Open <http://localhost:5000> in your browser.
1. Open <http://localhost:8799> in your browser.
2. Paste IP addresses into the textarea.
- Lines, spaces, commas, semicolons and tabs are all accepted.
3. Click **"Analyze IP Addresses"**.
@@ -71,7 +71,7 @@ You can change host/port in `ip_analyzer.py` if needed.
### Analyze IPs
```bash
curl -X POST http://localhost:5000/api/analyze \
curl -X POST http://localhost:8799/api/analyze \
-H "Content-Type: application/json" \
-d '{"ips": "1.1.1.1, 8.8.8.8, 9.9.9.9"}'
```
@@ -82,7 +82,7 @@ Example in Python:
import requests
resp = requests.post(
"http://localhost:5000/api/analyze",
"http://localhost:8799/api/analyze",
json={"ips": "1.1.1.1, 8.8.8.8, 9.9.9.9"},
)
data = resp.json()
@@ -94,7 +94,7 @@ for row in data["results"]:
### Export IPSet Rules
```bash
curl -X POST http://localhost:5000/api/export/ipset \
curl -X POST http://localhost:8799/api/export/ipset \
-H "Content-Type: application/json" \
-d '{"ips": ["1.1.1.1", "8.8.8.8"], "timeout": 86400}'
```