Giter Site home page Giter Site logo

shmilylty / oneforall Goto Github PK

View Code? Open in Web Editor NEW
7.7K 102.0 1.2K 105.44 MB

OneForAll是一款功能强大的子域收集工具

License: GNU General Public License v3.0

Python 99.77% Dockerfile 0.23%
subdomain subdomain-scanner subdomain-enumeration subdomain-bruteforcing subdomain-collection subdomian-find subdomain-takeover subdomain-crawler oneforall python

oneforall's Introduction

OneForAll

Build Status codecov Maintainability License python python

👊OneForAll是一款功能强大的子域收集工具 📝English Document

Example

🚀上手指南

📢 请务必花一点时间阅读此文档,有助于你快速熟悉OneForAll!

🐍安装要求

OneForAll基于Python 3.6.0开发和测试,OneForAll需要高于Python 3.6.0的版本才能运行。 安装Python环境可以参考Python 3 安装指南。运行以下命令检查Python和pip3版本:

python -V
pip3 -V

如果你看到类似以下的输出便说明Python环境没有问题:

Python 3.6.0
pip 19.2.2 from C:\Users\shmilylty\AppData\Roaming\Python\Python36\site-packages\pip (python 3.6)
✔安装步骤(git 版)
  1. 下载

由于该项目处于开发中,会不断进行更新迭代,下载时请使用git clone克隆最新代码仓库,也方便后续的更新,不推荐从Releases下载,因为Releases里版本更新缓慢,也不方便更新, 本项目已经在码云(Gitee)镜像了一份,国内推荐使用码云进行克隆比较快:

git clone https://gitee.com/shmilylty/OneForAll.git

或者:

git clone https://github.com/shmilylty/OneForAll.git
  1. 安装

你可以通过pip3安装OneForAll的依赖,以下为Windows系统下使用pip3安装依赖的示例:注意:如果你的Python3安装在系统Program Files目录下,如:C:\Program Files\Python36,那么请以管理员身份运行命令提示符cmd执行以下命令!

cd OneForAll/
python3 -m pip install -U pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple/
pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
python3 oneforall.py --help

其他系统平台的请参考依赖安装,如果在安装依赖过程中发现编译某个依赖库失败时可以参考常见问题与回答.md文档中解决方法,如果依然不能解决欢迎加群反馈问题。

  1. 更新

执行以下命令更新项目(可保存对/config/setting.py/config/api.py的修改):

git stash        # 暂存本地的修改
git fetch --all  # 拉取项目更新
git pull         # 下载覆盖
git stash pop    # 释放本地修改
✔安装步骤(docker 版)

首先下载并编辑配置文件,添加自己的api和个性化设置,并保留原始文件结构

config
├── api.py
├── default.py
├── __init__.py
├── log.py
└── setting.py

拉取镜像并执行,其中~/.config替换为你自己配置文件所在文件夹的路径

docker pull shmilylty/oneforall
docker run -it --rm -v ~/results:/OneForAll/results -v ~/.config:/OneForAll/config shmilylty/oneforall --target example.com run

参数直接加在指令末尾,结果会输出在本地目录~/results,如需保存到其他位置,可以自行修改

✨使用演示

如果你是通过pip3安装的依赖则使用以下命令运行示例:

python3 oneforall.py --target example.com run
python3 oneforall.py --targets ./example.txt run

Example

🧐结果说明

我们以python3 oneforall.py --target example.com run命令为例,OneForAll在默认参数正常执行完毕会在results目录生成相应结果:

Result

example.com.csv是每个主域下的子域收集结果。

all_subdomain_result_1583034493.csv是每次运行OneForAll收集到子域的汇总结果,包含example.com.csv,方便在批量收集场景中获取全部结果。

result.sqlite3是存放每次运行OneForAll收集到子域的SQLite3结果数据库,其数据库结构如下图:

Database

其中类似example_com_origin_result表存放每个模块最初子域收集结果。

其中类似example_com_resolve_result表存放对子域进行解析后的结果。

其中类似example_com_last_result表存放上一次子域收集结果(需要收集两次以上才会生成)。

其中类似example_com_now_result表存放现在子域收集结果,一般情况关注这张表就可以了。

更多信息请参阅字段解释说明

🤔使用帮助

命令行参数只提供了一些常用参数,更多详细的参数配置请见setting.py,如果你认为有些参数是命令界面经常使用到的或缺少了什么参数等问题非常欢迎反馈。由于众所周知的原因,如果要使用一些被墙的收集接口请先到setting.py配置代理,有些收集模块需要提供API(大多都是可以注册账号免费获取),如果需要使用请到api.py配置API信息,如果不使用请忽略有关报错提示。(详细模块请阅读收集模块说明

OneForAll命令行界面基于Fire实现,有关Fire更高级使用方法请参阅使用Fire CLI

oneforall.py是主程序入口,oneforall.py可以调用brute.pytakerover.pydbexport.py等模块,为了方便进行子域爆破独立出了brute.py,为了方便进行子域接管风险检查独立出了takerover.py,为了方便数据库导出独立出了dbexport.py,这些模块都可以单独运行,并且所接受参数要更丰富一点,如果要单独使用这些模块请参考使用帮助

❗注意:当你在使用过程中遇到一些问题或者疑惑时,请先到Issues里使用搜索找找答案,还可以参阅常见问题与回答

oneforall.py使用帮助

以下帮助信息可能不是最新的,你可以使用python oneforall.py --help获取最新的帮助信息。

python oneforall.py --help
NAME
    oneforall.py - OneForAll帮助信息

SYNOPSIS
    oneforall.py COMMAND | --target=TARGET <flags>

DESCRIPTION
    OneForAll是一款功能强大的子域收集工具

    Example:
        python3 oneforall.py version
        python3 oneforall.py --target example.com run
        python3 oneforall.py --targets ./domains.txt run
        python3 oneforall.py --target example.com --valid None run
        python3 oneforall.py --target example.com --brute True run
        python3 oneforall.py --target example.com --port small run
        python3 oneforall.py --target example.com --fmt csv run
        python3 oneforall.py --target example.com --dns False run
        python3 oneforall.py --target example.com --req False run
        python3 oneforall.py --target example.com --takeover False run
        python3 oneforall.py --target example.com --show True run

    Note:
        参数alive可选值True,False分别表示导出存活,全部子域结果
        参数port可选值有'default', 'small', 'large', 详见config.py配置
        参数fmt可选格式有 'csv','json'
        参数path默认None使用OneForAll结果目录生成路径

ARGUMENTS
    TARGET
        单个域名(二选一必需参数)
    TARGETS
        每行一个域名的文件路径(二选一必需参数)

FLAGS
    --brute=BRUTE
        s
    --dns=DNS
        DNS解析子域(默认True)
    --req=REQ
        HTTP请求子域(默认True)
    --port=PORT
        请求验证子域的端口范围(默认只探测80端口)
    --valid=VALID
        只导出存活的子域结果(默认False)
    --fmt=FMT
        结果保存格式(默认csv)
    --path=PATH
        结果保存路径(默认None)
    --takeover=TAKEOVER
        检查子域接管(默认False)

🎉项目简介

项目地址:https://github.com/shmilylty/OneForAll

在渗透测试中信息收集的重要性不言而喻,子域收集是信息收集中必不可少且非常重要的一环,目前网上也开源了许多子域收集的工具,但是总是存在以下部分问题:

  • 不够强大,子域收集的接口不够多,不能做到对批量子域自动收集,没有自动子域解析,验证,FUZZ以及信息拓展等功能。
  • 不够友好,固然命令行模块比较方便,但是当可选的参数很多,要实现的操作复杂,用命令行模式就有点不够友好,如果有交互良好,高可操作的前端那么使用体验就会好很多。
  • 缺少维护,很多工具几年没有更新过一次,issues和PR是啥,不存在的。
  • 效率问题,没有利用多进程,多线程以及异步协程技术,速度较慢。

为了解决以上痛点,此项目应用而生,正如其名,我希望OneForAll是一款集百家之长,功能强大的全面快速子域收集终极神器🔨。

目前OneForAll还在开发中,肯定有不少问题和需要改进的地方,欢迎大佬们提交IssuesPR,用着还行给个小星星✨吧,目前有一个专门用于OneForAll交流和反馈QQ群👨‍👨‍👦‍👦::824414244(加群验证:信息收集)。

👍功能特性

  • 收集能力强大,详细模块请阅读收集模块说明
    1. 利用证书透明度收集子域(目前有6个模块:censys_apicertspottercrtshentrustgooglespyse_api
    2. 常规检查收集子域(目前有4个模块:域传送漏洞利用axfr,检查跨域策略文件cdx,检查HTTPS证书cert,检查内容安全策略csp,检查robots文件robots,检查sitemap文件sitemap,利用NSEC记录遍历DNS域dnssec,后续会添加NSEC3记录等模块)
    3. 利用网上爬虫档案收集子域(目前有2个模块:archivecrawlcommoncrawl,此模块还在调试,该模块还有待添加和完善)
    4. 利用DNS数据集收集子域(目前有24个模块:bevigil_api, binaryedge_api, bufferover, cebaidu, chinaz, chinaz_api, circl_api, cloudflare, dnsdb_api, dnsdumpster, hackertarget, ip138, ipv4info_api, netcraft, passivedns_api, ptrarchive, qianxun, rapiddns, riddler, robtex, securitytrails_api, sitedossier, threatcrowd, wzpc, ximcx
    5. 利用DNS查询收集子域(目前有5个模块:通过枚举常见的SRV记录并做查询来收集子域srv,以及通过查询域名的DNS记录中的MX,NS,SOA,TXT记录来收集子域)
    6. 利用威胁情报平台数据收集子域(目前有6个模块:alienvault, riskiq_apithreatbook_apithreatminervirustotalvirustotal_api该模块还有待添加和完善)
    7. 利用搜索引擎发现子域(目前有18个模块:ask, baidu, bing, bing_api, duckduckgo, exalead, fofa_api, gitee, github, github_api, google, google_api, shodan_api, so, sogou, yahoo, yandex, zoomeye_api),在搜索模块中除特殊搜索引擎,通用的搜索引擎都支持自动排除搜索,全量搜索,递归搜索。
  • 支持子域爆破,该模块有常规的字典爆破,也有自定义的fuzz模式,支持批量爆破和递归爆破,自动判断泛解析并处理。
  • 支持子域验证,默认开启子域验证,自动解析子域DNS,自动请求子域获取title和banner,并综合判断子域存活情况。
  • 支持子域爬取,根据已有的子域,请求子域响应体以及响应体里的JS,从中再次发现新的子域。
  • 支持子域置换,根据已有的子域,使用子域替换技术再次发现新的子域。
  • 支持子域接管,默认开启子域接管风险检查,支持子域自动接管(目前只有Github,有待完善),支持批量检查。
  • 处理功能强大,发现的子域结果支持自动去除,自动DNS解析,HTTP请求探测,自动筛选出有效子域,拓展子域的Banner信息,最终支持的导出格式有txt, csv, json
  • 速度极快收集模块使用多线程调用,爆破模块使用massdns,DNS解析速度每秒可解析350000以上个域名,子域验证中DNS解析和HTTP请求使用异步多协程,多线程检查子域接管风险。
  • 体验良好,各模块都有进度条,异步保存各模块结果。

如果你有其他很棒的想法请务必告诉我!😎

🌲目录结构

更多信息请参阅目录结构说明

本项目docs目录下还提供了一些帮助与说明,如子域字典来源说明泛解析判断流程

👏用到框架

  • aiohttp - 异步http客户端/服务器框架
  • beautifulsoup4 - 可以轻松从HTML或XML文件中提取数据的Python库
  • fire - Python Fire是一个纯粹根据任何Python对象自动生成命令行界面(CLI)的库
  • loguru - 旨在带来愉快的日志记录Python库
  • massdns - 高性能的DNS解析器
  • records - Records是一个非常简单但功能强大的库,用于对大多数关系数据库进行最原始SQL查询。
  • requests - Requests 唯一的一个非转基因的 Python HTTP 库,人类可以安全享用。
  • tqdm - 适用于Python和CLI的快速,可扩展的进度条库

感谢这些伟大优秀的Python库!

🔖版本控制

该项目使用SemVer语言化版本格式进行版本管理,你可以参阅变更记录说明了解历史变更情况。

⌛后续计划

  • 各模块持续优化和完善
  • 操作强大交互人性的前端界面实现

更多信息请参阅后续开发计划

🙏贡献

非常热烈欢迎各位大佬一起完善本项目!

👨‍💻贡献者

你可以在贡献者文档中查看所有贡献者以及他们所做出的贡献,感谢他们让OneForAll变得更强大好用。

☕赞赏

如果你觉得这个项目帮助到了你,你可以打赏一杯咖啡以资鼓励:)

📄版权

该项目签署了GPL-3.0授权许可,详情请参阅LICENSE

😘鸣谢

感谢网上开源的各个子域收集项目!

感谢A-Team大哥们热情无私的问题解答!

📜免责声明

本工具仅能在取得足够合法授权的企业安全建设中使用,在使用本工具过程中,您应确保自己所有行为符合当地的法律法规。 如您在使用本工具的过程中存在任何非法行为,您将自行承担所有后果,本工具所有开发者和所有贡献者不承担任何法律及连带责任。 除非您已充分阅读、完全理解并接受本协议所有条款,否则,请您不要安装并使用本工具。 您的使用行为或者您以其他任何明示或者默示方式表示接受本协议的,即视为您已阅读并同意本协议的约束。

💖Star趋势

Stargazers over time

oneforall's People

Contributors

alt-glitch avatar avgirl avatar azimut avatar boy-hack avatar cokebeer avatar dependabot[bot] avatar echocipher avatar expoli avatar fuzz7j avatar h3h3da avatar j4vaovo avatar jrdw0 avatar ko2sec avatar m0rning0o0 avatar mastomii avatar maxsecurity avatar pdelteil avatar pwnhxl avatar r0ckysec avatar richard-tang avatar shmilylty avatar tardis07 avatar tarihub avatar tinker-li avatar x-ai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oneforall's Issues

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'

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.

在解析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.

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

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

子域名探测的时候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)

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

是否使用了最新代码

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

报错文本

结果csv文件中文乱码

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

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

cvs结果文件 中文乱码

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

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

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

image

运行环境

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

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

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日志文件(复杂问题建议上传)

建议增加status 为302的支持

是否使用了最新代码

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

api接口

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

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)

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

是否使用了最新代码

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

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

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

屏幕截图

运行环境

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

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日志文件(复杂问题建议上传)

请问怎么加快爆破速度?

我用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]

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

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]

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

是否使用了最新代码

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

如何复现

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

屏幕截图
image

新增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')

readme 中一处链接大小写错误

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

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

duckduckgo python错误

是否使用了最新代码

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

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

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

实际结果
列表错误

屏幕截图

运行环境

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

一直报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.

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'

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.

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日志文件(复杂问题建议上传)

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'}

运行时报错

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

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

requirements.txt写错了2个

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

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

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

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

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.

升级了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]

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

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日志文件(复杂问题建议上传)

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:

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

使用报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日志文件(复杂问题建议上传)

多级域名问题

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

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

如何复现

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

预期结果

应收集xxxx.nju.edu.cn

实际结果

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

屏幕截图

运行环境

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

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

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.