Giter VIP home page Giter VIP logo

ctf's Introduction

CTF

What is this?

A CTF platform I designed specifically for videos. It is intended to be small and simple, and there are most likely much better alternatives out there. I do not recommend using it. Maybe some of you will find vulnerabilities in it lol. Be aware that it is still under development.

Setup

Host

Under scripts/ you will find start.sh. On execution it runs the docker compose script and create the containers fro the Postgres DB, the API and the web aka next js app. The script does not automatically setup the tables of the database so you'll have to run the contents of the init-db.sql file yourself.

Environment file

The .env file must be placed under api/, and is used with the docker compose script and the API. It must contain the following varriables:

  • DB_USER -> The default user for the DB
  • DB_PASSWORD -> UNUSED FOR NOW
  • DB_HOST -> The IP of the DB (Should be localhost)
  • DB_NAME -> The name of the default DB
  • TOKEN_KEY -> The secret key for JWT token signature
  • SECRET_KEY -> The secret key for specific API authentification (Like to signup users)

Example environment file:

DB_USER=YOUR_DB_USER
DB_PASSWORD=
DB_HOST=localhost
DB_NAME=ctf

TOKEN_KEY=MR4cBaCXYzSHAe1wHHiNqAGVMpcP9FnM
SECRET_KEY=super_secret_key

Authentification

In order to create users, you will need to send a POST request to /v1/auth/signup of the API along with the SECRET_KEY which you set in the .env file of the API, the name of the user and its desired password.

ctf's People

Contributors

axxo-dev avatar

Stargazers

 avatar  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.