Skip to content

Commit

Permalink
add network-lookup api
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Oct 18, 2024
1 parent 94294f4 commit 8683c29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,21 @@ You can use `jq` to easily filter the JSON data:

## API

* [IP Lookup](https://risk.oxl.app/api/ip/)
* [IP Lookup](https://risk.oxl.app/api/ip/69.164.207.190)
* [Network Lookup](https://risk.oxl.app/api/net/205.210.31.48)
* [ASN Lookup](https://risk.oxl.app/api/asn/16509)

```bash
# check IP
curl https://risk.oxl.app/api/ip/<IP>
## example
curl https://risk.oxl.app/api/ip/69.164.207.190

# check network
curl https://risk.oxl.app/api/net/<IP>
curl https://risk.oxl.app/api/net/205.210.31.48

# check ASN/ISP
curl https://risk.oxl.app/api/asn/<ASN>
## example
curl https://risk.oxl.app/api/asn/16509
```

Expand Down
6 changes: 3 additions & 3 deletions src/load_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def load_reports() -> list[dict]:
filtered_reports = []
reports = []
last_hits = {}

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

last_hits[k] = r['time']

filtered_reports.append(r)
reports.append(r)

return filtered_reports
return reports

0 comments on commit 8683c29

Please sign in to comment.