Coder Social home page Coder Social logo

float_buu's Introduction

float_buu

CTFd中文主题,高仿buuoj.cn以及ctf.hzyxxl.com

reqiurements

需要api/v1/challenges/solves支持

在/CTFd/CTFd/api/v1/challenges.py中加入如下几行,也可以直接git apply 补丁:

from sqlalchemy import func
@challenges_namespace.route("/solves")
class AllChallengeSolves(Resource):
    @check_challenge_visibility
    @check_score_visibility
    @during_ctf_time_only
    @require_verified_emails
    def get(self):
        Model = get_model()

        response = {}
        challenges = (
            db.session.query(Solves.challenge_id, func.count(Solves.challenge_id))
                .join(Model, Solves.account_id == Model.id)
                .filter(
                Model.banned == False,
                Model.hidden == False
            )
                .group_by(Solves.challenge_id)
                .all()
        )

        for challenge in challenges:
            response[str(challenge[0])] = challenge[1]

        return {"success": True, "data": response}

安装

需要回滚到CTFd以前的版本

git clone https://github.com/CTFd/CTFd.git
cd CTFd/
git reset 6c5c63d667a17aec159c8e26ea53dccfbc4d0fa3 --hard
git apply 0001-solves-api.patch
cd CTFd/themes
git clone https://github.com/fjh1997/float_buu.git
cd ../../../
docker-compose build
docker-compose up -d
docker network connect frpcadmin <ctfd容器名或者ID>

float_buu's People

Contributors

fjh1997 avatar zkonge avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.