import requests
import re
import threading
from urllib.parse import urlencode
def scan_domain(domain,page):
sub_domains = []
url = "搜索语法"
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"
}
resp = requests.get(url,headers=header)
html_str = resp.text
pattern = re.compile(正则表达)
results = re.findall(pattern,html_str)
for res in results:
if "." in res:
if "/" in res:
sub_d = res.split('/')[0]
sub_domains.append(sub_d)
print(sub_domains)
return sub_domains
if __name__ == '__main__':
domain = input("domain:")
pages = int(input("pages:"))
for page in range(pages):
t = threading.Thread(target=scan_domain,args=(domain,page))
t.start()