new: [warning-lists] add the check-host.net source of IP addresses

pull/270/head
Alexandre Dulaunoy 2024-04-02 14:32:29 +02:00
parent d5c586c1bd
commit e9efbff3d5
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
2 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,55 @@
{
"description": "check-host IP addresses (https://check-host.net/nodes/ips)",
"list": [
"103.214.169.52/32",
"141.98.234.68/32",
"167.235.135.184/32",
"170.205.54.119/32",
"178.17.171.235/32",
"178.216.200.169/32",
"179.43.148.195/32",
"185.105.238.209/32",
"185.120.77.165/32",
"185.130.104.238/32",
"185.138.164.21/32",
"185.143.223.66/32",
"185.185.132.232/32",
"185.209.161.169/32",
"185.230.55.13/32",
"185.24.253.139/32",
"185.25.204.60/32",
"185.37.147.117/32",
"185.39.205.237/32",
"185.83.213.25/32",
"185.86.77.126/32",
"193.8.95.39/32",
"194.146.57.64/32",
"194.26.229.20/32",
"195.154.114.92/32",
"195.211.27.85/32",
"209.14.69.16/32",
"38.145.202.12/32",
"45.12.81.15/32",
"45.141.149.25/32",
"45.146.7.45/32",
"45.95.168.235/32",
"5.159.54.120/32",
"5.44.42.40/32",
"65.109.182.130/32",
"77.75.230.51/32",
"77.92.151.181/32",
"88.119.179.10/32",
"91.102.183.15/32",
"91.231.182.39/32",
"92.223.65.81/32",
"93.123.16.89/32"
],
"matching_attributes": [
"ip-src",
"ip-dst",
"domain|ip"
],
"name": "List of known check-host.net IP address ranges",
"type": "cidr",
"version": 20240402
}

View File

@ -0,0 +1,35 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
from generator import download_to_file, get_version, write_to_file, get_abspath_source_file, consolidate_networks
def process(file, dst):
with open(get_abspath_source_file(file), 'r') as json_file:
checkhost_ip_list = json.load(json_file)
l = []
for prefix in checkhost_ip_list['nodes']:
l.append(prefix)
warninglist = {
'name': 'List of known check-host.net IP address ranges',
'version': get_version(),
'description': 'check-host IP addresses (https://check-host.net/nodes/ips)',
'type': 'cidr',
'list': consolidate_networks(l),
'matching_attributes': ["ip-src", "ip-dst", "domain|ip"]
}
write_to_file(warninglist, dst)
if __name__ == '__main__':
checkhost_url = "https://check-host.net/nodes/ips"
checkhost_file = "check-host-net.json"
checkhost_dst = "check-host-net"
download_to_file(checkhost_url, checkhost_file)
process(checkhost_file, checkhost_dst)