""""
二、子域名爆破
通过暴力破解来获得子域名,类似子域名挖掘机的功能
"""
import requests
from concurrent.futures import ThreadPoolExecutor
def pj(domain):
with open('dic/text.txt','r') as f:
key = f.readline().strip()
while key:
url = "http://"+key+"."+domain
header = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"
}
try:
resp = requests.get(url,headers=header)
if resp.status_code == 200:
print(url)
except:
pass
key = f.readline().strip()
if __name__ == '__main__':
domain = input("请输入域名:")
pj(domain)
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/8a7f1713c6087768c5145844f0451ffd.png)