Sanyam-Asthana/SammyGo
GitHub: Sanyam-Asthana/SammyGo
SammyGo 是一款用 Go 编写的命令行 Web 侦察工具,集成了请求查看、目录爆破和 Web 爬取等功能,帮助安全测试人员高效完成目标站点信息收集。
Stars: 5 | Forks: 1
# 简介
SammyGo 是一款 Web 侦察工具,在一个包中集成了请求查看、目录爆破、Web 爬取等功能。
它是其前代版本 [Sammy](https://github.com/Sanyam-Asthana/sammy-web) 的完全重写版。
# 使用说明
该项目使用 `go 1.25.5` 创建并测试。
## 编译
1. Clone 该 repository
2. 进入根目录后,运行以下命令:
cd cmd/sammygo/
go build -o ../../build/sammygo .
3. 编译后的二进制文件将位于 `[repository 根目录]/build/`
## 用法
### 检查状态
运行 `sammygo [URL]`
```
❯ ./sammygo http://scanme.nmap.org
____ ____
/ ___| __ _ _ __ ___ _ __ ___ _ _ / ___| ___
\___ \ / _` | '_ ` _ \| '_ ` _ \| | | | | _ / _ \
___) | (_| | | | | | | | | | | | |_| | |_| | (_) |
|____/ \__,_|_| |_| |_|_| |_| |_|\__, |\____|\___/
|___/
Initiated SammyGo on http://scanme.nmap.org
--------------------
Status Code: 200 OK
--------------------
```
### 获取响应头
运行 `sammygo --head [URL]`
```
❯ ./sammygo --head http://scanme.nmap.org
____ ____
/ ___| __ _ _ __ ___ _ __ ___ _ _ / ___| ___
\___ \ / _` | '_ ` _ \| '_ ` _ \| | | | | _ / _ \
___) | (_| | | | | | | | | | | | |_| | |_| | (_) |
|____/ \__,_|_| |_| |_|_| |_| |_|\__, |\____|\___/
|___/
Initiated SammyGo on http://scanme.nmap.org
--------------------
Status Code: 200 OK
--------------------
----------HEADER----------
Vary: Accept-Encoding
Content-Type: text/html
Date: Thu, 26 Feb 2026 14:23:02 GMT
Server: Apache/2.4.7 (Ubuntu)
Accept-Ranges: bytes
--------------------------
```
### 获取响应文本
运行 `sammygo --text [URL]`
```
❯ ./sammygo --text http://scanme.nmap.org
____ ____
/ ___| __ _ _ __ ___ _ __ ___ _ _ / ___| ___
\___ \ / _` | '_ ` _ \| '_ ` _ \| | | | | _ / _ \
___) | (_| | | | | | | | | | | | |_| | |_| | (_) |
|____/ \__,_|_| |_| |_|_| |_| |_|\__, |\____|\___/
|___/
Initiated SammyGo on http://scanme.nmap.org
--------------------
Status Code: 200 OK
--------------------
-------------BODY-------------
Go ahead and ScanMe!
...(truncated for readability)
------------------------------
```
### 目录爆破
#### 默认模式
运行 `sammygo --bust [URL]`
```
❯ ./sammygo --bust http://scanme.nmap.org
____ ____
/ ___| __ _ _ __ ___ _ __ ___ _ _ / ___| ___
\___ \ / _` | '_ ` _ \| '_ ` _ \| | | | | _ / _ \
___) | (_| | | | | | | | | | | | |_| | |_| | (_) |
|____/ \__,_|_| |_| |_|_| |_| |_|\__, |\____|\___/
|___/
Initiated SammyGo on http://scanme.nmap.org
--------------------
Status Code: 200 OK
--------------------
Initiating buster with 20 workers...
[+] Found: http://scanme.nmap.org/.%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd (400)
[+] Found: http://scanme.nmap.org/.htaccess (403)
[+] Found: http://scanme.nmap.org/.htaccess.bak (403)
[+] Found: http://scanme.nmap.org/.htaccess-dev (403)
...(truncated for readability)
[+] Found: http://scanme.nmap.org/images/ (200)
[+] Found: http://scanme.nmap.org/images (200)
[+] Found: http://scanme.nmap.org/index (200)
[+] Found: http://scanme.nmap.org/index.html (200)
[+] Found: http://scanme.nmap.org/shared (403)
Scan complete.
```
#### 按状态码过滤
从之前的示例中可以看出,大多数暴力破解的路径返回的状态码都是 403 (Forbidden)。如果只需要可访问的路径,可以使用 `--filter` 标志。
运行 `sammygo --bust --filter=[状态码] [URL]`
```
❯ ./sammygo --bust --filter=200 http://scanme.nmap.org
____ ____
/ ___| __ _ _ __ ___ _ __ ___ _ _ / ___| ___
\___ \ / _` | '_ ` _ \| '_ ` _ \| | | | | _ / _ \
___) | (_| | | | | | | | | | | | |_| | |_| | (_) |
|____/ \__,_|_| |_| |_|_| |_| |_|\__, |\____|\___/
|___/
Initiated SammyGo on http://scanme.nmap.org
--------------------
Status Code: 200 OK
--------------------
Initiating buster with 20 workers...
[+] Found: http://scanme.nmap.org/images/ (200)
[+] Found: http://scanme.nmap.org/images (200)
[+] Found: http://scanme.nmap.org/index (200)
[+] Found: http://scanme.nmap.org/index.html (200)
Scan complete.
```
#### Worker 数量
默认情况下,暴力破解工具一次使用 20 个 worker(goroutine)。可以增加或减少此数量来改变爆破的速度。需要注意的是,过高的速度可能会(且几乎肯定会)引发 rate-limiting。
运行 `sammygo --bust --workers=[worker 数量] [URL]`
```
❯ ./sammygo --bust --workers=200 http://scanme.nmap.org
____ ____
/ ___| __ _ _ __ ___ _ __ ___ _ _ / ___| ___
\___ \ / _` | '_ ` _ \| '_ ` _ \| | | | | _ / _ \
___) | (_| | | | | | | | | | | | |_| | |_| | (_) |
|____/ \__,_|_| |_| |_|_| |_| |_|\__, |\____|\___/
|___/
Initiated SammyGo on http://scanme.nmap.org
--------------------
Status Code: 200 OK
--------------------
Initiating buster with 200 workers...
[+] Found: http://scanme.nmap.org/.%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd (400)
[+] Found: http://scanme.nmap.org/.htaccess (403)
[+] Found: http://scanme.nmap.org/.htaccess.bak (403)
[+] Found: http://scanme.nmap.org/.htaccess-dev (403)
...(truncated for readability)
[+] Found: http://scanme.nmap.org/images/ (200)
[+] Found: http://scanme.nmap.org/images (200)
[+] Found: http://scanme.nmap.org/index (200)
[+] Found: http://scanme.nmap.org/index.html (200)
[+] Found: http://scanme.nmap.org/shared (403)
Scan complete.
```
#### 详细输出
`--verbose` 标志可用于监控爆破工具的活动。目前该功能的输出存在 bug。
运行 `sammygo --bust --verbose [URL]`
```
❯ ./sammygo --bust --verbose http://scanme.nmap.org
____ ____
/ ___| __ _ _ __ ___ _ __ ___ _ _ / ___| ___
\___ \ / _` | '_ ` _ \| '_ ` _ \| | | | | _ / _ \
___) | (_| | | | | | | | | | | | |_| | |_| | (_) |
|____/ \__,_|_| |_| |_|_| |_| |_|\__, |\____|\___/
|___/
Initiated SammyGo on http://scanme.nmap.org
--------------------
Status Code: 200 OK
--------------------
Initiating buster with 20 workers...
Checking: 41
[+] Found: http://scanme.nmap.org/.%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd (400)
Checking: 575
[+] Found: http://scanme.nmap.org/.htaccess (403)
Checking: 577
[+] Found: http://scanme.nmap.org/.htaccess.BAK (403)
Checking: 578
```
#### 自定义字典
该 repository 自带了一个默认字典,但可以使用 `--wordlist` 标志自定义字典。
运行 `sammygo --bust --wordlist=[字典路径] [URL]`
`[字典路径]` 是相对于程序二进制文件的路径。
```
❯ ./sammygo --bust --wordlist=words.txt http://scanme.nmap.org
____ ____
/ ___| __ _ _ __ ___ _ __ ___ _ _ / ___| ___
\___ \ / _` | '_ ` _ \| '_ ` _ \| | | | | _ / _ \
___) | (_| | | | | | | | | | | | |_| | |_| | (_) |
|____/ \__,_|_| |_| |_|_| |_| |_|\__, |\____|\___/
|___/
Initiated SammyGo on http://scanme.nmap.org
--------------------
Status Code: 200 OK
--------------------
Initiating buster with 20 workers...
Scan complete.
```
毋庸置疑,所有的标志都可以同时使用。
# 计划中的功能
Sammy 的所有功能:
- 爬虫
- 交互式 shell
- 报告生成
此外,还有:
- Cookies 查看器
- 抓取器
**注意:** SammyGo 仅供在您被允许测试的系统上使用。未经授权在任何系统上使用类似 SammyGo 这样的 Web 侦察工具是不道德的。使用示例中使用的网站 (http://scanme.nmap.org) 允许进行此类测试。
标签:EVTX分析, Go语言, Web侦察, 大数据, 安全测试, 实时处理, 密码管理, 攻击性安全, 日志审计, 目录扫描, 程序破解, 网络安全, 隐私保护
