Added google bot updater + list

pull/247/head
Hendrik Baecker 2023-04-05 14:33:08 +02:00
parent 4f936b9465
commit bcbb51d50e
3 changed files with 93 additions and 33 deletions

View File

@ -29,6 +29,7 @@ python3 generate-vpn.py
python3 generate-wikimedia.py python3 generate-wikimedia.py
python3 generate-second-level-tlds.py python3 generate-second-level-tlds.py
python3 generate-google-gcp.py python3 generate-google-gcp.py
python3 generate-google-bot.py
python3 generate-google-gmail-sending-ips.py python3 generate-google-gmail-sending-ips.py
python3 generate-smtp.py python3 generate-smtp.py
python3 generate-tenable.py python3 generate-tenable.py

View File

@ -1,42 +1,78 @@
{ {
"description": "List of known Googlebot IP ranges (https://www.lifewire.com/what-is-the-ip-address-of-google-818153 )", "description": "Google Bot IP address ranges (https://developers.google.com/search/apis/ipranges/googlebot.json)",
"list": [ "list": [
"216.239.33.128/25", "2001:4860:4801:10::/61",
"216.239.33.96/27", "2001:4860:4801:18::/62",
"216.239.34.0/23", "2001:4860:4801:20::/60",
"216.239.36.0/22", "2001:4860:4801:2::/63",
"216.239.40.0/21", "2001:4860:4801:30::/61",
"216.239.48.0/21", "2001:4860:4801:38::/62",
"216.239.56.0/23", "2001:4860:4801:3c::/63",
"216.239.58.0/24", "2001:4860:4801:3e::/64",
"216.239.59.0/25", "2001:4860:4801:40::/61",
"216.239.59.128/32", "2001:4860:4801:48::/63",
"64.233.173.193/32", "2001:4860:4801:4a::/64",
"64.233.173.194/31", "2001:4860:4801:50::/63",
"64.233.173.196/30", "2001:4860:4801:53::/64",
"64.233.173.200/29", "2001:4860:4801:60::/60",
"64.233.173.208/28", "2001:4860:4801:70::/61",
"64.233.173.224/27", "2001:4860:4801:80::/62",
"64.68.90.0/24", "2001:4860:4801:84::/63",
"66.249.64.1/32", "2001:4860:4801:86::/64",
"66.249.64.128/25", "2001:4860:4801:90::/62",
"66.249.64.16/28", "2001:4860:4801::/64",
"66.249.64.2/31", "2001:4860:4801:c::/64",
"66.249.64.32/27", "2001:4860:4801:f::/64",
"66.249.64.4/30", "34.100.182.96/28",
"66.249.64.64/26", "34.101.50.144/28",
"66.249.64.8/29", "34.118.254.0/28",
"66.249.65.0/24", "34.118.66.0/28",
"66.249.66.0/23", "34.126.178.96/28",
"66.249.68.0/22", "34.146.150.144/28",
"66.249.72.0/21" "34.147.110.144/28",
"34.151.74.144/28",
"34.152.50.64/28",
"34.154.114.144/28",
"34.155.98.32/28",
"34.165.18.176/28",
"34.175.160.64/28",
"34.176.130.16/28",
"34.22.85.0/27",
"34.64.82.64/28",
"34.65.242.112/28",
"34.80.50.80/28",
"34.88.194.0/28",
"34.89.10.80/28",
"34.89.198.80/28",
"34.96.162.48/28",
"35.247.243.240/28",
"66.249.64.0/23",
"66.249.66.0/26",
"66.249.66.128/27",
"66.249.66.192/27",
"66.249.66.64/27",
"66.249.68.0/26",
"66.249.68.64/27",
"66.249.69.0/24",
"66.249.70.0/24",
"66.249.71.0/25",
"66.249.71.128/26",
"66.249.71.192/27",
"66.249.72.0/23",
"66.249.74.0/25",
"66.249.74.128/27",
"66.249.75.0/24",
"66.249.76.0/24",
"66.249.77.0/25",
"66.249.77.128/27",
"66.249.79.0/24"
], ],
"matching_attributes": [ "matching_attributes": [
"ip-dst",
"ip-src", "ip-src",
"ip-dst",
"domain|ip" "domain|ip"
], ],
"name": "List of known Googlebot IP ranges", "name": "List of known Googlebot IP ranges (https://developers.google.com/search/apis/ipranges/googlebot.json)",
"type": "cidr", "type": "cidr",
"version": 20190724 "version": 20230405
} }

View File

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