Yash0x01/Recon-Scraper

GitHub: Yash0x01/Recon-Scraper

一款用于授权安全测试的 Python 异步 Web 侦察爬虫,自动提取网站资产与潜在安全风险并生成结构化报告。

Stars: 0 | Forks: 0

# Recon-Scraper 一款用于漏洞赏金 / 安全工程工作的授权侦察网络爬虫。对目标进行爬取,提取资产(链接、JS 文件、表单、参数、电子邮件),扫描可能的敏感信息和有趣的 API endpoint,可选探测少量已知的敏感路径,并生成 JSON + HTML 报告。 ## 安装 ``` pip install -r requirements.txt # 可选,仅在需要 --render 时使用: playwright install chromium ``` ## 用法 ``` python recon-scraper.py -u https://example.com ``` 常用选项: ``` python recon-scraper.py -u https://example.com \ --depth 3 \ # max crawl depth (default 3) --max-pages 300 \ # cap on pages visited (default 300) --concurrency 10 \ # concurrent requests (default 10) --delay 0.2 \ # seconds between requests per worker, be polite --include-subdomains \ # allow crawling *.example.com, not just example.com --check-files \ # actively probe .env, .git/config, backups, etc --render \ # headless-browser render for SPAs (React/Vue/Angular) --screenshots \ # save full-page screenshots when --render is used --no-robots \ # ignore robots.txt (only if your authorization allows it) -y # skip the interactive authorization prompt ``` 完整 flag 列表:`python recon-scraper.py --help` ## 输出 ``` [+] Internal URLs: 132 [+] JavaScript Files: 24 [+] API Endpoints: 53 [+] Forms: 7 [+] Emails: 3 [+] Parameters: 28 [+] Sensitive Keywords Found: 5 ``` 报告将以带有时间戳的 `.json` 和 `.html` 文件的形式存放在 `reports/` 目录中。HTML 报告是一个自包含的暗黑模式仪表盘 —— 包含内部 URL、JS 文件、分类的 JS 衍生 endpoint(API 路径、GraphQL、WebSocket、S3 bucket)、带有 CSRF / 文件上传风险标记的表单、IDOR 候选参数名、可能的敏感信息(掩码预览,非完整值)以及任何可访问的敏感文件。 ## 项目结构 ``` recon-scraper/ ├── recon-scraper.py # CLI entry point ├── crawler.py # async crawler (scope, robots.txt, concurrency, rate limiting) ├── extractor.py # HTML parsing: links, JS srcs, forms, emails, comments ├── analyzer.py # orchestrates extraction + modules into one findings set ├── reporter.py # JSON + HTML report generation ├── utils.py # logging, URL normalization, scope checks ├── modules/ │ ├── js_parser.py # API/GraphQL/WebSocket/S3 endpoint regexes for JS content │ ├── secrets.py # context-aware secret detection w/ entropy filtering │ ├── parameters.py # query/form param extraction + IDOR-naming heuristics │ ├── forms.py # form risk flags (missing CSRF, file upload, etc) │ ├── api_finder.py # opt-in probing of well-known sensitive paths │ └── renderer.py # optional Playwright rendering for SPAs └── reports/ # generated output ``` ## 设计说明 / 内置防护机制 - **明确的范围白名单**(`utils.in_scope`)—— 爬虫不会随意跳转到链接中发现的第三方域名;只会跟进目标域名(如果传入 `--include-subdomains`,则包括子域名)。 - **默认遵守 robots.txt** —— 仅当您的授权明确涵盖此项时,才传入 `--no-robots`。 - **限速与并发上限** —— 提供 `--delay` 和 `--concurrency` 选项,以免您对目标造成过大压力;请根据项目规定的限制进行调整。 - **敏感信息检测具备上下文感知能力,而非简单的关键字搜索** —— 匹配 `key = "value"` 赋值模式并辅以 Shannon 熵阈值,且仅显示掩码预览(`AIza…VGdc`)而非完整值,因为这旨在用于分类筛查,而非数据窃取。 - **`--check-files` 默认不开启,需手动选择** —— 这是除正常爬取之外唯一的主动探测;它是一个简短、固定的知名路径列表(如 `.env`、`.git/HEAD`、`backup.zip` 等),属于任何标准侦察工具都会执行的同类检查。 - **IDOR / 管理员参数标记仅为命名启发式判断** —— 它们突出显示值得手动测试的参数名,而非已确认的漏洞。
标签:LLM应用, Python, Web安全, 实时处理, 无后门, 特征检测, 蓝队分析, 计算机取证, 逆向工具