ignorant-earthquake/Murder

GitHub: ignorant-earthquake/Murder

一个 Flask 驱动的交互式谋杀谜题 CTF 挑战,帮助玩家通过线索推理识别凶手并提交 Flag。

Stars: 0 | Forks: 0

# 🔪 Murder on a Vacation Resort — CTF 挑战 ## 概述 一个完全交互式的谋杀谜题 CTF 挑战。玩家通过审查嫌疑人、武器、地点、动机、证据线索和证人证词,来识别凶手并提交正确的 Flag。 **技术栈:** Python · Flask · Vanilla JS · CSS3 ## 项目结构 ``` murder-mystery/ ├── app.py # Flask application + flag validation endpoint ├── requirements.txt # Python dependencies ├── Dockerfile # Container image definition ├── docker-compose.yml # Compose service definition ├── .gitignore ├── .dockerignore ├── templates/ │ ├── index.html # Landing page │ └── case.html # Full interactive case file └── static/ ├── css/ │ └── style.css # Noir detective aesthetic └── js/ ├── particles.js # Ambient particles (landing) └── case.js # Tabs, flag submission, notes panel ``` ## 本地运行 ### 前置条件 - 已安装 Python 3.10+ - 可用 `pip` ### 1. 克隆仓库 ``` git clone cd murder-mystery ``` ### 2. 创建并激活虚拟环境 ``` # 创建 venv python -m venv venv # 激活 — Linux / macOS source venv/bin/activate # 激活 — Windows (PowerShell) .\venv\Scripts\Activate.ps1 ``` ### 3. 安装 Flask 和依赖 ``` pip install -r requirements.txt ``` ### 4. 启动应用 ``` python app.py ``` 在浏览器中打开:**http://localhost:5000** ## 使用 Docker 运行 ### 选项 A — Docker Compose(推荐) ``` # 构建并启动 docker compose up --build # 停止 docker compose down ``` 应用可用地址:**http://localhost:5000** ### 选项 B — 仅使用 Docker ``` # 构建镜像 docker build -t murder-mystery-ctf . # 运行容器 docker run -p 5000:5000 murder-mystery-ctf ``` ## 部署指南 ### 部署到 VPS / 云服务器 1. **通过 SSH 连接到服务器** 并安装 Docker: sudo apt update && sudo apt install -y docker.io docker-compose-plugin 2. **传输项目**(或从 Git 克隆): git clone /opt/murder-mystery cd /opt/murder-mystery 3. **启动服务:** docker compose up -d --build 4. **在防火墙 / 安全组规则中暴露 5000 端口**,或使用 nginx 进行反向代理: server { listen 80; server_name your-domain.com; location / { proxy_pass http://127.0.0.1:5000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } } 5. **(可选) 使用 certbot 添加 SSL**: sudo apt install -y certbot python3-certbot-nginx sudo certbot --nginx -d your-domain.com ## Flag 格式 ``` SECURINETSEPS{suspect-name_weapon-name_location-name_motive-name} ``` 全小写,使用连字符连接的多单词值,以下划线分隔。 ## 功能特性 - 🗂 **分页案件文件** — 嫌疑人、武器、地点、动机、证据、证人证词 - 📝 **侦探笔记** — 持久化草稿板,保存至 localStorage(按 `N` 切换) - 🚩 **Flag 提交** — 通过 REST API 即时反馈 - 🎉 **正确时触发彩带爆炸动画** - 📱 **完全响应式** — 适配移动端 ## 许可证 专为 SecuriNets EPS CTF 构建。保留所有权利。
标签:CSS3, Docker, Flask, NIDS, noir, Python, Vanilla JS, 交互式挑战, 依赖管理, 侦探, 前端, 后端开发, 安全防御评估, 容器化, 开发环境, 推理游戏, 旅游度假, 无后门, 本地运行, 杂项挑战, 模板渲染, 犯罪现场, 虚拟环境, 请求拦截, 谋杀谜题, 逆向工具, 静态资源