Skip to content

Instantly share code, notes, and snippets.

@cdodd
cdodd / parse-o365-ip-addrs.py
Last active March 15, 2018 20:37
Parse and reformat the IP address ranges for various Office 365 services.
#!/usr/bin/env python
import xmltodict
from socket import inet_ntoa
from struct import pack
import sys
import urllib
def calcDottedNetmask(mask):
bits = 0xffffffff ^ (1 << 32 - mask) - 1
#!/usr/bin/env python3
'''
calisuck: index, filter-out smartly and download ebooks from Calibre open directories
Installation:
You need python 3.5 installed
Download the file as a zip and unzip-it and get into the dir