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