mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-10-27 02:45:52 +08:00
调整顺序
This commit is contained in:
@@ -220,12 +220,13 @@ class Module(object):
|
|||||||
"""
|
"""
|
||||||
将各模块结果保存为json文件
|
将各模块结果保存为json文件
|
||||||
"""
|
"""
|
||||||
|
if not config.save_module_result:
|
||||||
|
return False
|
||||||
logger.log('DEBUG', f'将{self.source}模块发现的子域结果保存为json文件')
|
logger.log('DEBUG', f'将{self.source}模块发现的子域结果保存为json文件')
|
||||||
if config.save_module_result:
|
path = config.result_save_path.joinpath(self.domain, self.module)
|
||||||
dpath = config.result_save_path.joinpath(self.domain, self.module)
|
path.mkdir(parents=True, exist_ok=True)
|
||||||
dpath.mkdir(parents=True, exist_ok=True)
|
|
||||||
name = self.source + '.json'
|
name = self.source + '.json'
|
||||||
path = dpath.joinpath(name)
|
path = path.joinpath(name)
|
||||||
with open(path, mode='w', encoding='utf-8', errors='ignore') as file:
|
with open(path, mode='w', encoding='utf-8', errors='ignore') as file:
|
||||||
result = {'domain': self.domain,
|
result = {'domain': self.domain,
|
||||||
'name': self.module,
|
'name': self.module,
|
||||||
@@ -235,6 +236,7 @@ class Module(object):
|
|||||||
'subdomains': list(self.subdomains),
|
'subdomains': list(self.subdomains),
|
||||||
'records': self.records}
|
'records': self.records}
|
||||||
json.dump(result, file, ensure_ascii=False, indent=4)
|
json.dump(result, file, ensure_ascii=False, indent=4)
|
||||||
|
return True
|
||||||
|
|
||||||
def gen_result(self):
|
def gen_result(self):
|
||||||
results = list()
|
results = list()
|
||||||
|
|||||||
Reference in New Issue
Block a user