mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
优化
This commit is contained in:
@@ -465,7 +465,7 @@ class Brute(Module):
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
brute.py --target domain.com --word True run
|
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 --process 1 run
|
||||||
brute.py --target domain.com --word True --wordlist subnames.txt run
|
brute.py --target domain.com --word True --wordlist subnames.txt run
|
||||||
brute.py --target domain.com --word True --recursive True --depth 2 run
|
brute.py --target domain.com --word True --recursive True --depth 2 run
|
||||||
@@ -475,10 +475,11 @@ class Brute(Module):
|
|||||||
Note:
|
Note:
|
||||||
--alive True/False Only export alive subdomains or not (default False)
|
--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)
|
--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 process: Number of processes (default 1)
|
||||||
:param int concurrent: Number of concurrent (default 10000)
|
:param int concurrent: Number of concurrent (default 10000)
|
||||||
:param bool word: Use word mode generate dictionary (default False)
|
: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 bool export: Export the results (default True)
|
||||||
:param str format: Result format (default csv)
|
:param str format: Result format (default csv)
|
||||||
:param str path: Result directory (default None)
|
:param str path: Result directory (default None)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, target, process=None, concurrent=None, word=False,
|
def __init__(self, target=None, targets=None, process=None, concurrent=None,
|
||||||
wordlist=None, recursive=False, depth=None, nextlist=None,
|
word=False, wordlist=None, recursive=False, depth=None, nextlist=None,
|
||||||
fuzz=False, place=None, rule=None, fuzzlist=None, export=True,
|
fuzz=False, place=None, rule=None, fuzzlist=None, export=True,
|
||||||
alive=True, format='csv', path=None):
|
alive=True, format='csv', path=None):
|
||||||
Module.__init__(self)
|
Module.__init__(self)
|
||||||
self.module = 'Brute'
|
self.module = 'Brute'
|
||||||
self.source = 'Brute'
|
self.source = 'Brute'
|
||||||
self.target = target
|
self.target = target
|
||||||
|
self.targets = targets
|
||||||
self.process_num = process or utils.get_process_num()
|
self.process_num = process or utils.get_process_num()
|
||||||
self.concurrent_num = concurrent or settings.brute_concurrent_num
|
self.concurrent_num = concurrent or settings.brute_concurrent_num
|
||||||
self.word = word
|
self.word = word
|
||||||
@@ -649,7 +650,7 @@ class Brute(Module):
|
|||||||
logger.log('INFOR', f'Start running {self.source} module')
|
logger.log('INFOR', f'Start running {self.source} module')
|
||||||
if self.check_env:
|
if self.check_env:
|
||||||
utils.check_env()
|
utils.check_env()
|
||||||
self.domains = utils.get_domains(self.target)
|
self.domains = utils.get_domains(self.target, self.targets)
|
||||||
all_subdomains = list()
|
all_subdomains = list()
|
||||||
for self.domain in self.domains:
|
for self.domain in self.domains:
|
||||||
self.check_brute_params()
|
self.check_brute_params()
|
||||||
|
|||||||
+1
-1
@@ -145,7 +145,7 @@ def get_from_targets(targets):
|
|||||||
return domains
|
return domains
|
||||||
|
|
||||||
|
|
||||||
def get_domains(target, targets):
|
def get_domains(target, targets=None):
|
||||||
logger.log('DEBUG', f'Getting domains')
|
logger.log('DEBUG', f'Getting domains')
|
||||||
target_domains = get_from_target(target)
|
target_domains = get_from_target(target)
|
||||||
targets_domains = get_from_targets(targets)
|
targets_domains = get_from_targets(targets)
|
||||||
|
|||||||
@@ -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).
|
- 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).
|
- 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.
|
- 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
@@ -68,17 +68,17 @@ class OneForAll(object):
|
|||||||
--alive True/False Only export alive subdomains or not (default False)
|
--alive True/False Only export alive subdomains or not (default False)
|
||||||
--port small/medium/large See details in ./config/setting.py(default small)
|
--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 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 target: One domain (target or targets must be provided)
|
||||||
:param str targets: File path of one domain per line
|
:param str targets: File path of one domain per line
|
||||||
:param bool brute: Use brute module (default False)
|
:param bool brute: Use brute module (default False)
|
||||||
:param bool dns: Use DNS resolution (default True)
|
:param bool dns: Use DNS resolution (default True)
|
||||||
:param bool req: HTTP request subdomains (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 bool alive: Only export alive subdomains (default False)
|
||||||
:param str format: Result format (default csv)
|
:param str format: Result format (default csv)
|
||||||
:param str path: Result path (default None, automatically generated)
|
:param str path: Result path (default None, automatically generated)
|
||||||
:param bool takeover: Scan subdomain takeover (default False)
|
:param bool takeover: Scan subdomain takeover (default False)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -269,13 +269,10 @@ class OneForAll(object):
|
|||||||
self.config_param()
|
self.config_param()
|
||||||
self.check_param()
|
self.check_param()
|
||||||
self.domains = utils.get_domains(self.target, self.targets)
|
self.domains = utils.get_domains(self.target, self.targets)
|
||||||
if self.domains:
|
for domain in self.domains:
|
||||||
for domain in self.domains:
|
self.domain = utils.get_main_domain(domain)
|
||||||
self.domain = utils.get_main_domain(domain)
|
self.main()
|
||||||
self.main()
|
utils.export_all(self.alive, self.format, self.path, self.datas)
|
||||||
utils.export_all(self.alive, self.format, self.path, self.datas)
|
|
||||||
else:
|
|
||||||
logger.log('FATAL', 'Failed to obtain domain')
|
|
||||||
logger.log('INFOR', 'Finished OneForAll')
|
logger.log('INFOR', 'Finished OneForAll')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user