12216659/Advanced-Vulnerability-Scanner-v2.1

GitHub: 12216659/Advanced-Vulnerability-Scanner-v2.1

一个基于 Flask 与 Nmap 的全栈 Web 漏洞扫描器,提供可视化扫描与报告功能。

Stars: 0 | Forks: 0

# NexScan — 高级漏洞扫描器 ### 全栈 Web 应用(Flask + Nmap + Python) ## 📂 项目结构 ``` nexscan/ ├── app.py ← Flask backend (all API routes) ├── requirements.txt ← Python dependencies ├── Procfile ← Gunicorn startup (Render/Heroku) ├── render.yaml ← One-click Render deploy config ├── README.md ├── reports/ ← Auto-created; stores scan results ├── templates/ │ ├── index.html ← Landing page │ ├── scan.html ← Scan launcher UI │ ├── report.html ← Live scan report viewer │ └── demo_report.html ← Demo report (no scan needed) └── static/ ├── css/ │ ├── main.css ← Shared styles │ ├── scan.css ← Scan page styles │ └── report.css ← Report page styles └── js/ ├── main.js ← Landing page logic ├── scan.js ← Scan launch + progress polling └── report.js ← Report rendering + chart ``` ## 🚀 本地开发(VS Code) ### 先决条件 - Python 3.9+ - `pip` - 系统中安装了 `nmap`(可选 — 如果未安装则回退到演示模式) ### 安装 nmap(可选但推荐) ``` # Ubuntu / Kali Linux sudo apt install nmap # macOS brew install nmap # Windows — 从 https://nmap.org/download.html 下载安装程序 ``` ### 设置与运行 ``` # 1. 在 VS Code 中克隆或打开 nexscan 文件夹 # 2. 创建虚拟环境 python3 -m venv venv source venv/bin/activate # Linux/Mac # venv\Scripts\activate # Windows # 3. 安装依赖 pip install -r requirements.txt # 4. 运行开发服务器 python app.py ``` 打开:http://localhost:5000 ## 🌐 页面 | URL | 描述 | |----------------------|------------------------------| | `/` | 着陆页(首页、功能等) | | `/scan` | 使用目标 + 模式启动扫描 | | `/report/` | 查看实时扫描结果 | | `/demo-report` | 演示报告(无需 nmap) | ## 🔌 API 端点 | 方法 | 端点 | 描述 | |--------|-----------------------------|-------------------------| | POST | `/api/start-scan` | 启动扫描 | | GET | `/api/scan-status/` | 轮询进度(0–100%) | | GET | `/api/scan-result/` | 获取完整 JSON 结果 | | GET | `/api/download-report/` | 下载 FULL_REPORT.txt | | GET | `/api/demo-data` | 获取模拟演示扫描数据 | ### POST /api/start-scan ``` { "target": "192.168.1.1", "mode": "quick" } ``` 返回: ``` { "scan_id": "uuid-...", "demo": false, "message": "Scan started" } ``` ### GET /api/scan-status/ ``` { "status": "running", "progress": 45, "step": "Service Detection", "eta": "~60s remaining" } ``` ## ☁️ 部署到 Render(免费) 1. 将此文件夹推送到 GitHub 仓库 2. 访问 https://render.com → New Web Service 3. 连接你的 GitHub 仓库 4. 设置: - **构建命令:** `pip install -r requirements.txt` - **启动命令:** `gunicorn app:app --bind 0.0.0.0:$PORT --workers 2 --timeout 120` - **环境:** Python 3 ## 🛡️ 演示模式如何工作 如果系统中未找到 `nmap`,扫描器将回退到演示模式: - 使用真实感计时(每步 3–4 秒)模拟扫描步骤 - 返回匹配真实扫描输出的预定义端口/服务数据 - 完整的 OWASP 标记、风险评分和报告生成仍可使用 - 报告界面中会显示演示模式横幅 ## ⚠️ 法律声明 本工具严格仅供 **教育用途** 和 **授权安全测试** 使用。 **不要**在未获得明确书面许可的情况下扫描系统。 未经授权的端口扫描在许多司法管辖区属于非法行为。 ## 🧰 技术栈 - **后端:** Python 3、Flask、Flask-CORS、Gunicorn - **扫描器:** Nmap(通过 subprocess) - **前端:** HTML5、CSS3、Vanilla JS - **字体:** Orbitron、Rajdhani、Share Tech Mono(Google Fonts) - **部署:** Render / 任何 WSGI 主机
标签:API, CMS安全, CSS, CTI, Flask, Heroku, HTML模板, JavaScript, Nmap, Procfile, Python, Render部署, SEO, Web安全, 二进制发布, 云部署, 依赖管理, 前后端分离, 反取证, 安全评估, 实时报告, 开源工具, 开源框架, 持续集成, 无后门, 本地开发, 渲染引擎, 演示报告, 网络安全, 蓝队分析, 虚拟环境, 虚拟驱动器, 进度轮询, 逆向工具, 隐私保护, 静态资源