From 49e427864756bc6861ab01eec3dfb380260f6e51 Mon Sep 17 00:00:00 2001 From: shmilylty Date: Mon, 12 Aug 2019 18:41:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9output=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=B8=BAshow=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oneforall/aiobrute.py | 8 +++++--- oneforall/dbexport.py | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/oneforall/aiobrute.py b/oneforall/aiobrute.py index 95a5361..c5bf69b 100644 --- a/oneforall/aiobrute.py +++ b/oneforall/aiobrute.py @@ -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): # 统一入口名字 方便多线程调用 diff --git a/oneforall/dbexport.py b/oneforall/dbexport.py index 4a48a07..0012fc5 100644 --- a/oneforall/dbexport.py +++ b/oneforall/dbexport.py @@ -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