From 887a2fbd29fa33d5036ce4f7a94522334c9cc9d4 Mon Sep 17 00:00:00 2001 From: JrD <421273918@qq.com> Date: Sun, 27 Sep 2020 18:40:26 +0800 Subject: [PATCH 1/4] typo --- README.md | 4 ++-- docs/en-us/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 225a5bc..b9e54d0 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ pipenv run python oneforall.py --target example.com run ``` 3. 开启爆破模块运行(使用massdns进行爆破,网络占用极大,可能会阻塞网络) ```bash -python3 run python oneforall.py --target example.com --brute True run +python3 oneforall.py --target example.com --brute True run # or pipenv run python oneforall.py --target example.com --brute True run ``` @@ -200,7 +200,7 @@ ARGUMENTS FLAGS --brute=BRUTE - 使用爆破模块(默认True) + s --dns=DNS DNS解析子域(默认True) --req=REQ diff --git a/docs/en-us/README.md b/docs/en-us/README.md index cff5668..b74ed48 100644 --- a/docs/en-us/README.md +++ b/docs/en-us/README.md @@ -106,7 +106,7 @@ pipenv run python oneforall.py --target example.com run 3. Turn on brute modules, run the following command(Use massdns for enumerating subdomains, the network may be blocked): ```bash -python3 run python oneforall.py --target example.com --brute True run +python3 oneforall.py --target example.com --brute True run # or pipenv run python oneforall.py --target example.com --brute True run ``` From 5e2da897d5f205a43702a87a0ddac003efa0813e Mon Sep 17 00:00:00 2001 From: Jing Ling Date: Wed, 30 Sep 2020 17:52:58 +0800 Subject: [PATCH 2/4] fixed #147 --- brute.py | 16 ++++++++++------ docs/en-us/usage_help.md | 4 ++-- docs/usage_help.md | 4 ++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/brute.py b/brute.py index cd73a7f..73e17a4 100644 --- a/brute.py +++ b/brute.py @@ -556,7 +556,7 @@ class Brute(Module): brute.py --target d.com --fuzz True --place m.*.d.com --fuzzlist subnames.txt run Note: - --format rst/csv/tsv/json/yaml/html/jira/xls/xlsx/dbf/latex/ods (result format) + --format csv/json (result format) --path Result path (default None, automatically generated) @@ -614,7 +614,9 @@ class Brute(Module): logger.log('INFOR', f'Generating dictionary for {domain}') dict_set = set() # 如果domain不是self.subdomain 而是self.domain的子域则生成递归爆破字典 - if self.place is None: + if self.word: + self.place = '' + if not self.place: self.place = '*.' + domain wordlist = self.wordlist main_domain = utils.get_main_domain(domain) @@ -728,13 +730,15 @@ class Brute(Module): if self.check_env: utils.check_env() self.domains = utils.get_domains(self.target, self.targets) - all_subdomains = list() for self.domain in self.domains: + self.results = list() # 置空 + all_subdomains = list() self.check_brute_params() if self.recursive_brute: logger.log('INFOR', f'Start recursively brute the 1 layer subdomain' f' of {self.domain}') valid_subdomains = self.main(self.domain) + all_subdomains.extend(valid_subdomains) # 递归爆破下一层的子域 @@ -742,8 +746,8 @@ class Brute(Module): if self.recursive_brute: for layer_num in range(1, self.recursive_depth): # 之前已经做过1层子域爆破 当前实际递归层数是layer+1 - logger.log('INFOR', f'Start recursively brute the {layer_num + 1} layer' - f' subdomain of {self.domain}') + logger.log('INFOR', f'Start recursively brute the {layer_num + 1} ' + f'layer subdomain of {self.domain}') for subdomain in all_subdomains: self.place = '*.' + subdomain # 进行下一层子域爆破的限制条件 @@ -752,7 +756,7 @@ class Brute(Module): valid_subdomains = self.main(subdomain) all_subdomains.extend(valid_subdomains) - logger.log('INFOR', f'Finished {self.source} module\'s brute {self.domain}') + logger.log('INFOR', f'Finished {self.source} module to brute {self.domain}') if not self.path: name = f'{self.domain}_brute_result.{self.format}' self.path = settings.result_save_dir.joinpath(name) diff --git a/docs/en-us/usage_help.md b/docs/en-us/usage_help.md index 46b64da..42cce71 100644 --- a/docs/en-us/usage_help.md +++ b/docs/en-us/usage_help.md @@ -40,7 +40,7 @@ DESCRIPTION Note: --port small/medium/large See details in ./config/setting.py(default small) - --format rst/csv/tsv/json/yaml/html/jira/xls/xlsx/dbf/latex/ods (result format) + --format csv/json (result format) --path Result path (default None, automatically generated) FLAGS @@ -220,4 +220,4 @@ FLAGS Result format (default csv) --show=SHOW Displays the exported data in terminal (default False) -``` \ No newline at end of file +``` diff --git a/docs/usage_help.md b/docs/usage_help.md index d1f3dc1..39231c9 100644 --- a/docs/usage_help.md +++ b/docs/usage_help.md @@ -39,7 +39,7 @@ OneForAll命令行界面基于[Fire](https://github.com/google/python-fire/)实 Note: --port small/medium/large 详见./config/setting.py(默认small) - --format rst/csv/tsv/json/yaml/html/jira/xls/xlsx/dbf/latex/ods (结果格式,默认CSV) + --format csv/json (结果格式,默认CSV) --path 结果路径(默认None,自动生成) FLAGS @@ -222,4 +222,4 @@ OneForAll命令行界面基于[Fire](https://github.com/google/python-fire/)实 导出格式(默认xlsx) --show=SHOW 终端显示导出数据(默认False) - ``` \ No newline at end of file + ``` From d387329fffe188a9748e8a80de86a920f8c7db7f Mon Sep 17 00:00:00 2001 From: Jing Ling Date: Wed, 30 Sep 2020 17:53:37 +0800 Subject: [PATCH 3/4] typos --- config/setting.py | 2 +- oneforall.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/setting.py b/config/setting.py index 824c871..4ed03f0 100644 --- a/config/setting.py +++ b/config/setting.py @@ -59,7 +59,7 @@ delete_massdns_result = True only_save_valid = True # 是否在处理爆破结果时只存入解析成功的子域 check_time = 10 # 检查字典配置停留时间(默认10秒) enable_fuzz = False # 是否使用fuzz模式枚举域名 -fuzz_place = None # 指定爆破的位置 指定的位置用`@`表示 示例:www.@.example.com +fuzz_place = None # 指定爆破的位置 指定的位置用`*`表示 示例:www.*.example.com fuzz_rule = None # fuzz域名的正则 示例:'[a-z][0-9]' 表示第一位是字母 第二位是数字 brute_ip_blacklist = {'0.0.0.0', '0.0.0.1'} # IP黑名单 子域解析到IP黑名单则标记为非法子域 ip_appear_maximum = 100 # 多个子域解析到同一IP次数超过100次则标记为非法(泛解析)子域 diff --git a/oneforall.py b/oneforall.py index bdde08d..cb84655 100644 --- a/oneforall.py +++ b/oneforall.py @@ -68,7 +68,7 @@ class OneForAll(object): Note: --port small/medium/large See details in ./config/setting.py(default small) - --format rst/csv/tsv/json/yaml/html/jira/xls/xlsx/dbf/latex/ods (result format) + --format csv/json (result format) --path Result path (default None, automatically generated) :param str target: One domain (target or targets must be provided) From e9f6256e3f6833c3c81b5cd11c497e50d772faf4 Mon Sep 17 00:00:00 2001 From: JrD <421273918@qq.com> Date: Sat, 10 Oct 2020 10:25:21 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=9A=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E9=BB=98=E8=AE=A4=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/utils.py b/common/utils.py index 5a08d10..323689a 100644 --- a/common/utils.py +++ b/common/utils.py @@ -494,7 +494,7 @@ def get_process_num(): def get_request_count(): - return os.cpu_count() * 10 + return 32 def uniq_dict_list(dict_list):