Skip to content

Commit

Permalink
update jq-examples and api-uptime-badge
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Nov 13, 2024
1 parent 9027c6b commit 8b97a90
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Open IP, Network & ASN Risk-Databases

[![Lint](https://github.com/O-X-L/risk-db/actions/workflows/lint.yml/badge.svg)](https://github.com/O-X-L/risk-db/actions/workflows/lint.yml)
[![API Uptime](https://status.oxl.at/api/v1/endpoints/2--oxl-apis_risk-db/uptimes/7d/badge.svg)](https://status.oxl.at/endpoints/2--oxl-apis_risk-db)

This project wants to help admins/systems flag large quantities of bad traffic.

Expand Down Expand Up @@ -95,8 +96,18 @@ We recommend the use of our [GeoIP-ASN Database](https://github.com/O-X-L/geoip-

You can use `jq` to easily filter the JSON data:

* Get flat list of ASN's: `cat risk_asn_kind.json | jq 'keys[]'`
* Only get ASN's that are flagged a certain way: `cat risk_asn_kind.json | jq 'map_values(select(.kind.scanner == true)) | keys[]'`
```bash
# Get flat list of ASN's
cat risk_asn_kind.json | jq 'keys[]'

# Get all networks with bad reputation
cat risk_net4_med.json | jq 'map_values(select(.reputation == "bad")) | keys[]'

# Only get ASN's that are flagged a certain kind
cat risk_asn_kind.json | jq 'map_values(select(.kind.scanner == true)) | keys[]' | tr -d '"' | sort
# or
cat risk_ip4_med.json | jq 'keys[] | map_values(select(.kind.hosting == true)) | keys[]' | tr -d '"' | sort
```

----

Expand Down

0 comments on commit 8b97a90

Please sign in to comment.