This commit is contained in:
Jing Ling
2020-08-17 18:32:02 +08:00
parent 4b7bd3dcbc
commit 482c7d6ba2
4 changed files with 20 additions and 22 deletions
+8 -7
View File
@@ -465,7 +465,7 @@ class Brute(Module):
Example
brute.py --target domain.com --word True run
brute.py --target ./domains.txt --word True run
brute.py --targets ./domains.txt --word True run
brute.py --target domain.com --word True --process 1 run
brute.py --target domain.com --word True --wordlist subnames.txt run
brute.py --target domain.com --word True --recursive True --depth 2 run
@@ -475,10 +475,11 @@ class Brute(Module):
Note:
--alive True/False Only export alive subdomains or not (default False)
--format rst/csv/tsv/json/yaml/html/jira/xls/xlsx/dbf/latex/ods (result format)
--path Result directory (default directory is ./results)
--path Result path (default None, automatically generated)
:param str target: One domain or File path of one domain per line (required)
:param str target: One domain (target or targets must be provided)
:param str targets: File path of one domain per line
:param int process: Number of processes (default 1)
:param int concurrent: Number of concurrent (default 10000)
:param bool word: Use word mode generate dictionary (default False)
@@ -494,17 +495,17 @@ class Brute(Module):
:param bool export: Export the results (default True)
:param str format: Result format (default csv)
:param str path: Result directory (default None)
"""
def __init__(self, target, process=None, concurrent=None, word=False,
wordlist=None, recursive=False, depth=None, nextlist=None,
def __init__(self, target=None, targets=None, process=None, concurrent=None,
word=False, wordlist=None, recursive=False, depth=None, nextlist=None,
fuzz=False, place=None, rule=None, fuzzlist=None, export=True,
alive=True, format='csv', path=None):
Module.__init__(self)
self.module = 'Brute'
self.source = 'Brute'
self.target = target
self.targets = targets
self.process_num = process or utils.get_process_num()
self.concurrent_num = concurrent or settings.brute_concurrent_num
self.word = word
@@ -649,7 +650,7 @@ class Brute(Module):
logger.log('INFOR', f'Start running {self.source} module')
if self.check_env:
utils.check_env()
self.domains = utils.get_domains(self.target)
self.domains = utils.get_domains(self.target, self.targets)
all_subdomains = list()
for self.domain in self.domains:
self.check_brute_params()
+1 -1
View File
@@ -145,7 +145,7 @@ def get_from_targets(targets):
return domains
def get_domains(target, targets):
def get_domains(target, targets=None):
logger.log('DEBUG', f'Getting domains')
target_domains = get_from_target(target)
targets_domains = get_from_targets(targets)
+1 -1
View File
@@ -82,7 +82,7 @@ The OneForAll command line interface is based on [Fire](https://github.com/googl
- First, it is mainly compared with the pan-parsed IP set and TTL values, see [this article](http://sh3ll.me/archives/201704041222.txt).
- Second, the number of times to resolve to the same IP collection multiple times (the default is 10, which can be set to size in config.py).
- Third, considering the blasting efficiency, there is no HTTP response volume similarity comparison and response volume content judgment, this function has not been implemented yet, and will be implemented if necessary.
+10 -13
View File
@@ -68,17 +68,17 @@ class OneForAll(object):
--alive True/False Only export alive subdomains or not (default False)
--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)
--path Result path (default directory is ./results)
--path Result path (default None, automatically generated)
:param str target: One domain (target or targets must be required)
:param str targets: File path of one domain per line
:param str target: One domain (target or targets must be provided)
:param str targets: File path of one domain per line
:param bool brute: Use brute module (default False)
:param bool dns: Use DNS resolution (default True)
:param bool req: HTTP request subdomains (default True)
:param str port: The port range to request (default small port is 80,443)
:param str port: The port range to request (default small port is 80,443)
:param bool alive: Only export alive subdomains (default False)
:param str format: Result format (default csv)
:param str path: Result path (default None, automatically generated)
:param str format: Result format (default csv)
:param str path: Result path (default None, automatically generated)
:param bool takeover: Scan subdomain takeover (default False)
"""
@@ -269,13 +269,10 @@ class OneForAll(object):
self.config_param()
self.check_param()
self.domains = utils.get_domains(self.target, self.targets)
if self.domains:
for domain in self.domains:
self.domain = utils.get_main_domain(domain)
self.main()
utils.export_all(self.alive, self.format, self.path, self.datas)
else:
logger.log('FATAL', 'Failed to obtain domain')
for domain in self.domains:
self.domain = utils.get_main_domain(domain)
self.main()
utils.export_all(self.alive, self.format, self.path, self.datas)
logger.log('INFOR', 'Finished OneForAll')
@staticmethod