new: [zscaler] Zscaler IP addresses added

Thanks to Remi Akintonde for the idea
pull/251/head
Alexandre Dulaunoy 2023-08-10 13:44:06 +02:00
parent 8481fa74f2
commit 07a1e66092
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
2 changed files with 114 additions and 0 deletions

79
lists/zscaler/list.json Normal file
View File

@ -0,0 +1,79 @@
{
"description": "Zscaler IP address ranges (https://config.zscaler.com/api/zscaler.net/hubs/cidr/json/required)",
"list": [
"104.129.192.0/22",
"104.129.196.0/23",
"104.129.202.0/23",
"112.196.99.180/32",
"136.226.118.0/23",
"136.226.120.0/23",
"136.226.142.0/23",
"136.226.144.0/21",
"136.226.152.0/23",
"136.226.156.0/22",
"136.226.160.0/23",
"136.226.174.0/23",
"136.226.176.0/21",
"136.226.184.0/23",
"136.226.194.0/23",
"136.226.196.0/23",
"136.226.94.0/23",
"147.161.200.0/23",
"147.161.204.0/23",
"147.161.208.0/23",
"147.161.238.0/23",
"147.161.252.0/23",
"165.225.0.0/23",
"165.225.18.0/24",
"165.225.240.0/21",
"165.225.4.0/24",
"165.225.44.0/24",
"165.225.48.0/24",
"165.225.6.0/23",
"165.225.72.0/22",
"167.103.30.0/23",
"167.103.32.0/22",
"170.85.32.0/22",
"185.46.212.0/22",
"199.168.148.0/24",
"213.152.228.0/24",
"216.218.133.192/26",
"216.52.207.64/26",
"2400:7aa0:1b11::/48",
"2400:7aa0:1c11::/48",
"2400:7aa0:1c12::/48",
"2400:7aa0:1e11::/48",
"2605:4300:1211::/48",
"2605:4300:1212::/48",
"2605:4300:1214::/48",
"2605:4300:1216::/48",
"2605:4300:1311::/48",
"2605:4300:1312::/48",
"2605:4300:1315::/48",
"2605:4300:1411::/48",
"2605:4300:1412::/47",
"2605:4300:1414::/48",
"2605:4300:1418::/48",
"2a03:eec0:1211::/48",
"2a03:eec0:1212::/48",
"2a03:eec0:1216::/48",
"2a03:eec0:1311::/48",
"2a03:eec0:1312::/48",
"2a03:eec0:1317::/48",
"2a03:eec0:1411::/48",
"2a03:eec0:1414::/47",
"64.74.126.64/26",
"70.39.159.0/24",
"72.52.96.0/26",
"8.25.203.0/24",
"89.167.131.0/24"
],
"matching_attributes": [
"ip-src",
"ip-dst",
"domain|ip"
],
"name": "List of known Zscaler IP address ranges",
"type": "cidr",
"version": 20230810
}

35
tools/generate-zscaler.py Executable file
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:
zscaler_ip_list = json.load(json_file)
l = []
for prefix in zscaler_ip_list['hubPrefixes']:
l.append(prefix)
warninglist = {
'name': 'List of known Zscaler IP address ranges',
'version': get_version(),
'description': 'Zscaler IP address ranges (https://config.zscaler.com/api/zscaler.net/hubs/cidr/json/required)',
'type': 'cidr',
'list': consolidate_networks(l),
'matching_attributes': ["ip-src", "ip-dst", "domain|ip"]
}
write_to_file(warninglist, dst)
if __name__ == '__main__':
zscaler_url = "https://config.zscaler.com/api/zscaler.net/hubs/cidr/json/required"
zscaler_file = "zscaler_ip-ranges.json"
zscaler_dst = "zscaler"
download_to_file(zscaler_url, zscaler_file)
process(zscaler_file, zscaler_dst)