{"id":13845370,"url":"https://github.com/tongchengbin/ocean_ctf","last_synced_at":"2026-01-16T21:03:22.102Z","repository":{"id":42070459,"uuid":"320878740","full_name":"tongchengbin/ocean_ctf","owner":"tongchengbin","description":"CTF平台 支持docker 动态部署题目、分数统计、作弊检测，静态题目，漏洞复现,ctf platform,","archived":false,"fork":false,"pushed_at":"2025-12-04T02:35:27.000Z","size":36965,"stargazers_count":366,"open_issues_count":7,"forks_count":64,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-12-07T08:36:42.869Z","etag":null,"topics":["ctf","docker","flask","platform","vulnerability"],"latest_commit_sha":null,"homepage":"http://ctf.lostpeach.cn/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tongchengbin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-12-12T16:53:12.000Z","updated_at":"2025-12-04T09:02:15.000Z","dependencies_parsed_at":"2024-03-04T02:40:18.190Z","dependency_job_id":"8bd3cb36-f2af-4ddd-a1e1-d551dfb2c343","html_url":"https://github.com/tongchengbin/ocean_ctf","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/tongchengbin/ocean_ctf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tongchengbin%2Focean_ctf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tongchengbin%2Focean_ctf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tongchengbin%2Focean_ctf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tongchengbin%2Focean_ctf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tongchengbin","download_url":"https://codeload.github.com/tongchengbin/ocean_ctf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tongchengbin%2Focean_ctf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ctf","docker","flask","platform","vulnerability"],"created_at":"2024-08-04T17:03:21.914Z","updated_at":"2026-01-16T21:03:22.091Z","avatar_url":"https://github.com/tongchengbin.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# 🌊 Ocean CTF\n\n一个动态 flag 练习靶场平台\n\n## ✅ TODO\n\n- [x] 容器管理\n- [x] 题库管理\n- [x] 动态 flag\n- [x] 作弊检测\n- [x] 公告通知\n- [x] 动态启动题库\n- [x] 题库隔离\n- [x] 公告通知\n- [x] 排行榜\n- [x] 快速部署\n- [ ] 大屏展示\n- [x] 权限分离\n- [x] 一键部署\n- [x] 多端口开放\n- [ ] compose 容器支持\n- [ ] fix bug\n- [ ] 添加镜像功能页面重构\n- [x] 漏洞复现\n\n## 🚀 预览\n\n线上地址 http://ctf.lostpeach.cn/\n\n`测试用户: test/test`\n\n管理后台 http://ctf.lostpeach.cn/manager\n\n`访客管理账号 guest/guest`\n\n## SASS\n\n赛事版 http://ocean.lostpeach.cn\n\n## 📖 安装\n\n##### clone\n\n- 克隆代码\n\n```\ngit clone https://github.com/tongchengbin/ocean_ctf.git /opt/ocean_ctf\n```\n\n- docker-compose 编排镜像\n\n```\ncd /opt/ocean_ctf\ncp .env_example .env\ndocker-compose up -d\n```\n\n- 初始化系统\n  访问 /manager\n\n`默认账号\nadmin/admin`\n\n## 使用\n\n#### 小记\n\n经过几次的改版还是觉得单纯的 docker 方式比 docker-compose 更加方便;启动和关闭的速度更快、\n题目共享、磁盘释放更方便等，\n同时对于 ctf 比赛 docker-compose 的场景比较小，因此 CTF 动态仅支持 docker 启动。后续会有靶场相关会支持 docker-compose 以及 docker 启动，\n关于为何移除 docker 远程调用目前是觉得增加了初级用户的使用难度所以暂时移除。\n\n### 动态题目\n\n通过虚拟化-资源中心添加题目资源，题目资源可以使用本地镜像、远程镜像、如 CTFDB 项目中提供了默认题目可以通过同步功能拉取题库或在[dockerhub](https://hub.docker.com/r/tongchengbin/easy_web)中查看题目\n\n添加资源后需要进行编译（PULL）、因为编译是个比较耗时的操作(和网络环境有关)、所以建议先本地拉取 image 后点击编译按钮。\n后续的操作与之前的版本一样、添加赛事题库选择动态题目和对应的资源环境即可。\n\n## 📃 题库\n\n\u003e 题库仓库：[GitHub - tongchengbin/ctfdb: ctf 题库](https://github.com/tongchengbin/ctfdb)\n\n## 💻 题库格式说明\n\n\u003e TODO\n\n### 漏洞复现\n\n漏洞复现支持 vulhub 部分镜像可以直接导入，但是推荐使用[CTFDB Vulnerability](https://github.com/tongchengbin/ctfdb) 仓库进行维护,内置 export 脚本支持自动扫描导出漏洞文件，该文件可以在平台 漏洞复现-漏洞资源中导入\n\n## 开发\n\n后台管理源码：https://github.com/tongchengbin/ocean_manager\n\n### 依赖管理与代码质量\n\n项目使用 `requirements.txt` 来管理依赖，使用 `pyproject.toml` 配置代码质量工具，并使用 Makefile 来简化常用命令。\n\n#### 依赖文件结构\n\n```\nrequirements/\n├── base.txt     # 基础运行时依赖\n├── dev.txt      # 开发环境依赖\n├── prod.txt     # 生产环境依赖\n└── test.txt     # 测试环境依赖\n\nrequirements.txt # 生产部署用（指向 prod.txt）\n```\n\n#### 安装依赖\n\n```bash\n# 安装开发依赖\nmake install-dev\n# 或者直接使用 pip\npip install -r requirements/dev.txt\n\n# 安装生产依赖\nmake install-prod\n# 或者直接使用 pip\npip install -r requirements/prod.txt\n\n# 安装测试依赖\nmake install-test\n# 或者直接使用 pip\npip install -r requirements/test.txt\n```\n\n#### 代码质量工具\n\n```bash\n# 运行所有代码检查工具\nmake lint\n\n# 只运行 flake8\nmake lint-flake8\n\n# 格式化代码（使用 black 和 isort）\nmake format\n\n# 清理 Python 缓存文件\nmake clean\n\n# 运行测试\nmake test\n```\n\n#### Docker 构建优化\n\n项目 Dockerfile 已配置使用清华大学 PyPI 镜像源，加速依赖安装：\n\n```bash\n# 构建镜像（自动使用清华源）\ndocker-compose build\n\n# 或者单独构建 web 服务\ndocker build -f install/docker/ocean_web.Dockerfile -t ocean_web .\n```\n\n要查看所有可用命令，请运行：\n\n```bash\nmake help\n```\n\n## 社群\n\nQQ 群: 836641851\n\n  \u003cimg src=\"./doc/image/qq.jpg\" alt=\"QQ Image\" width=\"200\" height=\"300\"\u003e\n\n## License\n\n[MIT](https://github.com/tongchengbin/ocean_ctf/blob/master/LICENSE)\n\nCopyright (c) 2022-present tongcb\n\n## 截图\n\n- 管理员登录\n  ![](./doc/image/admin_login.png)\n\n- Home\n  ![](./doc/image/dashboard.png)\n\n- Docker\n  ![](./doc/image/docker.png)\n\n- 资源中心\n  ![](./doc/image/resource.png)\n- 编译镜像\n\n  ![](./doc/image/9.png)\n\n- 编译进度\n\n  ![](./doc/image/编译进度.png)\n\n- 镜像列表\n  ![](./doc/image/8.png)\n\n- 题目列表\n  ![](./doc/image/question.png)\n- 赛事环境\n  ![](./doc/image/4.png)\n- 答题记录\n  ![](./doc/image/5.png)\n\n- 用户首页\n  ![](./doc/image/用户首页.png)\n\n- 启动容器\n  ![](./doc/image/启动容器.png)\n\n- 漏洞复现 Shell\n  ![](./doc/image/漏洞复现shell.png)\n- 靶场\n  ![]()![动态靶场](./doc/image/动态靶场.png)\n\n- 漏洞复现\n  ![](./doc/image/漏洞复现.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftongchengbin%2Focean_ctf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftongchengbin%2Focean_ctf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftongchengbin%2Focean_ctf/lists"}