new: [google-gcp] Add generator and update to latest version

pull/184/head
Jakub Onderka 2021-06-10 16:06:37 +02:00
parent a6c3455944
commit 14ee657daf
3 changed files with 70 additions and 1 deletions

View File

@ -30,6 +30,7 @@ python3 generate-university-domain-list.py
python3 generate-vpn.py
python3 generate-wikimedia.py
python3 genetate-second-level-tlds.py
python3 generate-google-gcp.py
popd
./jq_all_the_things.sh

View File

@ -88,6 +88,7 @@
"2600:1901::/48",
"34.100.128.0/17",
"34.101.128.0/17",
"34.101.18.0/24",
"34.101.20.0/22",
"34.101.24.0/22",
"34.101.64.0/18",
@ -98,7 +99,15 @@
"34.104.108.0/23",
"34.104.110.0/23",
"34.104.112.0/23",
"34.104.116.0/22",
"34.104.120.0/23",
"34.104.122.0/23",
"34.104.124.0/23",
"34.104.126.0/23",
"34.104.128.0/17",
"34.104.27.0/24",
"34.104.49.0/24",
"34.104.52.0/24",
"34.104.64.0/21",
"34.104.72.0/22",
"34.104.76.0/22",
@ -111,7 +120,10 @@
"34.107.0.0/17",
"34.107.128.0/17",
"34.116.0.0/21",
"34.116.128.0/17",
"34.116.64.0/18",
"34.117.0.0/16",
"34.118.0.0/17",
"34.120.0.0/16",
"34.121.0.0/16",
"34.122.0.0/15",
@ -126,11 +138,44 @@
"34.124.44.0/23",
"34.124.46.0/23",
"34.124.48.0/23",
"34.124.52.0/22",
"34.124.56.0/23",
"34.124.58.0/23",
"34.124.60.0/23",
"34.124.62.0/23",
"34.124.8.0/22",
"34.125.0.0/16",
"34.126.128.0/18",
"34.126.192.0/20",
"34.126.208.0/20",
"34.126.64.0/18",
"34.127.0.0/17",
"34.127.177.0/24",
"34.127.180.0/24",
"34.129.0.0/16",
"34.131.0.0/16",
"34.132.0.0/14",
"34.136.0.0/16",
"34.137.0.0/16",
"34.138.0.0/15",
"34.140.0.0/16",
"34.141.0.0/17",
"34.141.128.0/17",
"34.142.0.0/17",
"34.145.0.0/17",
"34.145.128.0/17",
"34.146.0.0/16",
"34.147.0.0/17",
"34.147.128.0/17",
"34.148.0.0/16",
"34.149.0.0/16",
"34.150.0.0/17",
"34.150.128.0/17",
"34.151.0.0/18",
"34.151.128.0/18",
"34.151.192.0/18",
"34.151.64.0/18",
"34.152.0.0/18",
"34.64.128.0/22",
"34.64.132.0/22",
"34.64.136.0/21",
@ -392,5 +437,5 @@
],
"name": "List of known GCP (Google Cloud Platform) IP address ranges",
"type": "cidr",
"version": 20201024
"version": 20210610
}

View File

@ -0,0 +1,23 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
from generator import download, get_version, write_to_file
if __name__ == '__main__':
cloud = download("https://www.gstatic.com/ipranges/cloud.json")
parsed = json.loads(cloud.text)
ranges = [p["ipv4Prefix"] if "ipv4Prefix" in p else p["ipv6Prefix"] for p in parsed["prefixes"]]
warninglist = {
'name': "List of known GCP (Google Cloud Platform) IP address ranges",
'version': get_version(),
'description': "GCP (Google Cloud Platform) IP address ranges (https://www.gstatic.com/ipranges/cloud.json)",
'matching_attributes': ["ip-src", "ip-dst", "domain|ip"],
'type': 'cidr',
'list': ranges,
}
write_to_file(warninglist, "google-gcp")