Skip to content

Instantly share code, notes, and snippets.

@jgensler8
Created March 9, 2020 01:28
Show Gist options
  • Save jgensler8/aaa3c2e4091c4ad54bfefa942adb3036 to your computer and use it in GitHub Desktop.
Save jgensler8/aaa3c2e4091c4ad54bfefa942adb3036 to your computer and use it in GitHub Desktop.
See where Zoom's IP is advertised from!
# python3
import json
import ipaddress
# ip = ipaddress.ip_network("52.202.62.236/32")
ip = ipaddress.ip_network("52.202.62.235/32")
# ip = ipaddress.ip_network("52.202.62.196/32")
# from https://ip-ranges.amazonaws.com/ip-ranges.json
with open("./ips.json", "r") as f:
content=f.read()
ips = json.loads(content)
for p in ips["prefixes"]:
network = ipaddress.ip_network(p["ip_prefix"])
if ip.subnet_of(network):
print(p)
# python3.7.exe .\zoom.py
#{'ip_prefix': '52.200.0.0/13', 'region': 'us-east-1', 'service': 'AMAZON'}
#{'ip_prefix': '52.200.0.0/13', 'region': 'us-east-1', 'service': 'EC2'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment