forked from Cl0udG0d/SZhe_Scan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DomainMessage.py
72 lines (64 loc) · 2.17 KB
/
DomainMessage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import get_message
from init import redispool
class DomainMessage:
def __init__(self,domain):
self.domain=domain
self.redispool=redispool
self.TrueDomain=self.domain.split('.',1)[1]
def GetSubDomain(self):
print("正在使用主动与被动方式获取目标子域名!")
try:
SubDomainBurst=get_message.SubDomainBurst(self.TrueDomain,self.redispool)
SubDomainOnline=get_message.GetSubDomain(self.domain)
SubDomain=SubDomainBurst+SubDomainOnline
return SubDomain
except Exception as e:
print(e)
return "None"
def GetWhoisMessage(self):
print("正在获取网站Whois信息!")
try:
return get_message.GetWhois(self.TrueDomain)
except Exception as e:
print(e)
return "None"
def GetBindingIP(self):
print("正在获取域名历史解析记录 :D")
try:
return get_message.GetBindingIP(self.domain)
except Exception as e:
print(e)
return "None"
def GetSiteStation(self):
print("正在进行旁站查询 :)")
try:
return get_message.GetSiteStation(self.domain)
except Exception as e:
print(e)
return "None"
def GetRecordInfo(self):
print("正在获取域名的公开备案信息 :-)")
try:
return get_message.GetRecordInfo(self.domain)
except Exception as e:
print(e)
return "None"
def FindDomainAdd(self):
print("正在获取域名映射的真实地址!")
try:
return get_message.FindDomainAdd(self.domain)
except Exception as e:
print(e)
return "None"
if __name__=='__main__':
test=DomainMessage("www.nowcoder.com")
try:
print(test.GetSiteStation())
print(test.GetBindingIP())
print(test.GetWhoisMessage())
print(test.GetRecordInfo())
print(test.FindDomainAdd())
print(test.GetSubDomain())
except Exception as e:
print(e)
pass