mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-10-25 00:56:14 +08:00
修复只启用部分模块不能使用问题
This commit is contained in:
+2
-3
@@ -30,10 +30,9 @@ result_save_path = None # 子域结果保存文件路径(默认None)
|
|||||||
# 收集模块设置
|
# 收集模块设置
|
||||||
save_module_result = False # 保存各模块发现结果为json文件(默认False)
|
save_module_result = False # 保存各模块发现结果为json文件(默认False)
|
||||||
enable_all_module = True # 启用所有收集模块(默认True)
|
enable_all_module = True # 启用所有收集模块(默认True)
|
||||||
enable_partial_module = [] # 启用部分收集模块 必须禁用enable_all_module才能生效
|
enable_partial_module = ['modules.search.baidu'] # 启用部分收集模块 必须禁用enable_all_module才能生效
|
||||||
# 只使用ask和baidu搜索引擎收集子域的示例
|
# 只使用ask和baidu搜索引擎收集子域的示例
|
||||||
# enable_partial_module = [('modules.search', 'ask')
|
# enable_partial_module = ['modules.search.ask', 'modules.search.baidu']
|
||||||
# ('modules.search', 'baidu')]
|
|
||||||
|
|
||||||
# 爆破模块设置
|
# 爆破模块设置
|
||||||
brute_concurrent_num = 2000 # 爆破时并发查询数量(默认2000,最大推荐10000)
|
brute_concurrent_num = 2000 # 爆破时并发查询数量(默认2000,最大推荐10000)
|
||||||
|
|||||||
+3
-2
@@ -23,7 +23,7 @@ class Collect(object):
|
|||||||
module_path = settings.module_dir.joinpath(module)
|
module_path = settings.module_dir.joinpath(module)
|
||||||
for path in module_path.rglob('*.py'):
|
for path in module_path.rglob('*.py'):
|
||||||
import_module = f'modules.{module}.{path.stem}'
|
import_module = f'modules.{module}.{path.stem}'
|
||||||
self.modules.append([import_module, path.stem])
|
self.modules.append(import_module)
|
||||||
else:
|
else:
|
||||||
self.modules = settings.enable_partial_module
|
self.modules = settings.enable_partial_module
|
||||||
|
|
||||||
@@ -31,7 +31,8 @@ class Collect(object):
|
|||||||
"""
|
"""
|
||||||
Import do function
|
Import do function
|
||||||
"""
|
"""
|
||||||
for module, name in self.modules:
|
for module in self.modules:
|
||||||
|
name = module.split('.')[-1]
|
||||||
import_object = importlib.import_module(module)
|
import_object = importlib.import_module(module)
|
||||||
func = getattr(import_object, 'run')
|
func = getattr(import_object, 'run')
|
||||||
self.collect_funcs.append([func, name])
|
self.collect_funcs.append([func, name])
|
||||||
|
|||||||
Reference in New Issue
Block a user