Created
May 30, 2019 19:37
-
-
Save cfg/3a3c3e1180a6789ba612eddd93fa9cff to your computer and use it in GitHub Desktop.
Use python for quick dns lookups when other tools (dig, host, nslookup) aren't available
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
list( map( lambda x: x[4][0], socket.getaddrinfo('example.com.', 80, 0, socket.SOCK_STREAM) )) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment