mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
默认请求只探测80端口
This commit is contained in:
+2
-2
@@ -163,7 +163,7 @@ The OneForAll command line interface is based on [Fire](https://github.com/googl
|
||||
valid, invalid, and all subdomains, respectively.
|
||||
Parameter verify for True attempts to resolve and request the subdomain
|
||||
and tag the validity of the subdomain based on the result.
|
||||
Parameter port have optional values 'small', 'medium', 'large', 'xlarge',
|
||||
Parameter port have optional values 'default' 'small', 'medium', 'large',
|
||||
See config.py configuration for details.
|
||||
Parameter format have optional values 'txt', 'rst', 'csv', 'tsv', 'json',
|
||||
'yaml', 'html', 'jira', 'xls', 'xlsx', 'dbf', 'latex', 'ods'.
|
||||
@@ -181,7 +181,7 @@ The OneForAll command line interface is based on [Fire](https://github.com/googl
|
||||
--verify=VERIFY
|
||||
Verify the validity of subdomains (default True)
|
||||
--port=PORT
|
||||
Port range for request authentication (default medium)
|
||||
Port range for request authentication (default 80 port)
|
||||
--valid=VALID
|
||||
Export validity of subdomains (default 1)
|
||||
--path=PATH
|
||||
|
||||
@@ -159,7 +159,7 @@ OneForAll命令行界面基于[Fire](https://github.com/google/python-fire/)实
|
||||
Note:
|
||||
参数valid可选值1,0,None分别表示导出有效,无效,全部子域
|
||||
参数verify为True会尝试解析和请求子域并根据结果给子域有效性打上标签
|
||||
参数port可选值有'small', 'medium', 'large', 'xlarge',详见config.py配置
|
||||
参数port可选值有'default', 'small', 'medium', 'large' 详见config.py配置
|
||||
参数format可选格式有'txt', 'rst', 'csv', 'tsv', 'json', 'yaml', 'html',
|
||||
'jira', 'xls', 'xlsx', 'dbf', 'latex', 'ods'
|
||||
参数path为None会根据format参数和域名名称在项目结果目录生成相应文件
|
||||
@@ -174,7 +174,7 @@ OneForAll命令行界面基于[Fire](https://github.com/google/python-fire/)实
|
||||
--verify=VERIFY
|
||||
验证子域有效性(默认True)
|
||||
--port=PORT
|
||||
请求验证的端口范围(默认medium)
|
||||
请求验证的端口范围(默认只探测80端口)
|
||||
--valid=VALID
|
||||
导出子域的有效性(默认1)
|
||||
--path=PATH
|
||||
|
||||
@@ -20,19 +20,25 @@ def get_limit_conn():
|
||||
|
||||
|
||||
def get_ports(port):
|
||||
logger.log('INFOR', f'正在获取请求端口范围')
|
||||
logger.log('DEBUG', f'正在获取请求探测端口范围')
|
||||
ports = set()
|
||||
if isinstance(port, set):
|
||||
ports = port
|
||||
elif isinstance(port, str):
|
||||
if port not in {'small', 'medium', 'large', 'xlarge'}:
|
||||
logger.log('ERROR', f'不存在{port}等端口范围')
|
||||
port = 'medium'
|
||||
elif isinstance(port, list):
|
||||
ports = set(port)
|
||||
elif isinstance(port, tuple):
|
||||
ports = set(port)
|
||||
elif isinstance(port, int):
|
||||
if 0 <= port <= 65535:
|
||||
ports = {port}
|
||||
elif port in {'default', 'small', 'medium', 'large'}:
|
||||
logger.log('INFOR', f'探测{port}等端口范围')
|
||||
ports = config.ports.get(port)
|
||||
logger.log('INFOR', f'使用{port}等端口范围')
|
||||
if not ports: # 意外情况 ports_range为空使用使用中等端口范围
|
||||
logger.log('ALERT', f'使用medium等端口范围')
|
||||
ports = config.ports.get('medium')
|
||||
if not ports: # 意外情况
|
||||
logger.log('ERROR', f'指定探测端口范围有误')
|
||||
ports = {80}
|
||||
if ports == {80}:
|
||||
logger.log('INFOR', f'探测默认端口范围')
|
||||
return ports
|
||||
|
||||
|
||||
|
||||
+8
-9
@@ -84,21 +84,21 @@ resolver_timeout = 5.0 # 解析超时时间
|
||||
resolver_lifetime = 30.0 # 解析存活时间
|
||||
limit_resolve_conn = 500 # 限制同一时间解析的数量(默认500)
|
||||
|
||||
# http探测设置
|
||||
small_ports = {80, 443}
|
||||
medium_ports = {80, 443, 8000, 8080, 8443} # 默认使用
|
||||
large_ports = {80, 81, 443, 591, 2082, 2087, 2095, 2096, 3000, 8000, 8001,
|
||||
# 请求端口探测设置
|
||||
default_ports = {80} # 默认使用
|
||||
small_ports = {80, 443, 8000, 8080, 8443}
|
||||
medium_ports = {80, 81, 443, 591, 2082, 2087, 2095, 2096, 3000, 8000, 8001,
|
||||
8008, 8080, 8083, 8443, 8834, 8888}
|
||||
xlarge_ports = {80, 81, 300, 443, 591, 593, 832, 981, 1010, 1311, 2082,
|
||||
large_ports = {80, 81, 300, 443, 591, 593, 832, 888, 981, 1010, 1311, 2082,
|
||||
2087, 2095, 2096, 2480, 3000, 3128, 3333, 4243, 4567, 4711,
|
||||
4712, 4993, 5000, 5104, 5108, 5800, 6543, 7000, 7396, 7474,
|
||||
8000, 8001, 8008, 8014, 8042, 8069, 8080, 8081, 8088, 8090,
|
||||
8091, 8016, 8118, 8123, 8172, 8222, 8243, 8280, 8281, 8333,
|
||||
8443, 8500, 8834, 8880, 8888, 8983, 9000, 9043, 9060, 9080,
|
||||
9090, 9091, 9200, 9443, 9800, 9981, 12443, 16080, 18091, 18092,
|
||||
20720, 28017}
|
||||
ports = {'small': small_ports, 'medium': medium_ports,
|
||||
'large': large_ports, 'xlarge': xlarge_ports}
|
||||
20720, 28017} # 可以在这里面添加端口
|
||||
ports = {'default': default_ports, 'small': small_ports,
|
||||
'medium': medium_ports, 'large': large_ports}
|
||||
verify_ssl = False
|
||||
# aiohttp 支持 HTTP/HTTPS形式的代理
|
||||
get_proxy = None # proxy="http://user:pass@some.proxy.com"
|
||||
@@ -110,7 +110,6 @@ limit_open_conn = 0
|
||||
# 限制同一时间在同一个端点((host, port, is_ssl) 3者都一样的情况)打开的连接数
|
||||
limit_per_host = 0 # 默认0表示不限制
|
||||
|
||||
|
||||
# 模块API配置
|
||||
# Censys可以免费注册获取API:https://censys.io/api
|
||||
censys_api_id = ''
|
||||
|
||||
@@ -59,20 +59,20 @@ class OneForAll(object):
|
||||
Note:
|
||||
参数valid可选值1,0,None分别表示导出有效,无效,全部子域
|
||||
参数verify为True会尝试解析和请求子域并根据结果给子域有效性打上标签
|
||||
参数port可选值有'small', 'medium', 'large', 'xlarge',详见config.py配置
|
||||
参数port可选值有'default', 'small', 'medium', 'large', 详见config.py配置
|
||||
参数format可选格式有'txt', 'rst', 'csv', 'tsv', 'json', 'yaml', 'html',
|
||||
'jira', 'xls', 'xlsx', 'dbf', 'latex', 'ods'
|
||||
|
||||
:param str target: 单个域名或者每行一个域名的文件路径(必需参数)
|
||||
:param bool brute: 使用爆破模块(默认False)
|
||||
:param bool verify: 验证子域有效性(默认True)
|
||||
:param str port: 请求验证的端口范围(默认medium)
|
||||
:param str port: 请求验证子域的端口范围(默认只探测80端口)
|
||||
:param int valid: 导出子域的有效性(默认1)
|
||||
:param str format: 导出格式(默认csv)
|
||||
:param bool show: 终端显示导出数据(默认False)
|
||||
"""
|
||||
def __init__(self, target, brute=None, verify=None, port='medium', valid=1,
|
||||
format='csv', takeover=True, show=False):
|
||||
def __init__(self, target, brute=None, verify=None, port='default',
|
||||
valid=1, format='csv', takeover=True, show=False):
|
||||
self.target = target
|
||||
self.port = port
|
||||
self.domains = set()
|
||||
|
||||
Reference in New Issue
Block a user