mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
进一步完善文档
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
## OneForAll
|
||||
# OneForAll
|
||||
|
||||
README: 简体中文 | [English](./README.en.md)
|
||||
|
||||
**OneForAll是一款强大的子域收集神器**
|
||||
👊**OneForAll是一款功能强大的子域收集工具** 📝[English Document](./README.en.md)
|
||||
|
||||

|
||||
|
||||
## 项目简介 ##
|
||||
## 🎉项目简介
|
||||
|
||||
在渗透测试中信息收集的重要性不言而喻,子域收集是信息收集中必不可少且非常重要的一环,目前网上也开源了许多子域收集的工具,但是总是存在以下部分问题:
|
||||
|
||||
@@ -17,18 +15,16 @@ README: 简体中文 | [English](./README.en.md)
|
||||
|
||||
* **效率问题**,没有利用多进程,多线程以及异步协程技术,速度较慢。
|
||||
|
||||
为了解决以上痛点,此项目应用而生,OneForAll一词是来自我喜欢的一部日漫《[我的英雄学院](https://manhua.fzdm.com/131/)》,它是一种通过一代代的传承不断变强的潜力无穷的顶级个性,目前[番剧](https://www.bilibili.com/bangumi/media/md7452/)也更新到了第三季了,欢迎大佬们入坑。正如其名,我希望OneForAll是一款集百家之长,功能强大的全面快速子域收集终极神器。
|
||||
为了解决以上痛点,此项目应用而生,OneForAll一词是来自我喜欢的一部日漫《[我的英雄学院](https://manhua.fzdm.com/131/)》,它是一种通过一代代的传承不断变强的潜力无穷的顶级个性,目前[番剧](https://www.bilibili.com/bangumi/media/md7452/)也更新到了第三季了,欢迎大佬们入坑😄。正如其名,我希望OneForAll是一款集百家之长,功能强大的全面快速子域收集终极神器🔨。
|
||||
|
||||
目前OneForAll还在开发中,肯定有不少问题和需要改进的地方,欢迎大佬们提交[Issue](https://github.com/shmilylty/OneForAll/issues)和[PR](https://github.com/shmilylty/OneForAll/pulls),用着还行给个小星星吧,目前有一个专门用于OneForAll交流和反馈QQ群:`ODI0NDE0MjQ0`,也可以给我发邮件[admin@hackfun.org]。
|
||||
目前OneForAll还在开发中,肯定有不少问题和需要改进的地方,欢迎大佬们提交[Issues](https://github.com/shmilylty/OneForAll/issues)和[PR](https://github.com/shmilylty/OneForAll/pulls),用着还行给个小星星✨吧,目前有一个专门用于OneForAll交流和反馈QQ群👋:`824414244`,也可以给我发邮件📧[admin@hackfun.org]。
|
||||
|
||||
## 功能特性
|
||||
## 👍功能特性
|
||||
|
||||
* **收集能力强大**,详细模块请阅读[搜索模块说明](./docs/collection_modules.md)。
|
||||
|
||||
1. 利用证书透明度收集子域(目前有6个模块:`censys_api`,`certdb_api`,`certspotter`,`crtsh`,`entrust`,`google`)
|
||||
|
||||
|
||||
|
||||
2. 常规检查收集子域(目前有4个模块:域传送漏洞利用`axfr`,检查跨域策略文件`cdx`,检查HTTPS证书`cert`,检查内容安全策略`csp`,后续会添加检查NSEC记录,NSEC记录等模块)
|
||||
|
||||
3. 利用网上爬虫档案收集子域(目前有2个模块:`archivecrawl`,`commoncrawl`,此模块还在调试,该模块还有待添加和完善)
|
||||
@@ -45,15 +41,15 @@ README: 简体中文 | [English](./README.en.md)
|
||||
|
||||
* **速度极速**,[收集模块](./oneforall/collect.py)使用多线程调用,[爆破模块](./oneforall/aiobrute.py)使用异步多进程多协程,DNS解析和HTTP请求使用异步多协程。
|
||||
|
||||
## **上手指南**
|
||||
## 🚀上手指南
|
||||
|
||||
由于该项目处于开发中,会不断进行更新迭代,下载时最好克隆本项目。
|
||||
由于该项目**处于开发中**,会不断进行更新迭代,下载使用最好**克隆**最新项目。
|
||||
|
||||
**安装要求**
|
||||
**🐍安装要求**
|
||||
|
||||
1. Python 3.6-3.7
|
||||
|
||||
**安装步骤**
|
||||
**✔安装步骤**
|
||||
|
||||
1. 下载
|
||||
|
||||
@@ -69,7 +65,7 @@ README: 简体中文 | [English](./README.en.md)
|
||||
|
||||
```bash
|
||||
pip3 install pipenv
|
||||
cd OneForAll
|
||||
cd OneForAll/oneforall
|
||||
pipenv install python 3.7.4
|
||||
pipenv run python oneforall.py --help
|
||||
```
|
||||
@@ -77,45 +73,45 @@ README: 简体中文 | [English](./README.en.md)
|
||||
* 使用pip3
|
||||
|
||||
```bash
|
||||
cd OneForAll
|
||||
cd OneForAll/oneforall
|
||||
pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||
python3 oneforall.py --help
|
||||
```
|
||||
|
||||
**使用帮助**
|
||||
**✨使用演示**
|
||||
|
||||
```bash
|
||||
python3 oneforall.py --target example.com run
|
||||
```
|
||||
|
||||

|
||||
|
||||
**🤔使用帮助**
|
||||
|
||||
命令行参数只提供了一些常用参数,更多详细的参数配置请见[config.py](./oneforall/config.py),由于众所周知的原因,如果要使用一些被墙的收集接口请先到[config.py](./oneforall/config.py)配置代理,有些收集模块需要提供API(大多都是可以注册账号免费获取),如果需要使用请到[config.py](./oneforall/config.py)配置API信息,如果不使用请忽略有关报错提示。(详细模块请阅读[搜索模块说明](./docs/collection_modules.md))
|
||||
|
||||
OneForAll命令行界面基于[Fire](https://github.com/google/python-fire/)实现,有关Fire更高级使用方法请参阅[使用Fire CLI](https://github.com/google/python-fire/blob/master/docs/using-cli.md),有任何使用疑惑欢迎加群交流。
|
||||
|
||||
1. oneforall.py使用帮助
|
||||
|
||||
```bash
|
||||
cd OneForAll
|
||||
pipenv run python oneforall.py --help
|
||||
```
|
||||
```bash
|
||||
WARNING: The proper way to show help is 'oneforall.py -- --help'.
|
||||
Showing help anyway.
|
||||
NAME
|
||||
oneforall.py - OneForAll是一款功能强大的子域收集工具
|
||||
|
||||
Fire trace:
|
||||
1. Initial component
|
||||
2. ('The function received no value for the required argument:', 'target')
|
||||
SYNOPSIS
|
||||
oneforall.py --target=TARGET <flags>
|
||||
|
||||
Type: type
|
||||
String form: <class '__main__.OneForAll'>
|
||||
File: d:\oneforall\oneforall\oneforall.py
|
||||
Line: 24
|
||||
Docstring: OneForAll是一款强大的子域收集神器
|
||||
|
||||
Version: 0.0.1
|
||||
DESCRIPTION
|
||||
Version: 0.0.2
|
||||
Project: https://github.com/shmilylty/OneForAll/
|
||||
|
||||
:param str target: 单个域名或者每行一个域名的文件路径
|
||||
:param bool brute: 是否使用爆破模块(默认禁用)
|
||||
:param str port: HTTP请求验证的端口范围(默认medium)
|
||||
:param int valid: 导出子域的有效性(默认1)
|
||||
:param str format: 导出格式(默认xlsx)
|
||||
:param str path: 导出路径(默认None)
|
||||
:param bool output: 是否将导出数据输出到终端(默认False)
|
||||
Example:
|
||||
python oneforall.py --target example.com run
|
||||
python oneforall.py --target example.com --brute True --port medium valid 1 run
|
||||
python oneforall.py --target ./domains.txt --format csv --path= ./result.csv --output True run
|
||||
|
||||
Note:
|
||||
参数valid可选值有1,0,None,分别表示导出有效,无效,全部子域
|
||||
@@ -123,46 +119,39 @@ README: 简体中文 | [English](./README.en.md)
|
||||
参数format可选格式有'csv','tsv','json','yaml','html','xls','xlsx','dbf','latex','ods'
|
||||
参数path为None会根据format参数和域名名称在项目结果目录生成相应文件
|
||||
|
||||
Example:
|
||||
python oneforall.py --target example.com run
|
||||
python oneforall.py --target example.com --brute True --port medium valid 1 run
|
||||
python oneforall.py --target ./domains.txt --format csv --path= ./result.csv --output True run
|
||||
ARGUMENTS
|
||||
TARGET
|
||||
单个域名或者每行一个域名的文件路径
|
||||
|
||||
Usage: oneforall.py TARGET [BRUTE] [PORT] [VALID] [PATH] [FORMAT] [OUTPUT]
|
||||
oneforall.py --target TARGET [--brute BRUTE] [--port PORT] [--valid VALID] [--path PATH] [--format FORMAT] [--output OUTPUT]
|
||||
FLAGS
|
||||
--brute=BRUTE
|
||||
是否使用爆破模块(默认禁用)
|
||||
--port=PORT
|
||||
HTTP请求验证的端口范围(默认medium)
|
||||
--valid=VALID
|
||||
导出子域的有效性(默认1)
|
||||
--path=PATH
|
||||
导出路径(默认None)
|
||||
--format=FORMAT
|
||||
导出格式(默认xlsx)
|
||||
--output=OUTPUT
|
||||
是否将导出数据输出到终端(默认False)
|
||||
```
|
||||
|
||||
2. aiobrute.py使用帮助
|
||||
|
||||
```bash
|
||||
cd OneForAll
|
||||
pipenv run python aiobrute.py --help
|
||||
```
|
||||
|
||||
```bash
|
||||
WARNING: The proper way to show help is 'aiobrute.py -- --help'.
|
||||
Showing help anyway.
|
||||
NAME
|
||||
aiobrute.py - OneForAll多进程多协程异步子域爆破模块
|
||||
|
||||
Fire trace:
|
||||
1. Initial component
|
||||
2. ('The function received no value for the required argument:', 'target')
|
||||
|
||||
Type: type
|
||||
String form: <class '__main__.AIOBrute'>
|
||||
File: d:\oneforall\oneforall\aiobrute.py
|
||||
Line: 122
|
||||
Docstring: 多进程多协程异步子域爆破
|
||||
|
||||
:param str target: 单个域名或者每行一个域名的文件路径
|
||||
:param int processes: 爆破的进程数(默认CPU核心数)
|
||||
:param int coroutine: 每个爆破进程下的协程数(默认16)
|
||||
:param str wordlist: 指定爆破所使用的字典路径(默认使用config.py配置)
|
||||
:param bool recursive: 是否使用递归爆破(默认禁用)
|
||||
:param int depth: 递归爆破的深度(默认2)
|
||||
:param str namelist: 指定递归爆破所使用的字典路径(默认使用config.py配置)
|
||||
:param bool fuzz: 是否使用fuzz模式进行爆破(默认禁用,开启必须指定fuzz正则规则)
|
||||
:param str rule: fuzz模式使用的正则规则(默认使用config.py配置)
|
||||
SYNOPSIS
|
||||
aiobrute.py --target=TARGET <flags>
|
||||
|
||||
DESCRIPTION
|
||||
Example:
|
||||
python aiobrute.py --target example.com run
|
||||
python aiobrute.py --target ./domains.txt run
|
||||
@@ -170,72 +159,87 @@ README: 简体中文 | [English](./README.en.md)
|
||||
python aiobrute.py --target example.com --recursive True --depth 2 --namelist data/next_subdomains.txt run
|
||||
python aiobrute.py --target www.{fuzz}.example.com --fuzz True --rule [a-z][0-9] run
|
||||
|
||||
Usage: aiobrute.py TARGET [PROCESSES] [COROUTINE] [WORDLIST] [RECURSIVE] [DEPTH] [NAMELIST] [FUZZ] [RULE]
|
||||
aiobrute.py --target TARGET [--processes PROCESSES] [--coroutine COROUTINE] [--wordlist WORDLIST] [--recursive RECURSIVE] [--depth DEPTH] [--namelist NAMELIST] [--fuzz FUZZ] [--rule RULE]
|
||||
ARGUMENTS
|
||||
TARGET
|
||||
单个域名或者每行一个域名的文件路径
|
||||
|
||||
FLAGS
|
||||
--processes=PROCESSES
|
||||
爆破的进程数(默认CPU核心数)
|
||||
--coroutine=COROUTINE
|
||||
每个爆破进程下的协程数(默认16)
|
||||
--wordlist=WORDLIST
|
||||
指定爆破所使用的字典路径(默认使用config.py配置)
|
||||
--recursive=RECURSIVE
|
||||
是否使用递归爆破(默认False)
|
||||
--depth=DEPTH
|
||||
递归爆破的深度(默认2)
|
||||
--namelist=NAMELIST
|
||||
指定递归爆破所使用的字典路径(默认使用config.py配置)
|
||||
--fuzz=FUZZ
|
||||
是否使用fuzz模式进行爆破(默认False,开启必须指定fuzz正则规则)
|
||||
--rule=RULE
|
||||
fuzz模式使用的正则规则(默认使用config.py配置)
|
||||
```
|
||||
|
||||
3. dbexport.py使用帮助
|
||||
|
||||
```bash
|
||||
cd OneForAll
|
||||
pipenv run python dbexport.py --help
|
||||
```
|
||||
|
||||
```bash
|
||||
WARNING: The proper way to show help is 'dbexport.py -- --help'.
|
||||
Showing help anyway.
|
||||
NAME
|
||||
dbexport.py - OneForAll数据库导出模块
|
||||
|
||||
Fire trace:
|
||||
1. Initial component
|
||||
2. ('The function received no value for the required argument:', 'table')
|
||||
SYNOPSIS
|
||||
dbexport.py TABLE <flags>
|
||||
|
||||
Type: function
|
||||
String form: <function export at 0x0000025115962048>
|
||||
File: d:\oneforall\oneforall\dbexport.py
|
||||
Line: 8
|
||||
Docstring: 将数据库导出为指定格式文件
|
||||
|
||||
:param str table: 要导出的表
|
||||
:param str db: 要导出的数据库路径(默认为results/result.sqlite3)
|
||||
:param int valid: 导出子域的有效性(默认None)
|
||||
:param str format: 导出格式(默认xlsx)
|
||||
:param str path: 导出路径(默认None)
|
||||
:param bool output: 是否将导出数据输出到终端(默认False)
|
||||
DESCRIPTION
|
||||
Example:
|
||||
python dbexport.py --db result.db --table name --format csv --output False
|
||||
python dbexport.py --db result.db --table name --format csv --path= ./result.csv
|
||||
|
||||
Note:
|
||||
参数valid可选值1,0,None,分别表示导出有效,无效,全部子域
|
||||
参数format可选格式:'csv', 'tsv', 'json', 'yaml', 'html', 'xls', 'xlsx', 'dbf', 'latex', 'ods'
|
||||
参数path为None会根据format参数和域名名称在项目结果目录生成相应文件
|
||||
|
||||
Example:
|
||||
python dbexport.py --db result.db --table name --format csv --output False
|
||||
python dbexport.py --db result.db --table name --format csv --path= ./result.csv
|
||||
POSITIONAL ARGUMENTS
|
||||
TABLE
|
||||
要导出的表
|
||||
|
||||
Usage: dbexport.py TABLE [DB] [VALID] [PATH] [FORMAT] [OUTPUT]
|
||||
dbexport.py --table TABLE [--db DB] [--valid VALID] [--path PATH] [--format FORMAT] [--output OUTPUT]
|
||||
FLAGS
|
||||
--db=DB
|
||||
要导出的数据库路径(默认为results/result.sqlite3)
|
||||
--valid=VALID
|
||||
导出子域的有效性(默认None)
|
||||
--path=PATH
|
||||
导出路径(默认None)
|
||||
--format=FORMAT
|
||||
导出格式(默认xlsx)
|
||||
--output=OUTPUT
|
||||
是否将导出数据输出到终端(默认False)
|
||||
|
||||
NOTES
|
||||
You can also use flags syntax for POSITIONAL ARGUMENTS
|
||||
```
|
||||
|
||||
## 主要框架
|
||||
## 👏主要框架
|
||||
|
||||
* [aiodns](https://github.com/saghul/aiodns) - 简单DNS异步解析库。
|
||||
|
||||
* [aiohttp](https://github.com/aio-libs/aiohttp) - 异步http客户端/服务器框架
|
||||
|
||||
* [aiomultiprocess](https://github.com/jreese/aiomultiprocess) - 将Python代码提升到更高的性能水平(multiprocessing和asyncio结合,实现异步多进程多协程)
|
||||
|
||||
* [beautifulsoup4](https://pypi.org/project/beautifulsoup4/) - 可以轻松从HTML或XML文件中提取数据的Python库
|
||||
|
||||
* [fire](https://github.com/google/python-fire) - Python Fire是一个纯粹根据任何Python对象自动生成命令行界面(CLI)的库
|
||||
|
||||
* [loguru](https://github.com/Delgan/loguru) - 旨在带来愉快的日志记录Python库
|
||||
|
||||
* [records](https://github.com/kennethreitz/records) - Records是一个非常简单但功能强大的库,用于对大多数关系数据库进行最原始SQL查询。
|
||||
|
||||
* [requests](https://github.com/psf/requests) - Requests 唯一的一个非转基因的 Python HTTP 库,人类可以安全享用。
|
||||
* [tqdm](https://github.com/tqdm/tqdm) - 适用于Python和CLI的快速,可扩展的进度条库
|
||||
|
||||
感谢这些伟大优秀的Python库!
|
||||
|
||||
## 目录结构
|
||||
## 🌲目录结构
|
||||
|
||||
```bash
|
||||
D:.
|
||||
@@ -271,11 +275,11 @@ D:.
|
||||
|
||||
```
|
||||
|
||||
## 贡献
|
||||
## 🙏贡献
|
||||
|
||||
非常热烈欢迎各位大佬一起完善本项目!
|
||||
|
||||
## 后续计划
|
||||
## ⌛后续计划
|
||||
|
||||
- [ ] 子域收集模块优化
|
||||
- [ ] 子域接管功能实现
|
||||
@@ -284,11 +288,11 @@ D:.
|
||||
|
||||
更多详细信息请阅读[TODO.md](./TODO.md)。
|
||||
|
||||
## 版本控制
|
||||
## 🔖版本控制
|
||||
|
||||
该项目使用[SemVer](https://semver.org/)语言化版本格式进行版本管理,你可以在[Releases](https://github.com/shmilylty/OneForAll/releases)查看可用版本。
|
||||
|
||||
## 作者
|
||||
## 👨💻作者
|
||||
|
||||
* **[Jing Ling](https://github.com/shmilylty)**
|
||||
* 核心开发
|
||||
@@ -301,16 +305,16 @@ D:.
|
||||
|
||||
*你也可以在[CONTRIBUTORS.md](./CONTRIBUTORS.md)中参看所有参与该项目的开发者。*
|
||||
|
||||
## 版权
|
||||
## 📄版权
|
||||
|
||||
该项目签署了GPL-3.0授权许可,详情请参阅[LICENSE.md](./LICENSE.md)。
|
||||
|
||||
## 鸣谢
|
||||
## 😘鸣谢
|
||||
|
||||
感谢网上开源的各个子域收集项目!
|
||||
|
||||
感谢[A-Team](https://github.com/QAX-A-Team)大哥们热情无私的问题解答!
|
||||
|
||||
## 免责声明 ##
|
||||
## 📜免责声明 ##
|
||||
|
||||
本工具仅限于安全研究与教学使用,用户使用本工具所造成的所有后果,由用户承担全部法律及连带责任,本项目所有作者和贡献者不承担任何法律及连带责任。
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 120 KiB |
Reference in New Issue
Block a user