Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Using python to get a list of IPs from DNS
import socket
[ addr[4][0] for addr in socket.getaddrinfo("", 0) if addr[0] in (socket.AF_INET, socket.AF_INET6) ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.