Skip to content

Kodkollektivet/ctf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CTF

Is a Django based “framework” for doing CTFs. This project was done for one of our events.

Add new question

Add a new class in views.py and inherit from Question. Create a new template, look at some of the examples to get a feel for how to do it. Point your question to next url. Create a new URL with some hash code.

Views example:

class YourQuestion(Question):
    """Your question."""
    template_name = 'ctf/your_question_template.html'
    answer = 'THE ANSWER'
    success_url = reverse_lazy('ctf:next_problem_in_the_chain') # Next question

Urls example:

url(r'^djsakldsjal/$', views.YourQuestion.as_view(), name='yourquestion'),

Template example:

{% extends 'ctf/question-base.html' %}

{% block question %}
    Write your problem description here.
{% endblock question %}

Development environment

Its highly recommended to use virtualenv but its optional. pip may need to be installed depending on OS. Navigate to folder where the project is located.

pip install -r requirements.txt  # Install dependencies
python manage.py makemigrations  # Make a migration scheme
python manage.py migrate  # Create a DB with the scheme
python manage.py runserver  # Start development server

About

Small capture the flag problems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •