Mr-Sudheer/Websentinel
GitHub: Mr-Sudheer/Websentinel
一个轻量级的 Web 爬虫式漏洞扫描辅助工具,用于自动提取网页中的所有链接和端点以辅助安全评估。
Stars: 1 | Forks: 0
# WebSentinel
**WebSentinel** 是一个专注于爬取 Web 应用并提取潜在攻击面(如链接、endpoint 和输入向量)的 Web 爬虫。
它旨在通过映射目标应用的结构,来协助安全测试中的**侦察阶段**。
## 🚀 功能
- 执行**深度爬取**,从目标网站提取链接、脚本、图像和资源。
- 发现不同类型的 **endpoint**,例如静态、动态、隐藏和上下文相关的 endpoint。
- 完整的 **CLI 支持**,轻松集成到安全测试工作流中。
- **速率限制**,避免使目标服务器过载并降低被封禁的风险。
- 将输出保存为**结构化格式(json、txt)**,以便进一步分析和报告。
## 🛠️ 安装说明
1. 克隆仓库
```
git clone https://github.com/Mr-Sudheer/Websentinel.git
```
```
cd Websentinel
```
2. 安装依赖
```
pip install -r requirements.txt
```
```
playwright install
```
3. 运行工具
```
python Websentinel.py
```
## CLI 选项/标志
```
usage: Websentinel.py [-h] -u URL [--depth DEPTH] [--threads THREADS] [--delay DELAY] [--timeout TIMEOUT] [--wordlist WORDLIST] [--no-endpoints] [--no-dynamic] [-o OUTPUT] [--no-save]
options:
-h, --help show this help message and exit
-u, --url URL Target URL
--depth DEPTH Crawl depth (default: 2)
--threads THREADS Concurrent threads (default: 15)
--delay DELAY Delay between requests in seconds (default: 0)
--timeout TIMEOUT Request timeout in seconds (default: 8)
--wordlist WORDLIST Path to custom hidden-endpoint wordlist file
--no-endpoints Skip endpoint discovery phase
--no-dynamic Skip dynamic (Playwright) endpoint scanning
-o, --output OUTPUT Output file prefix (default: websentinel)
--no-save Don't save output files
```
## CLI 输出
```
$ C:/Users/senor/AppData/Local/Programs/Python/Python313/python.exe p:/Git/Websentinal/Websentinal/Websentinal.py -u https://mr-sudheer.github.io/
_ __ __ _____ __ _ __
| | / /__ / /_ / ___/___ ____ / /_(_)___ ___ / /
| | /| / / _ \/ __ \\__ \/ _ \/ __ \/ __/ / __ \/ _ \/ /
| |/ |/ / __/ /_/ /__/ / __/ / / / /_/ / / / / __/ /
|__/|__/\___/_.___/____/\___/_/ /_/\__/_/_/ /_/\___/_/
Security reconnaissance and intelligence gathering tool.
[HEAD] Starting crawl on https://mr-sudheer.github.io/ (depth=2, threads=15)
[OK] Crawl complete in 2.64s — 17 pages | 42 links | 13 scripts | 0 forms | 17 inputs | 17 images
[INFO] Checking if site is JS-heavy...
[HEAD] Starting endpoint discovery...
[OK] Endpoint discovery done in 7.60s — static=1 | dynamic=1 | hidden=2 | contextual=0
WEBSENTINEL — SUMMARY
Links : 42
Scripts : 13
Images : 17
Resources : 31
Forms : 0
Inputs : 17
Parameters : 0
Comments : 0
Static Endpoints : 1
Dynamic Endpoints : 1
Hidden Endpoints : 2
Contextual Endpoints : 0
[OK] Saved → websentinel_crawl.json
[OK] Saved → websentinel_crawl.txt
[OK] Saved → websentinel_endpoints.json
[OK] Saved → websentinel_endpoints.txt
```
## 限制
- 部分网站会返回 **403 Forbidden**,这会阻止有效爬取。
- 不支持**并行爬取**。
- 对高级反机器人防护的处理能力有限。
- 无法绕过 **CAPTCHA** 或类似的验证机制。
## ⚠️ 免责声明
本工具仅供教育和道德使用。在使用本工具测试任何 Web 应用之前,请务必获取适当的授权。对于因滥用本工具而造成的任何损害,作者概不负责。
我提供的输出示例是在我自己使用 GitHub Pages(一种静态网站托管服务)构建的网站上进行测试的。你可以访问该网站[点击这里](https://mr-sudheer.github.io/)。
标签:Docker容器, Playwright, Python, Web爬虫, 主机安全, 信息收集, 安全测试, 攻击性安全, 攻击面发现, 无后门, 网络安全, 隐私保护