add: Microsoft Azure Datacenter IP Ranges added including tool to
generate the JSON. Fix #43pull/46/head
parent
bebc51fd86
commit
ac2beeea02
|
@ -14,7 +14,8 @@ are available in one of the list. The list can be globally enabled or disabled i
|
||||||
- [lists/empty-hashes](lists/empty-hashes) - hash values of empty files
|
- [lists/empty-hashes](lists/empty-hashes) - hash values of empty files
|
||||||
- [lists/google](lists/google) - known domains and hostnames from Google
|
- [lists/google](lists/google) - known domains and hostnames from Google
|
||||||
- [lists/ipv6-linklocal](ipv6-linklocal) - IPv6 link local prefix
|
- [lists/ipv6-linklocal](ipv6-linklocal) - IPv6 link local prefix
|
||||||
- [lists/microsoft](lists/microsoft) - known microsoft domains
|
- [lists/microsoft](lists/microsoft) - known Microsoft domains
|
||||||
|
- [lists/microsoft-azure](lists/microsoft-azure) - known Microsoft Azure Datacenter IP Ranges
|
||||||
- [lists/microsoft-office365](lists/microsoft-office365) - known Office 365 URLs and IP address ranges
|
- [lists/microsoft-office365](lists/microsoft-office365) - known Office 365 URLs and IP address ranges
|
||||||
- [lists/microsoft-office365-cn](lists/microsoft-office365-cn) - known Office 365 IP address ranges in China
|
- [lists/microsoft-office365-cn](lists/microsoft-office365-cn) - known Office 365 IP address ranges in China
|
||||||
- [lists/multicast](lists/multicast) - known IPv4 multicast CIDR blocks
|
- [lists/multicast](lists/multicast) - known IPv4 multicast CIDR blocks
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import requests
|
||||||
|
import xml.etree.ElementTree as ET
|
||||||
|
import json
|
||||||
|
import datetime
|
||||||
|
|
||||||
|
url = 'https://download.microsoft.com/download/0/1/8/018E208D-54F8-44CD-AA26-CD7BC9524A8C/PublicIPs_20171226.xml'
|
||||||
|
r = requests.get(url)
|
||||||
|
office365 = ET.fromstring(r.text)
|
||||||
|
l = []
|
||||||
|
for region in office365.iter('Region'):
|
||||||
|
for subnet in region.iter('IpRange'):
|
||||||
|
l.append(subnet.get('Subnet'))
|
||||||
|
|
||||||
|
warninglist = {}
|
||||||
|
warninglist['name'] = 'List of known Microsoft Azure Datacenter IP Ranges'
|
||||||
|
warninglist['version'] = int(datetime.date.today().strftime('%Y%m%d'))
|
||||||
|
warninglist['description'] = 'Microsoft Azure Datacenter IP Ranges'
|
||||||
|
warninglist['list'] = sorted(set(l))
|
||||||
|
warninglist['matching_attributes'] = ["ip-src", "ip-dst", "domain|ip"]
|
||||||
|
warninglist['type'] = 'cidr'
|
||||||
|
|
||||||
|
print(json.dumps(warninglist))
|
Loading…
Reference in New Issue