Code Monkey home page Code Monkey logo

js-ctf-platform's Introduction

EasyCTF Platform

Gitter

This is a genericized version of EasyCTF 2014, and can be used as a backend for hosting CTF competitions. This was based on picoCTF 2013's CTF-Platform.

Getting Started

  1. Clone the repo and run npm install to install dependencies.
  2. Modify the options in api/common.js.
  3. Navigate to the directory using some kind of shell and run node app to start the server.
  4. The server will listen on port 3000 by default unless you specify a different port in the environmental variables.

Requirements

This platform is written in Node.js. Therefore, it is quite obvious that you need to have Node.js installed on your system in order to run this server. The node dependencies are all included in the repo, but if you have any trouble with those, simply run npm install --save inside the directory, since all of the packages should be listed in package.json.

I'd recommend using a Unix-based computer (that includes you, Macs ๐Ÿ˜„ ) to run this, however using Windows is perfectly acceptable. In fact, this platform was written and tested more on a Windows computer than on Linux.

AJAX API

Like picoCTF's platform, this server consists of many static HTML files that make AJAX (asynchronous) requests to an API. The API does not need to be launched separately; it is built into the server.

Database

This platform requires a MongoDB server. MongoDB has many advantages to SQL, and if you want a full list of those, Google it. The following collections exist in the database:

  • accounts (store user information)
  • problems (store problem information)
  • reset_password (password reset requests)
  • shell_accounts (for if you want to have a shell)
  • submissions (store submission information)

Sample problem information can be found in the docs folder in this repo (TODO).

Hosting

It is strongly recommended that you use Heroku. Heroku is simple to set up, runs on Git, and has many partners that will give you exclusive deals on their products (such as email servers, DNS servers, etc.). This platform is ready to push to Heroku directly.

$ (git add, git commit)
$ heroku create
$ git push heroku master
$ heroku ps:scale web=1 # Ensure at least one web process is running

js-ctf-platform's People

Contributors

gitter-badger avatar iptq avatar xasos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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