Skip to content

Commit 8683c29

Browse files
committed
add network-lookup api
1 parent 94294f4 commit 8683c29

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,21 @@ You can use `jq` to easily filter the JSON data:
9494

9595
## API
9696

97-
* [IP Lookup](https://risk.oxl.app/api/ip/)
97+
* [IP Lookup](https://risk.oxl.app/api/ip/69.164.207.190)
98+
* [Network Lookup](https://risk.oxl.app/api/net/205.210.31.48)
9899
* [ASN Lookup](https://risk.oxl.app/api/asn/16509)
99100

100101
```bash
101102
# check IP
102103
curl https://risk.oxl.app/api/ip/<IP>
103-
## example
104104
curl https://risk.oxl.app/api/ip/69.164.207.190
105105

106+
# check network
107+
curl https://risk.oxl.app/api/net/<IP>
108+
curl https://risk.oxl.app/api/net/205.210.31.48
109+
106110
# check ASN/ISP
107111
curl https://risk.oxl.app/api/asn/<ASN>
108-
## example
109112
curl https://risk.oxl.app/api/asn/16509
110113
```
111114

src/load_reports.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
def load_reports() -> list[dict]:
8-
filtered_reports = []
8+
reports = []
99
last_hits = {}
1010

1111
with open(f'{SRC_PATH}/example_reports.txt', 'r', encoding='utf-8') as f:
@@ -31,6 +31,6 @@ def load_reports() -> list[dict]:
3131

3232
last_hits[k] = r['time']
3333

34-
filtered_reports.append(r)
34+
reports.append(r)
3535

36-
return filtered_reports
36+
return reports

0 commit comments

Comments
 (0)