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