Created
August 24, 2017 21:02
-
-
Save bandrel/d0169b51616241608328da58318c44db to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env python | |
import requests | |
import sys | |
import re | |
domain = sys.argv[1] | |
r = requests.get('https://crt.sh/?q=%.'+domain) | |
hostnames = re.findall(r'<TD>(\S+\.'+domain+r')',r.text) | |
uniq_hostnames = set(hostnames) | |
for host in uniq_hostnames: | |
print(host) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment