mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
pep8
This commit is contained in:
@@ -132,9 +132,9 @@ class AIOBrute(Module):
|
|||||||
OneForAll多进程多协程异步子域爆破模块
|
OneForAll多进程多协程异步子域爆破模块
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
python3 aiobrute.py --target example.com run
|
python3 aiobrute.py --target domain.com run
|
||||||
python3 aiobrute.py --target ./domains.txt run
|
python3 aiobrute.py --target ./domains.txt run
|
||||||
python3 aiobrute.py --target example.com --processes 4 --coroutine 64
|
python3 aiobrute.py --target example.com --process 4 --coroutine 64 run
|
||||||
python3 aiobrute.py --target example.com --wordlist subdomains.txt run
|
python3 aiobrute.py --target example.com --wordlist subdomains.txt run
|
||||||
python3 aiobrute.py --target example.com --recursive True --depth 2 run
|
python3 aiobrute.py --target example.com --recursive True --depth 2 run
|
||||||
python3 aiobrute.py --target m.{fuzz}.a.bz --fuzz True --rule [a-z] run
|
python3 aiobrute.py --target m.{fuzz}.a.bz --fuzz True --rule [a-z] run
|
||||||
@@ -149,7 +149,7 @@ class AIOBrute(Module):
|
|||||||
参数path为None会根据format参数和域名名称在项目结果目录生成相应文件
|
参数path为None会根据format参数和域名名称在项目结果目录生成相应文件
|
||||||
|
|
||||||
:param str target: 单个域名或者每行一个域名的文件路径
|
:param str target: 单个域名或者每行一个域名的文件路径
|
||||||
:param int processes: 爆破的进程数(默认CPU核心数)
|
:param int process: 爆破的进程数(默认CPU核心数)
|
||||||
:param int coroutine: 每个爆破进程下的协程数(默认64)
|
:param int coroutine: 每个爆破进程下的协程数(默认64)
|
||||||
:param str wordlist: 指定爆破所使用的字典路径(默认使用config.py配置)
|
:param str wordlist: 指定爆破所使用的字典路径(默认使用config.py配置)
|
||||||
:param int segment: 爆破任务分割(默认500)
|
:param int segment: 爆破任务分割(默认500)
|
||||||
@@ -165,7 +165,7 @@ class AIOBrute(Module):
|
|||||||
:param bool show: 终端显示导出数据(默认False)
|
:param bool show: 终端显示导出数据(默认False)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, target, processes=None, coroutine=64, wordlist=None,
|
def __init__(self, target, process=None, coroutine=64, wordlist=None,
|
||||||
segment=500, recursive=False, depth=2, namelist=None,
|
segment=500, recursive=False, depth=2, namelist=None,
|
||||||
fuzz=False, rule=None, export=True, valid=None, format='xlsx',
|
fuzz=False, rule=None, export=True, valid=None, format='xlsx',
|
||||||
path=None, show=False):
|
path=None, show=False):
|
||||||
@@ -175,7 +175,7 @@ class AIOBrute(Module):
|
|||||||
self.module = 'Brute'
|
self.module = 'Brute'
|
||||||
self.source = 'AIOBrute'
|
self.source = 'AIOBrute'
|
||||||
self.target = target
|
self.target = target
|
||||||
self.processes = processes or config.brute_processes_num
|
self.process = process or config.brute_process_num
|
||||||
self.coroutine = coroutine or config.brute_coroutine_num
|
self.coroutine = coroutine or config.brute_coroutine_num
|
||||||
self.wordlist = wordlist or config.brute_wordlist_path
|
self.wordlist = wordlist or config.brute_wordlist_path
|
||||||
self.segment = segment or config.brute_task_segment
|
self.segment = segment or config.brute_task_segment
|
||||||
@@ -242,7 +242,7 @@ class AIOBrute(Module):
|
|||||||
logger.log('INFOR', f'正在爆破{domain}的域名')
|
logger.log('INFOR', f'正在爆破{domain}的域名')
|
||||||
for task in tqdm.tqdm(tasks, desc='Progress',
|
for task in tqdm.tqdm(tasks, desc='Progress',
|
||||||
smoothing=1.0, ncols=True):
|
smoothing=1.0, ncols=True):
|
||||||
async with aiomp.Pool(processes=self.processes,
|
async with aiomp.Pool(processes=self.process,
|
||||||
initializer=init_worker,
|
initializer=init_worker,
|
||||||
childconcurrency=self.coroutine) as pool:
|
childconcurrency=self.coroutine) as pool:
|
||||||
try:
|
try:
|
||||||
@@ -269,7 +269,7 @@ class AIOBrute(Module):
|
|||||||
if not rx_queue:
|
if not rx_queue:
|
||||||
rx_queue = queue.Queue()
|
rx_queue = queue.Queue()
|
||||||
logger.log('INFOR', f'开始执行{self.source}模块爆破域名{self.domain}')
|
logger.log('INFOR', f'开始执行{self.source}模块爆破域名{self.domain}')
|
||||||
logger.log('INFOR', f'使用{self.processes}进程乘{self.coroutine}协程')
|
logger.log('INFOR', f'使用{self.process}进程乘{self.coroutine}协程')
|
||||||
# fuzz模式不使用递归爆破
|
# fuzz模式不使用递归爆破
|
||||||
if self.recursive_brute and not self.fuzz:
|
if self.recursive_brute and not self.fuzz:
|
||||||
logger.log('INFOR', f'开始递归爆破{self.domain}的第1层子域')
|
logger.log('INFOR', f'开始递归爆破{self.domain}的第1层子域')
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ enable_brute_module = False # 使用爆破模块(默认禁用)
|
|||||||
enable_verify_subdomain = True # 验证子域有效性(默认True)
|
enable_verify_subdomain = True # 验证子域有效性(默认True)
|
||||||
enable_wildcard_check = True # 开启泛解析检测 会去掉泛解析的子域
|
enable_wildcard_check = True # 开启泛解析检测 会去掉泛解析的子域
|
||||||
# 爆破时使用的进程数(根据系统中CPU数量情况设置 不宜大于CPU数量 默认为系统中的CPU数量)
|
# 爆破时使用的进程数(根据系统中CPU数量情况设置 不宜大于CPU数量 默认为系统中的CPU数量)
|
||||||
brute_processes_num = os.cpu_count()
|
brute_process_num = os.cpu_count()
|
||||||
brute_coroutine_num = 128 # 爆破时每个进程下的协程数(不宜大于1000)
|
brute_coroutine_num = 128 # 爆破时每个进程下的协程数(不宜大于1000)
|
||||||
# 爆破所使用的字典路径 默认data/subdomains.txt
|
# 爆破所使用的字典路径 默认data/subdomains.txt
|
||||||
brute_wordlist_path = data_storage_path.joinpath('subdomains.txt')
|
brute_wordlist_path = data_storage_path.joinpath('subdomains.txt')
|
||||||
|
|||||||
@@ -18,13 +18,13 @@ def export(table, db=None, valid=None, path=None, format='xlsx', show=False):
|
|||||||
OneForAll数据库导出模块
|
OneForAll数据库导出模块
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
python dbexport.py --table name --format csv --path= ./result.csv
|
python3 dbexport.py --table name --format csv --path= ./result.csv
|
||||||
python dbexport.py --db result.db --table name --show False
|
python3 dbexport.py --db result.db --table name --show False
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
参数valid可选值1,0,None,分别表示导出有效,无效,全部子域
|
参数port可选值有'small', 'medium', 'large', 'xlarge',详见config.py配置
|
||||||
参数format可选格式:'csv', 'tsv', 'json', 'yaml', 'html', 'jira',
|
参数format可选格式有'csv', 'tsv', 'json', 'yaml', 'html', 'xls', 'xlsx',
|
||||||
'xls', 'xlsx', 'dbf', 'latex', 'ods'
|
'dbf', 'latex', 'ods'
|
||||||
参数path为None会根据format参数和域名名称在项目结果目录生成相应文件
|
参数path为None会根据format参数和域名名称在项目结果目录生成相应文件
|
||||||
|
|
||||||
:param str table: 要导出的表
|
:param str table: 要导出的表
|
||||||
|
|||||||
@@ -45,12 +45,14 @@ class OneForAll(object):
|
|||||||
Project: https://git.io/fjHT1
|
Project: https://git.io/fjHT1
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
python oneforall.py --target example.com run
|
python3 oneforall.py --target example.com run
|
||||||
python oneforall.py --target ./domains.txt run
|
python3 oneforall.py --target ./domains.txt run
|
||||||
python oneforall.py --target example.com --valid None run
|
python3 oneforall.py --target example.com --valid None run
|
||||||
python oneforall.py --target example.com --brute True --port medium run
|
python3 oneforall.py --target example.com --brute True run
|
||||||
python oneforall.py --target example.com --format csv --path result.csv
|
python3 oneforall.py --target example.com --port medium run
|
||||||
python oneforall.py --target example.com --verify False --show True run
|
python3 oneforall.py --target example.com --format csv run
|
||||||
|
python3 oneforall.py --target example.com --verify False run
|
||||||
|
python3 oneforall.py --target example.com --show True run
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
参数valid可选值1,0,None分别表示导出有效,无效,全部子域
|
参数valid可选值1,0,None分别表示导出有效,无效,全部子域
|
||||||
|
|||||||
Reference in New Issue
Block a user