mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 12:57:50 +08:00
模块优化
This commit is contained in:
@@ -27,10 +27,7 @@ class CheckCDX(Module):
|
|||||||
self.header = self.get_header()
|
self.header = self.get_header()
|
||||||
self.proxy = self.get_proxy(self.source)
|
self.proxy = self.get_proxy(self.source)
|
||||||
resp = self.get(url, check=False)
|
resp = self.get(url, check=False)
|
||||||
if not resp:
|
self.subdomains = self.collect_subdomains(resp)
|
||||||
return
|
|
||||||
if resp and len(resp.content):
|
|
||||||
self.subdomains = self.match_subdomains(resp.text)
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ class CheckCSP(Module):
|
|||||||
logger.log('DEBUG', f'Failed to get header of {self.domain} domain')
|
logger.log('DEBUG', f'Failed to get header of {self.domain} domain')
|
||||||
return
|
return
|
||||||
if not csp:
|
if not csp:
|
||||||
logger.log('DEBUG', f'There is no Content-Security-Policy in the header of {self.domain}')
|
logger.log('DEBUG', f'There is no Content-Security-Policy in the header '
|
||||||
|
f'of {self.domain}')
|
||||||
return
|
return
|
||||||
self.subdomains = self.match_subdomains(csp)
|
self.subdomains = self.match_subdomains(csp)
|
||||||
|
|
||||||
|
|||||||
@@ -26,10 +26,7 @@ class CheckRobots(Module):
|
|||||||
self.header = self.get_header()
|
self.header = self.get_header()
|
||||||
self.proxy = self.get_proxy(self.source)
|
self.proxy = self.get_proxy(self.source)
|
||||||
resp = self.get(url, check=False, allow_redirects=False)
|
resp = self.get(url, check=False, allow_redirects=False)
|
||||||
if not resp:
|
self.subdomains = self.collect_subdomains(resp)
|
||||||
return
|
|
||||||
if resp and len(resp.content):
|
|
||||||
self.subdomains = self.match_subdomains(resp.text)
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -31,10 +31,7 @@ class CheckRobots(Module):
|
|||||||
self.proxy = self.get_proxy(self.source)
|
self.proxy = self.get_proxy(self.source)
|
||||||
self.timeout = 10
|
self.timeout = 10
|
||||||
resp = self.get(url, check=False)
|
resp = self.get(url, check=False)
|
||||||
if not resp:
|
self.subdomains = self.collect_subdomains(resp)
|
||||||
return
|
|
||||||
if resp and len(resp.content):
|
|
||||||
self.subdomains = self.match_subdomains(resp.text)
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user