Skip to content

Commit

Permalink
Add version and name to the office365 warning list
Browse files Browse the repository at this point in the history
  • Loading branch information
adulau committed Dec 6, 2016
1 parent 14edcbd commit 338241e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lists/microsoft-office365/list.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "List of known Office 365 URLs and IP address ranges",
"description": "Office 365 URLs and IP address ranges",
"list": [
"2a01:111:f406:8800::/64",
Expand Down Expand Up @@ -1334,5 +1335,6 @@
"216.32.180.0/23",
"2a01:111:f400:7c00::/54",
"2a01:111:f403::/48"
]
],
"version": "20161206"
}
5 changes: 5 additions & 0 deletions tools/generate-office365.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import requests
import xml.etree.ElementTree as ET
import json
import datetime

url = 'https://support.content.office.net/en-us/static/O365IPAddresses.xml'
r = requests.get(url)
Expand All @@ -13,7 +14,11 @@
l.append(address.text.replace('*', ''))

warninglist = {}
warninglist['name'] = 'List of known Office 365 URLs and IP address ranges'
d = datetime.datetime.now()
warninglist['version'] = "{0}{1:02d}{2:02d}".format(d.year, d.month, d.day)
warninglist['description'] = 'Office 365 URLs and IP address ranges'
warninglist['list'] = l


print (json.dumps(warninglist))

0 comments on commit 338241e

Please sign in to comment.