GithubHelp home page GithubHelp logo

j5s / ocean_ctf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tongchengbin/ocean_ctf

0.0 0.0 0.0 10.27 MB

开源CTF平台 动态flag docker部署管理 用户界面用flask jinjia2 模板+ jquery bootstrap 管理端由flask提供API VUE+element构建

Python 65.53% Shell 0.30% CSS 6.69% JavaScript 3.68% HTML 23.64% Dockerfile 0.16%

ocean_ctf's Introduction

Ocean CTF

一个动态flag练习靶场平台

TODO

  • 容器管理
  • 题库管理
  • 动态flag
  • 作弊检测
  • 公告通知
  • 动态启动题库
  • 题库隔离
  • 公告通知
  • 排行榜
  • 快速部署
  • 大屏展示
  • 权限分离
  • fix bug
  • fix bug
  • fix bug

预览

线上地址 http://159.75.92.142:8080 管理后台 http://159.75.92.142:8080/manager 访客账号 test/test

默认超级管理员账号 superuser/admin

安装

docker方式

docker 编排会引用.env文件中的环境变量

前置环境
docker、docker-compose、git
clone
git clone https://github.com/tongchengbin/ocean_ctf.git
编译web环境
docker build -t ocean_web -f install/docker/ocean_web.Dockerfile .
compose编排
docker-compose up
访问测试
curl 127.0.0.1:8080

手动安装

前置环境
Python 3.6+
mysql 5.6+
redis
nginx(可选)
docker(可选)
supervisord(可选)

clone
git clone https://github.com/tongchengbin/ocean_ctf.git /opt/ocean_ctf
安装Python依赖
pip install -r requirements.txt
快速运行
chmod +x ./run.sh
./run.sh
通过nginx代理

默认情况下项目已经给管理后台的页面做了静态处理 但是建议使用nginx处理静态文件

# vim /etc/nginx/conf.d/ctf.conf
server {
        listen       8080 default_server;
        server_name  _;
        location / {
        proxy_pass http://127.0.0.1:5000;
        }
    location /manager {
        alias /opt/ocean_ctf/install/manager/dist;
    }
    }
使用supervisord托管程序

因为celery可能会因为程序异常而退出 所以使用supervisord托管celery 同时也可方便管理,如果使用supervisord托管进程,不要使用run.sh 启动避端口冲突

  1. 安装supervisord

    yum install -y supervisord
  2. 配置托管程序

    cp ./install/config/supervisord/ocean.ini /etc/supervisord.d/
  3. 设置开机启动

    systemctl enable supervisord.service
    systemctl start supervisord.service

常见问题&注意事项

python
请注意设置python3为默认python版本
pip 报错mysqlclinet
centos: sudo yum install mysql-devel
ubuntu: sudo apt-get install libmysqlclient-dev

题库

题库仓库:GitHub - tongchengbin/ctfdb: ctf 题库

题库格式说明

开发

后台管理源码:https://github.com/tongchengbin/ocean_manager

其他截图

  • 容器主机详情

  • 编译镜像

  • 编译进度

  • 镜像列表

  • 添加动态题库

  • 首页

  • 启动容器

  • 靶场

    动态靶场

  • 管理后台

    2

ocean_ctf's People

Contributors

mycrazycc avatar tongchengbin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.