Git Product home page Git Product logo

oneforall's Issues

结果csv文件中文乱码

是否使用了最新代码
是或否(如果不是的话尝试克隆最新的代码再跑一下)

Bug描述
清晰而简洁的Bug描述

cvs结果文件 中文乱码

如何复现
复现步骤(可不写)
复现命令

预期结果
清晰而简洁的预期结果描述(可不写)

实际结果
清晰而简洁的实际结果描述(如出现什么错误)
打开cvs结果 中文都是乱码
屏幕截图

image

运行环境

  • 系统:[例如Windows 10 x64]
  • Python版本:[例如3.7.1]
  • OneForAll版本:[例如0.0.6]

报错文本
复制完整的报错文本

输出的结果中有的没有reason值

是否使用了最新代码

Bug描述
输出的结果中有的没有reason值

如何复现

pipenv run python .\oneforall.py --target jd.com --format xlsx run

屏幕截图
image

Parent module 'modules.certificates' not loaded, cannot perform relative import

是否使用了最新代码

Bug描述
包导入路径不对

如何复现
复现步骤(可不写)
复现命令
python3 oneforall.py --target xx.com

预期结果
清晰而简洁的预期结果描述(可不写)

实际结果
importlib.import_module('.'+name, package)
包的导入路径问题

屏幕截图

运行环境

  • 系统:mac
  • Python版本:3.6.1

报错文本

Traceback (most recent call last):
  File "oneforall.py", line 161, in <module>
    fire.Fire(OneForAll)
  File "/usr/local/Cellar/python/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/fire/core.py", line 138, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/usr/local/Cellar/python/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/fire/core.py", line 471, in _Fire
    target=component.__name__)
  File "/usr/local/Cellar/python/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/fire/core.py", line 675, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "oneforall.py", line 154, in run
    self.main()
  File "oneforall.py", line 96, in main
    collect.run()
  File "/Users/xx/study/github/OneForAll/oneforall/collect.py", line 58, in run
    self.import_func()
  File "/Users/xx/study/github/OneForAll/oneforall/collect.py", line 48, in import_func
    import_object = importlib.import_module('.'+name, package)
  File "/usr/local/Cellar/python/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 973, in _gcd_import
  File "<frozen importlib._bootstrap>", line 923, in _sanity_check
SystemError: Parent module 'modules.certificates' not loaded, cannot perform relative import

建议在保存结果的时候再进行一些数据处理

  • 1、dns解析后的部分结果结尾存在点号,虽然正常但可能会影响到域名拼接URL、端口,requests访问是正常的,但浏览器访问http://zy.gov.cn.:8080这样格式还是有些不兼容。
  • 2、建议增加一个配置信息,是否允许发现关联域名,比如在扫baidu.com域名的时候会存在shifen.com域名,这时候根域名变了但还是百度的不影响,不过也会有误扫比如在扫政府域名时候出现了sanshua.cn根域。

使用报lxml错误

用了最新代码

全部更新代码,并安装了re文件内的依赖包,报错:
Exception in thread gitee:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/root/tools/OneForAll/oneforall/modules/search/gitee.py", line 70, in do
query.run()
File "/root/tools/OneForAll/oneforall/modules/search/gitee.py", line 56, in run
self.search()
File "/root/tools/OneForAll/oneforall/modules/search/gitee.py", line 36, in search
soup = BeautifulSoup(resp.text, 'lxml')
File "/usr/local/lib/python3.8/site-packages/bs4/init.py", line 225, in init
raise FeatureNotFound(
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

运行环境

  • 系统:centos
  • Python版本:python3.8.0a1
  • OneForAll版本:最新版

如何复现
python3 oneforall --target xxx.com run
中间有两段会报错
报错文本
复制完整的报错文本(必写)
Exception in thread baidu:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/root/tools/OneForAll/oneforall/modules/search/baidu.py", line 105, in do
search.run()
File "/root/tools/OneForAll/oneforall/modules/search/baidu.py", line 78, in run
self.search(self.domain, full_search=True)
File "/root/tools/OneForAll/oneforall/modules/search/baidu.py", line 55, in search
subdomains = self.redirect_match(domain, resp.text)
File "/root/tools/OneForAll/oneforall/modules/search/baidu.py", line 24, in redirect_match
bs = BeautifulSoup(html, features='lxml')
File "/usr/local/lib/python3.8/site-packages/bs4/init.py", line 225, in init
raise FeatureNotFound(
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

image
image
image

预期结果*
别报错就行,如何解决)

实际结果
清晰而简洁的实际结果描述(选写,如出现什么错误)

屏幕截图
完整OneForAll执行流程截图(建议上传)

日志上传
上传oneforall.log日志文件(复杂问题建议上传)

requirements.txt写错了2个

应该是这样得:async_timeout==3.0.1,et_xmlfile==1.0.1
你写成async-timeout==3.0.1,et-xmlfile==1.0.1,pip识别不出来

invalid IP address

是否使用了最新代码

Bug描述
一到域名爆破的时候就出现无效IP的错误提示.

如何复现
使用了自己的subname文件,不知道是不是因为文件里有特殊字符引起的.

预期结果
清晰而简洁的预期结果描述(可不写)

实际结果
清晰而简洁的实际结果描述(如出现什么错误)

屏幕截图
微信图片_20190929181112

运行环境

  • 系统:Windows 7 x64
  • Python版本:3.7.4
  • OneForAll版本:0.0.6

报错文本
Progress: 0%| | 0/366 [00:08<?, ?it/s] Traceback (most recent call last): File "oneforall.py", line 166, in <module> fire.Fire(OneForAll) File "C:\Python37\lib\site-packages\fire\core.py", line 138, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "C:\Python37\lib\site-packages\fire\core.py", line 471, in _Fire target=component.__name__) File "C:\Python37\lib\site-packages\fire\core.py", line 675, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "oneforall.py", line 159, in run self.main() File "oneforall.py", line 99, in main brute.run() File "E:\tools\OneForAll\oneforall\aiobrute.py", line 284, in run loop.run_until_complete(self.main(self.domain, rx_queue)) File "C:\Python37\lib\asyncio\base_events.py", line 584, in run_until_complete return future.result() File "E:\tools\OneForAll\oneforall\aiobrute.py", line 255, in main results = await pool.map(resolve.aiodns_query_a, task) File "C:\Python37\lib\site-packages\aiomultiprocess\core.py", line 434, in map return await self.results(tids) File "C:\Python37\lib\site-packages\aiomultiprocess\core.py", line 398, in results raise ProxyException(tb) aiomultiprocess.core.ProxyException: Traceback (most recent call last): File "C:\Python37\lib\site-packages\aiomultiprocess\core.py", line 298, in run result = future.result() File "E:\tools\OneForAll\oneforall\common\resolve.py", line 53, in aiodns_query_a resolver = aiodns_resolver() File "E:\tools\OneForAll\oneforall\common\resolve.py", line 41, in aiodns_resolver timeout=config.resolver_timeout) File "C:\Python37\lib\site-packages\aiodns\__init__.py", line 46, in __init__ self.nameservers = nameservers File "C:\Python37\lib\site-packages\aiodns\__init__.py", line 59, in nameservers self._channel.servers = value File "C:\Python37\lib\site-packages\pycares\__init__.py", line 433, in servers raise ValueError("invalid IP address") ValueError: invalid IP address

升级了openssl到1.1.1d但是还是报错

是否使用了最新代码

Bug描述
运行oneforall报错:
RuntimeError: Sorry but the OpenSSL being used by this python install (OpenSSL 1.0.2k-fips 26 Jan 2017) does not meet the minimum version (>= OpenSSL 1.1.1) in order to support TLS 1.3 required by Cloudflare.
但是已经升级到openssl 1.1.1d了:
[root@vultr oneforall]# openssl version
OpenSSL 1.1.1d 10 Sep 2019

如何复现
复现步骤(可不写)
复现命令

预期结果
清晰而简洁的预期结果描述(可不写)

实际结果
清晰而简洁的实际结果描述(如出现什么错误)

屏幕截图

运行环境

  • 系统:centos
  • Python版本:3.8.1
  • OneForAll版本:[例如0.0.6]

报错文本
复制完整的报错文本

多级域名问题

是否使用了最新代码
是或否(如果不是的话尝试克隆最新的代码再跑一下)

Bug描述
测试多级域名时会没跑出数据。

如何复现

oneforall.py --target nju.edu.cn run

预期结果

应收集xxxx.nju.edu.cn

实际结果

但是收集的大多数都是edu.cn

屏幕截图

运行环境

  • 系统:mac os
  • Python版本:3.7.0

报错文本
复制完整的报错文本

存在使用大端口范围时获取有效的子域结果数更少的问题

是否使用了最新代码

Bug描述
存在使用大端口范围时获取有效的子域结果数更少的问题

如何复现
复现命令
python3 oneforall.py --target caih.com --format xlsx --port large run

实际结果
使用大端口范围时获取有效的子域结果数更少

屏幕截图

运行环境

  • 系统:[例如Windows 10 x64]
  • Python版本:[例如3.8.0]
  • OneForAll版本:[例如0.0.8]

一直报sqlite3的错误

sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 17616 and this is thread id 17904.

readme 中一处链接大小写错误

上手指南-->安装步骤 中,依赖安装指向
https://github.com/shmilylty/OneForAll/tree/master/docs/installation_dependency.md
因改为
https://github.com/shmilylty/OneForAll/tree/master/docs/Installation_dependency.md
大小写问题😂

sqlite报错

db = records.Database(db_path)  # 不存在数据库时会新建一个数据库

File "/usr/local/lib/python3.7/site-packages/records.py", line 262, in init
self._engine = create_engine(self.db_url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/init.py", line 450, in create_engine
return strategy.create(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py", line 87, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 343, in dbapi
raise e
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 341, in dbapi
from sqlite3 import dbapi2 as sqlite # try 2.5+ stdlib name.
File "/usr/local/lib/python3.7/sqlite3/init.py", line 23, in
from sqlite3.dbapi2 import *
File "/usr/local/lib/python3.7/sqlite3/dbapi2.py", line 27, in
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'

在解析ip的同时,判断是否有CDN?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

运行时报错

是否使用了最新代码
是或否(如果不是的话尝试克隆最新的代码再跑一下)

Bug描述
清晰而简洁的Bug描述
python aiobrute.py
File "aiobrute.py", line 41
logger.log('INFOR', f'姝e湪鎺㈡祴{domain}鏄惁浣跨敤娉涜В鏋?)
^
SyntaxError: invalid syntax
如何复现
复现步骤(可不写)
复现命令
python aiobrute.py
File "aiobrute.py", line 41
logger.log('INFOR', f'姝e湪鎺㈡祴{domain}鏄惁浣跨敤娉涜В鏋?)
^
SyntaxError: invalid syntax
预期结果
清晰而简洁的预期结果描述(可不写)

实际结果
清晰而简洁的实际结果描述(如出现什么错误)

屏幕截图

运行环境

  • 系统:[例如Windows 10 x64]
  • Python版本:[例如3.7.1]
  • OneForAll版本:[例如0.0.6]

Windows 10 x64
git pull 最新的代码
报错文本
复制完整的报错文本
python aiobrute.py
File "aiobrute.py", line 41
logger.log('INFOR', f'姝e湪鎺㈡祴{domain}鏄惁浣跨敤娉涜В鏋?)
^
SyntaxError: invalid syntax

duckduckgo python错误

是否使用了最新代码

Bug描述
默认跑 duckduckgo 报错 19:29:20,608 [ERROR] duckduckgo:45 - list index out of range

如何复现
应该是列表容错错误

预期结果
连接错误/0域名/多数域名

实际结果
列表错误

屏幕截图

运行环境

  • 系统:mac
  • Python版本:3.7.3]
  • OneForAll版本:latest

建议增加status 为302的支持

是否使用了最新代码

Bug描述
valid 为none 其余默认,导出的excel中 部分实际为302跳转的 未看到记录
get_redirects = True
可以提取出 Resoponse中的Location字段
使用最新版

ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol

在运行的时候总是爆如下错误,看样子是异步模块里的SSL问题,不知道如何解决

14:46:11,060 [INFOR] request:24 - 使用medium等端口范围
14:46:11,060 [INFOR] request:32 - 正在生成请求地址
SSL handshake failed
protocol: <asyncio.sslproto.SSLProtocol object at 0x10c6288d0>
transport: <_SelectorSocketTransport fd=32 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 625, in _on_handshake_complete
raise handshake_exc
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:1056)
SSL error in data received
protocol: <asyncio.sslproto.SSLProtocol object at 0x10c6288d0>

ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:1056)
SSL error in data received
protocol: <asyncio.sslproto.SSLProtocol object at 0x10c6d97b8>
transport: <_SelectorSocketTransport closing fd=53 read=idle write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:1056)

ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number

09:55:02,488 [INFOR] request:113 - 正在异步进行子域的GET请求
Traceback (most recent call last):
File "oneforall.py", line 157, in
fire.Fire(OneForAll)
File "E:\ENV\Python3\lib\site-packages\fire\core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "E:\ENV\Python3\lib\site-packages\fire\core.py", line 471, in _Fire
target=component.name)
File "E:\ENV\Python3\lib\site-packages\fire\core.py", line 675, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "oneforall.py", line 150, in run
self.main()
File "oneforall.py", line 128, in main
self.datas = loop.run_until_complete(task)
File "E:\ENV\Python3\lib\asyncio\base_events.py", line 571, in run_until_complete
self.run_forever()
File "E:\ENV\Python3\lib\asyncio\base_events.py", line 539, in run_forever
self._run_once()
File "E:\ENV\Python3\lib\asyncio\base_events.py", line 1739, in _run_once
event_list = self._selector.select(timeout)
File "E:\ENV\Python3\lib\selectors.py", line 323, in select
r, w, _ = self._select(self._readers, self._writers, [], timeout)
File "E:\ENV\Python3\lib\selectors.py", line 314, in _select
r, w, x = select.select(r, w, w, timeout)
ValueError: too many file descriptors in select()
Fatal Python error: PyImport_GetModuleDict: no module dictionary!

Current thread 0x00000fb4 (most recent call first):
File "E:\ENV\Python3\lib\site-packages\pycares_init_.py", line 387 in

config.py 中协程数和字典划分对aiobrute.py 无效

是否使用了最新代码

Bug描述
config.py 中协程数和字典划分对aiobrute.py 无效

如何复现
复现步骤(可不写)
复现命令
py -3 aiobrute.py --target alimama.com --wordlist subdomains.txt --format txt --path 2.txt run
预期结果
清晰而简洁的预期结果描述(可不写)
预期对aiobrute.py 有效
实际结果
config.py 中协程数和字典划分对aiobrute.py 无效

屏幕截图

运行环境

  • 系统:win10
  • Python版本:3.7 因为3.8 pip 安装包老出错 所以用3.7 运行
  • OneForAll版本:当前最新版本

报错文本

爆破时使用的进程数(根据系统中CPU数量情况设置 不宜大于CPU数量 默认为系统中的CPU数量)

brute_process_num = os.cpu_count()
brute_coroutine_num = 256 # 爆破时每个进程下的协程数(不宜大于500)

爆破所使用的字典路径 默认data/subdomains.txt

brute_wordlist_path = data_storage_path.joinpath('subnames.txt')
brute_task_segment = 50000

py -3 aiobrute.py --target alimama.com --wordlist subdomains.txt --format txt --path 2.txt run
11:14:52,847 [INFOR] utils:128 - 获取到1个域名
11:14:52,878 [INFOR] aiobrute:286 - 开始执行AIOBrute模块爆破域名alimama.com
11:14:52,879 [INFOR] aiobrute:287 - 使用4进程乘64协程
11:14:52,881 [INFOR] aiobrute:41 - 正在探测alimama.com是否使用泛解析
11:14:52,937 [ALERT] aiobrute:55 - alimama.com使用了泛解析
11:14:52,940 [ALERT] aiobrute:56 - 01c19ea0.alimama.com 解析到域名: 01c19ea0.alimama.com. IP: {'223.82.248.117'} TTL: 60
11:14:52,943 [INFOR] aiobrute:210 - 使用subdomains.txt字典
Progress: 0%| | 0/1553 [00:00<?, ?it/s]aiobrute:129 - 爆破字典大小:776251
11:14:54,121 [INFOR] aiobrute:255 - 正在爆破alimama.com的域名
Progress: 0%| | 5/1553 [05:42<4:58:29, 11.57s/it]

Tutorial Please

Is your feature request related to a problem? Please describe.
Can you please do a tutorial on the subdomain scanner and takeover. I'm trying to use this tool
but i'm not sure what is going on...

i have used tool like Sublist3r to enum the sub-domains.

but how to get your tool to enum domains and check for the vulnerability to take over the sub-domain?

thanks.

请问怎么加快爆破速度?

我用aiobrute.py进行爆破 百万字典 一个晚上只能爆破进度到5%左右
配置如下

爆破时使用的进程数(根据系统中CPU数量情况设置 不宜大于CPU数量 默认为系统中的CPU数量)

brute_process_num = os.cpu_count()
brute_coroutine_num = 1000 # 爆破时每个进程下的协程数(不宜大于1000)

爆破所使用的字典路径 默认data/subdomains.txt

brute_wordlist_path = data_storage_path.joinpath('subnames.txt')
brute_task_segment = 50000

请问怎么才能加快爆破速度呢?

使用github模块时出现验证邮件:github Please verify your device

是否使用了最新代码
是或否(如果不是的话尝试克隆最新的代码再跑一下)

Bug描述
清晰而简洁的Bug描述
使用github模块时出现验证邮件:github Please verify your device
如何复现
复现步骤(可不写)
复现命令
在config.py中补充github模块
image

预期结果
清晰而简洁的预期结果描述(可不写)
脚本运行时出现验证邮件
实际结果
清晰而简洁的实际结果描述(如出现什么错误)
导致github模块无法使用
屏幕截图
image

image

运行环境

  • 系统:centos7.5 腾讯云[例如Windows 10 x64]
  • Python版本:3.7.0 [例如3.7.1]
  • OneForAll版本:0.0.7 [例如0.0.6]

报错文本
复制完整的报错文本

导出结果无法判断是否为新子域

是否使用了最新代码

Bug描述
在--req=False的情况下,最终结果中new字段和其他字段为None

如何复现
复现命令
python3.8 oneforall.py --target example.com --show=True --format=json --req=False --dns=True run
预期结果
image

实际结果
image

运行环境

  • 系统:Ubuntu 18.04 x64
  • Python版本:3.8.0
  • OneForAll版本:v0.0.8#dev

报错文本

SSL handshake failed

报错信息

SSL handshake failed
protocol: <asyncio.sslproto.SSLProtocol object at 0x12cb1add8>
transport: <_SelectorSocketTransport fd=30 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 625, in _on_handshake_complete
    raise handshake_exc
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/local/Cellar/python/3.7

修复方法
common文件夹下request.py文件
图中 的BaesException as e: 修改为except BaseException as e:

oneforall无法正常退出

是否使用了最新代码

Bug描述
oneforall还是无法正常退出

运行环境

  • 系统:[例如macOS](必写)
  • Python版本:[例如3.8.2](必写)
  • OneForAll版本:[例如0.1.0](必写)

如何复现

if __name__ == '__main__': # fire.Fire(OneForAll) OneForAll('example.cn').run() # OneForAll('./domains.txt').run()

报错文本
无法退出

预期结果
正常退出

实际结果
清晰而简洁的实际结果描述(选写,如出现什么错误)

屏幕截图

日志上传
上传oneforall.log日志文件(复杂问题建议上传)

某些域名结果不兼容导致程序报错

Describe the bug
如alipay.com

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

pycares依赖安装有问题

我用的mac系统,装pycares出现问题,网上找了一圈没有解决好,只有windows系统上的

fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'clang' failed with exit status 1


Failed building wheel for pycares
Running setup.py clean for pycares
Failed to build pycares
Installing collected packages: pycares
Running setup.py install for pycares ... error

api接口

对于一些api接口网站比如chinaz,可以适当把keep_alive关掉,连续扫描子域名时候容易接口触发拒绝连接,关掉之后稳定一些

oneforall使用big_subnames.txt字典报错

是否使用了最新代码

Bug描述
把config第51行的subnames.txt改成big_subnames.txt会报错

运行环境

  • 系统:[macOS](必写)
  • Python版本:[例如3.8.1](必写)
  • OneForAll版本:[例如0.0.9](必写)

如何复现
复现步骤(选写)

复现命令(必写)
python oneforall.py example.com

报错文本

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "oneforall.py", line 251, in run
self.main()
File "oneforall.py", line 176, in main
brute.run()
File "/Users//PycharmProjects/oneforall/aiobrute.py", line 283, in run
loop.run_until_complete(self.main(self.domain, rx_queue))
File "/Users//.pyenv/versions/3.8.0/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
return future.result()
File "/Users//PycharmProjects/oneforall/aiobrute.py", line 261, in main
results = await resolve.aio_resolve(tasks, self.process, self.coroutine)
File "/Users/PycharmProjects/oneforall/common/resolve.py", line 168, in aio_resolve
return results
File "/Users//.local/share/virtualenvs/oneforall-EpEYzA6i/lib/python3.8/site-packages/aiomultiprocess/pool.py", line 130, in aexit
self.terminate()
File "/Users//.local/share/virtualenvs/oneforall-EpEYzA6i/lib/python3.8/site-packages/aiomultiprocess/pool.py", line 277, in terminate
self.close()
File "/Users/.local/share/virtualenvs/oneforall-EpEYzA6i/lib/python3.8/site-packages/aiomultiprocess/pool.py", line 272, in close
tx.put_nowait(None)
File "/Users//.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/queues.py", line 132, in put_nowait
return self.put(obj, False)
File "/Users/.pyenv/versions/3.8.0/lib/python3.8/multiprocessing/queues.py", line 84, in put
raise Full
queue.Full

预期结果
清晰而简洁的预期结果描述(选写,如正常情况应该是怎么样的)

实际结果
清晰而简洁的实际结果描述(选写,如出现什么错误)

屏幕截图
完整OneForAll执行流程截图(建议上传)

日志上传
上传oneforall.log日志文件(复杂问题建议上传)

Fofa api调用时出现500错误

是否使用了最新代码

Bug描述

Fofa api调用时出现500错误 Internal Server Error 8049

运行环境

  • 系统:[例如Windows 10 x64](必写)
  • Python版本:[例如3.7.1](必写)
  • OneForAll版本:[例如0.0.6](必写)

如何复现
复现步骤(选写)
复现命令(必写)

报错文本
Internal Server Error 8049

预期结果
清晰而简洁的预期结果描述(选写,如正常情况应该是怎么样的)

实际结果
清晰而简洁的实际结果描述(选写,如出现什么错误)

屏幕截图
完整OneForAll执行流程截图(建议上传)

日志上传
上传oneforall.log日志文件(复杂问题建议上传)

新增gov接口的api

import time
from config import logger
from common.query import Query


class Gov(Query):
    def __init__(self, domain):
        Query.__init__(self)
        self.domain = self.register(domain)
        self.module = 'Gov'
        self.source = 'GovQuery'
        self.addr = "http://114.55.181.28/check_web/databaseInfo_mainSearch.action?sEcho=2&iColumns=6&sColumns=,,,,,&iDisplayStart=0&iDisplayLength=10&mDataProp_0=dataNumber&bSortable_0=false&mDataProp_1=sitecode&bSortable_1=false&mDataProp_2=wzzgdw&bSortable_2=false&mDataProp_3=wzmc&bSortable_3=false&mDataProp_4=url&bSortable_4=false&mDataProp_5=caozuo&bSortable_5=false&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&term={}&searchType=url&isSearch=true&tt=Mon Mar 16 2020 23:14:59 GMT+0800 (China Standard Time)&is_exp=0,1,3&size=10&pos=1&pageNo={}&_t=1584371699717"

    def query(self):
        """
        向接口查询子域并做子域匹配
        """
        page_num = 1
        while True:
            time.sleep(self.delay)
            self.header = self.get_header()
            self.proxy = self.get_proxy(self.source)
            try:
                resp = self.get(self.addr.format(self.domain, page_num))
            except Exception as e:
                logger.log('ERROR', e.args)
                break
            if not resp:
                break
            if resp.status_code != 200:
                logger.log('ERROR', f'{self.source}模块搜索出错')
                break
            subdomains = self.match(self.domain, resp.text)
            self.subdomains = self.subdomains.union(subdomains)
            if not subdomains:
                break
            if page_num > 10:
                break
            page_num += 1

    def run(self):
        """
        类执行入口
        """
        if self.domain.find("gov.cn") < 0:
            return
        self.begin()
        self.query()
        self.finish()
        self.save_json()
        self.gen_result()
        self.save_db()


def do(domain):
    """
    类统一调用入口

    :param str domain: 域名
    """
    query = Gov(domain)
    query.run()


if __name__ == '__main__':
    do('nanjing.gov.cn')

子域名探测的时候ssl报错

是否使用了最新代码

Bug描述
运行到异步进行子域的get请求时,开始出现大量的ssl报错

如何复现
复现步骤(可不写)
复现命令

预期结果
清晰而简洁的预期结果描述(可不写)

实际结果
11:13:40,548 [INFOR] request:146 - 正在异步进行子域的GET请求
Progress: 38%|▍| 3978/10345 [02:00<00:06, 1025.56it/s]ERROR:asyncio:SSL error in data received
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f326d824470>
transport: <_SelectorSocketTransport fd=808 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/usr/lib/python3.7/asyncio/sslproto.py", line 207, in feed_ssldata
self._sslobj.unwrap()
File "/usr/lib/python3.7/ssl.py", line 767, in unwrap
return self._sslobj.shutdown()
ssl.SSLError: [SSL: KRB5_S_INIT] application data after close notify (_ssl.c:2609)
Progress: 49%|▍| 5080/10345 [02:36<00:47, 111.25it/s]ERROR:asyncio:SSL handshake failed
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f3235e019b0>
transport: <_SelectorSocketTransport fd=787 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/sslproto.py", line 625, in _on_handshake_complete
raise handshake_exc
File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1056)

屏幕截图

运行环境

  • 系统:kali2
  • Python版本:Python 3.7.2+
  • OneForAll版本:当前最新版

报错文本
ERROR:asyncio:SSL error in data received
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f326d824470>
transport: <_SelectorSocketTransport fd=808 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/usr/lib/python3.7/asyncio/sslproto.py", line 207, in feed_ssldata
self._sslobj.unwrap()
File "/usr/lib/python3.7/ssl.py", line 767, in unwrap
return self._sslobj.shutdown()
ssl.SSLError: [SSL: KRB5_S_INIT] application data after close notify (_ssl.c:2609)
Progress: 49%|▍| 5080/10345 [02:36<00:47, 111.25it/s]ERROR:asyncio:SSL handshake failed
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f3235e019b0>
transport: <_SelectorSocketTransport fd=787 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/sslproto.py", line 625, in _on_handshake_complete
raise handshake_exc
File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1056)

ValueError: too many file descriptors in select()

是否使用了最新代码
是或否(如果不是的话尝试克隆最新的代码再跑一下!)
是最新代码
Bug描述
生成结果错误

运行环境

  • 系统:[例如Windows 10 x64](必写)
    win10x64
  • Python版本:[例如3.7.1](必写)
    python3.7.4
  • OneForAll版本:[例如0.0.6](必写)

如何复现
复现步骤(选写)
直接运行命令
复现命令(必写)
python3 oneforall.py --target domian run
报错文本
Request Progress: 80%|██████████████████▍ | 531/664 [00:09<00:02, 64.68it/s]ValueError: to
o many file descriptors in select()
预期结果
正常结果不太清楚,应该是正常生成文件把

实际结果
清晰而简洁的实际结果描述(选写,如出现什么错误)

屏幕截图
完整OneForAll执行流程截图(建议上传)
image

日志上传
上传oneforall.log日志文件(复杂问题建议上传)

censys_api.py代码有误

是否使用了最新代码

Bug描述

  1. 后一个post请求的数据data是第一个post请求的结果,参数误用了,导致后面的请求发不出去。
  2. fields字段最好再加上parsed.names字段,因为子域名主要在parsed.names字段中,会比只获取parsed.subject_dn的结果更多。

如何复现
do("360.cn")

预期结果
测试可以获取到400个子域名

实际结果
实际只获取了39个子域名,后面的请求都没发成功。

屏幕截图
image

运行环境

  • 系统:Windows 10 x64
  • Python版本:3.7.1
  • OneForAll版本:0.0.6

报错文本
{'status': 'error', 'error_type': 'malformed_request', 'error': 'request is missing the required field query'}

aiodns.error.DNSError: (4, b'Domain name not found')

运行到开启爆破的时候报错如下:
Python环境为Python3.7.0

Progress: 0%| | 0/47 [00:00<?, ?it/s]
Traceback (most recent call last):
File "oneforall.py", line 166, in
fire.Fire(OneForAll)
File "/usr/local/python3/lib/python3.7/site-packages/fire/core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/usr/local/python3/lib/python3.7/site-packages/fire/core.py", line 471, in _Fire
target=component.name)
File "/usr/local/python3/lib/python3.7/site-packages/fire/core.py", line 675, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "oneforall.py", line 159, in run
self.main()
File "oneforall.py", line 99, in main
brute.run()
File "/OneForAll/oneforall/aiobrute.py", line 282, in run
loop.run_until_complete(self.main(self.domain, rx_queue))
File "/usr/local/python3/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete
return future.result()
File "/OneForAll/oneforall/aiobrute.py", line 253, in main
results = await pool.map(resolve.aiodns_query_a, task)
File "/usr/local/python3/lib/python3.7/site-packages/aiomultiprocess/core.py", line 434, in map
return await self.results(tids)
File "/usr/local/python3/lib/python3.7/site-packages/aiomultiprocess/core.py", line 398, in results
raise ProxyException(tb)
aiomultiprocess.core.ProxyException: Traceback (most recent call last):
File "/usr/local/python3/lib/python3.7/site-packages/aiomultiprocess/core.py", line 298, in run
result = future.result()
File "/OneForAll/oneforall/common/resolve.py", line 54, in aiodns_query_a
answers = await resolver.query(hostname, 'A')
aiodns.error.DNSError: (4, b'Domain name not found')

Suggestion about crt.sh

There is need to add some prefix keywords too while searching on crt.sh for specific domain.

Like if we see simple domain without using any prefix on crt.sh

https://crt.sh/?q=%25.yahoo.com

But what if we use prefixes like

api,Internal,Staging,Stag,Production,Product,dev,devs,prod,new

We will get different results from above.

https://crt.sh/?q=%25.api.yahoo.com

Please add prefixes in the tool to grab more subdomains related to a domain.

AttributeError: '_io.TextIOWrapper' object has no attribute 'reconfigure'

(hack) D:\haker\1-脚本\OneForAll\oneforall>python oneforall.py -target xj-tianye.com run
Traceback (most recent call last):
  File "oneforall.py", line 13, in <module>
    import config
  File "D:\haker\1-脚本\OneForAll\oneforall\config.py", line 195, in <module>
    sys.stderr.reconfigure(encoding='utf-8')
AttributeError: '_io.TextIOWrapper' object has no attribute 'reconfigure'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.