mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 12:57:50 +08:00
修改output参数为show参数
This commit is contained in:
@@ -162,13 +162,13 @@ class AIOBrute(Module):
|
||||
:param int valid: 导出子域的有效性(默认None)
|
||||
:param str format: 导出格式(默认xlsx)
|
||||
:param str path: 导出路径(默认None)
|
||||
:param
|
||||
:param bool show: 终端显示导出数据(默认False)
|
||||
"""
|
||||
|
||||
def __init__(self, target, processes=None, coroutine=64, wordlist=None,
|
||||
segment=500, recursive=False, depth=2, namelist=None,
|
||||
fuzz=False, rule=None, export=True, valid=None, format='xlsx',
|
||||
path=None):
|
||||
path=None, show=False):
|
||||
Module.__init__(self)
|
||||
self.domains = set()
|
||||
self.domain = str()
|
||||
@@ -188,6 +188,7 @@ class AIOBrute(Module):
|
||||
self.valid = valid
|
||||
self.format = format
|
||||
self.path = path
|
||||
self.show = show
|
||||
self.nameservers = config.resolver_nameservers
|
||||
self.ips_times = dict() # IP集合出现次数
|
||||
self.enable_wildcard = False # 当前域名是否使用泛解析
|
||||
@@ -311,7 +312,8 @@ class AIOBrute(Module):
|
||||
dbexport.export(self.domain,
|
||||
valid=self.valid,
|
||||
path=self.path,
|
||||
format=self.format)
|
||||
format=self.format,
|
||||
show=self.show)
|
||||
|
||||
|
||||
def do(domain, result): # 统一入口名字 方便多线程调用
|
||||
|
||||
@@ -13,13 +13,13 @@ from common.database import Database
|
||||
from config import logger
|
||||
|
||||
|
||||
def export(table, db=None, valid=None, path=None, format='xlsx', output=False):
|
||||
def export(table, db=None, valid=None, path=None, format='xlsx', show=False):
|
||||
"""
|
||||
OneForAll数据库导出模块
|
||||
|
||||
Example:
|
||||
python dbexport.py --table name --format csv --path= ./result.csv
|
||||
python dbexport.py --db result.db --table name --output False
|
||||
python dbexport.py --db result.db --table name --show False
|
||||
|
||||
Note:
|
||||
参数valid可选值1,0,None,分别表示导出有效,无效,全部子域
|
||||
@@ -32,7 +32,7 @@ def export(table, db=None, valid=None, path=None, format='xlsx', output=False):
|
||||
:param int valid: 导出子域的有效性(默认None)
|
||||
:param str format: 导出格式(默认xlsx)
|
||||
:param str path: 导出路径(默认None)
|
||||
:param bool output: 是否将导出数据输出到终端(默认False)
|
||||
:param bool show: 终端显示导出数据(默认False)
|
||||
"""
|
||||
database = Database(db)
|
||||
if valid is None:
|
||||
@@ -41,7 +41,7 @@ def export(table, db=None, valid=None, path=None, format='xlsx', output=False):
|
||||
rows = database.get_subdomain(table, valid)
|
||||
else:
|
||||
rows = database.get_data(table) # 意外情况导出全部子域
|
||||
if output:
|
||||
if show:
|
||||
print(rows.dataset)
|
||||
if not path:
|
||||
path = 'export.' + format
|
||||
|
||||
Reference in New Issue
Block a user