ushasreec2/xss-detector

GitHub: ushasreec2/xss-detector

结合机器学习与正则规则的双引擎 XSS 检测系统,提供实时输入分析和置信度评分。

Stars: 0 | Forks: 0

# XSS 检测系统 ## 概述 通过以下方式检测 XSS 攻击: * 机器学习(TF-IDF + 逻辑回归) * 基于规则的检测(regex) ## 功能 * 实时检测 * 高亮恶意部分 * ML 与 Regex 对比 * 置信度得分 ## 示例 Payload ### 良性输入 ``` Hello World ``` ``` Welcome to my website ``` ### XSS Payload ``` ``` ``` ``` ``` ``` ``` Click Me ``` ### 预期行为 | Payload | 预期结果 | |----------|----------| | Hello World | 安全 | | Welcome to my website | 安全 | | `` | 恶意 | | `` | 恶意 | | `` | 恶意 | | `javascript:alert('XSS')` | 恶意 | ## 运行 1. 训练模型: cd ml python train_model.py 2. 启动 backend: cd .. python -m uvicorn backend.app:app --reload 3. 打开 frontend: frontend/index.html
标签:Apex, Python, Web安全, Windows日志分析, XSS检测, 无后门, 机器学习, 蓝队分析, 逆向工具