工具源码地址

1
https://github.com/shmilylty/OneForAll

安装教程

确认系统环境

先确认自己的设备是否安装Python33.6.0

1
2
3
python -V
python3 -V
pip3 -V

Linuxpythonpython2
所以我们需要使用python3查看版本
而在Windows上我们可以直接python

拉取项目

1
2
3
4
## 国内源
git clone https://gitee.com/shmilylty/OneForAll.git
## 国外源
git clone https://github.com/shmilylty/OneForAll.git

安装依赖

1
2
3
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/

更新项目

1
2
3
4
git stash        # 暂存本地的修改
git fetch --all # 拉取项目更新
git pull # 下载覆盖
git stash pop # 释放本地修改

OneForAll 基础使用

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

OneForAll 文档

需要添加更多其他参数时,我们可以查看帮助文档

1
python3 oneforall.py --help

帮助文档如下所示:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
NAME
oneforall.py - OneForAll帮助信息

SYNOPSIS
oneforall.py COMMAND | <flags>

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

Example:
python3 oneforall.py version
python3 oneforall.py check
python3 oneforall.py --target example.com run
python3 oneforall.py --targets ./domains.txt run
python3 oneforall.py --target example.com --alive False run
python3 oneforall.py --target example.com --brute False run
python3 oneforall.py --target example.com --port medium 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:
--port small/medium/large See details in ./config/setting.py(default
small)
--fmt csv/json (result format)
--path Result path (default None, automatically generated)

FLAGS
--target=TARGET
Type: Optional[]
Default: None
One domain (target or targets must be provided)
--targets=TARGETS
Type: Optional[]
Default: None
File path of one domain per line
--brute=BRUTE
Type: Optional[]
Default: None
Use brute module (default True)
--dns=DNS
Type: Optional[]
Default: None
Use DNS resolution (default True)
--req=REQ
Type: Optional[]
Default: None
HTTP request subdomains (default True)
--port=PORT
Type: Optional[]
Default: None
The port range to request (default small port is 80,443)
--alive=ALIVE
Type: Optional[]
Default: None
Only export alive subdomains (default False)
--fmt=FMT
Type: Optional[]
Default: None
Result format (default csv)
--path=PATH
Type: Optional[]
Default: None
Result path (default None, automatically generated)
--takeover=TAKEOVER
Type: Optional[]
Default: None
Scan subdomain takeover (default False)

COMMANDS
COMMAND is one of the following:

check
Check if there is a new version and exit

version
Print version information and exit
(END)

参考 & 引用

https://www.freebuf.com/sectool/200890.html