Skip to content

Instantly share code, notes, and snippets.

@defulmere
Created February 27, 2020 21:50
Get a list of all cloudflare IPv4 addresses with python
import requests
from ipaddress import *
subnets = requests.get('https://www.cloudflare.com/ips-v4').content.split()
for s in subnets:
subnet = IPv4Network(s.decode())
for h in subnet.hosts():
print(h)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment