├── .gitignore
├── LICENSE
├── MANIFEST.in
├── README.md
├── ctforge.conf
├── ctforge.crontab
├── ctforge
├── __init__.py
├── database.py
├── db
│ ├── procedures.sql
│ └── schema.sql
├── exceptions.py
├── forms.py
├── scripts
│ ├── __init__.py
│ ├── ctfbot.py
│ └── ctforge.py
├── themes
│ ├── ctforge
│ │ ├── static
│ │ │ ├── css
│ │ │ │ ├── bootstrap.css
│ │ │ │ ├── ctforge.css
│ │ │ │ ├── custom.css
│ │ │ │ ├── cyberchallenge.css
│ │ │ │ ├── dctf-admin.css
│ │ │ │ ├── font-awesome.min.css
│ │ │ │ └── footable.bootstrap.min.css
│ │ │ ├── fonts
│ │ │ │ ├── 9IGqbwlMn4Zg3as8alsdNA.woff2
│ │ │ │ ├── CfvjE7QXPaQqLo02SkpIgA.ttf
│ │ │ │ ├── RQxK-3RA0Lnf3gnnnNrAsYW_AySPyikQrZReizgrnuw.ttf
│ │ │ │ ├── fontawesome-webfont.woff2
│ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ ├── glyphicons-halflings-regular.woff2
│ │ │ │ └── t3vZkumW9T_w4ukdwBVHtA.woff2
│ │ │ ├── img
│ │ │ │ ├── 10Sec.png
│ │ │ │ ├── 404.png
│ │ │ │ ├── ai.png
│ │ │ │ ├── bg.jpg
│ │ │ │ ├── bug.png
│ │ │ │ ├── c00kies.png
│ │ │ │ ├── cog.png
│ │ │ │ ├── coin.png
│ │ │ │ ├── ctforge_logo.png
│ │ │ │ ├── cyberchallenge_logo.png
│ │ │ │ ├── cyberchallenge_logo_front.png
│ │ │ │ ├── cyberchallenge_logo_front_ad.png
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── flag.png
│ │ │ │ ├── galactic_empire_logo.png
│ │ │ │ ├── head.png
│ │ │ │ ├── integeruser.png
│ │ │ │ ├── lavish.png
│ │ │ │ ├── mrstorm.png
│ │ │ │ ├── netowrk-map.png
│ │ │ │ ├── palma.png
│ │ │ │ ├── r1x.png
│ │ │ │ ├── spam.png
│ │ │ │ ├── unive.png
│ │ │ │ └── xire.png
│ │ │ └── js
│ │ │ │ ├── ad_charts.js
│ │ │ │ ├── amcharts.js
│ │ │ │ ├── amstock.js
│ │ │ │ ├── bootstrap.min.js
│ │ │ │ ├── chart_dark.js
│ │ │ │ ├── dctf.js
│ │ │ │ ├── footable.min.js
│ │ │ │ ├── images
│ │ │ │ ├── dragIconRectSmall.svg
│ │ │ │ └── lensWhite.svg
│ │ │ │ ├── jeopardy_charts.js
│ │ │ │ ├── jquery-2.0.3.min.js
│ │ │ │ ├── jquery-2.0.3.min.map
│ │ │ │ ├── npm.js
│ │ │ │ ├── popper.min.js
│ │ │ │ └── serial.js
│ │ └── templates
│ │ │ ├── 403.html
│ │ │ ├── 404.html
│ │ │ ├── 500.html
│ │ │ ├── _macros.html
│ │ │ ├── admin
│ │ │ ├── data.html
│ │ │ └── index.html
│ │ │ ├── challenge.html
│ │ │ ├── challenges.html
│ │ │ ├── challenges_scoreboard.html
│ │ │ ├── credits.html
│ │ │ ├── design.html
│ │ │ ├── hints.html
│ │ │ ├── index.html
│ │ │ ├── layout.html
│ │ │ ├── login.html
│ │ │ ├── rules.html
│ │ │ ├── scoreboard.html
│ │ │ ├── service.html
│ │ │ ├── submit.html
│ │ │ ├── team.html
│ │ │ ├── teams.html
│ │ │ ├── user.html
│ │ │ └── writeup.html
│ ├── cyberchallenge
│ │ ├── static
│ │ │ ├── css
│ │ │ │ ├── bootstrap.css
│ │ │ │ ├── ctforge.css
│ │ │ │ ├── custom.css
│ │ │ │ ├── cyberchallenge.css
│ │ │ │ ├── dctf-admin.css
│ │ │ │ ├── font-awesome.min.css
│ │ │ │ └── footable.bootstrap.min.css
│ │ │ ├── fonts
│ │ │ │ ├── 9IGqbwlMn4Zg3as8alsdNA.woff2
│ │ │ │ ├── CfvjE7QXPaQqLo02SkpIgA.ttf
│ │ │ │ ├── RQxK-3RA0Lnf3gnnnNrAsYW_AySPyikQrZReizgrnuw.ttf
│ │ │ │ ├── fontawesome-webfont.woff2
│ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ ├── glyphicons-halflings-regular.woff2
│ │ │ │ └── t3vZkumW9T_w4ukdwBVHtA.woff2
│ │ │ ├── img
│ │ │ │ ├── 10Sec.png
│ │ │ │ ├── 404.png
│ │ │ │ ├── ai.png
│ │ │ │ ├── bg.jpg
│ │ │ │ ├── bug.png
│ │ │ │ ├── c00kies.png
│ │ │ │ ├── cog.png
│ │ │ │ ├── coin.png
│ │ │ │ ├── ctforge_logo.png
│ │ │ │ ├── cyberchallenge_logo.png
│ │ │ │ ├── cyberchallenge_logo_front.png
│ │ │ │ ├── cyberchallenge_logo_front_ad.png
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── flag.png
│ │ │ │ ├── galactic_empire_logo.png
│ │ │ │ ├── head.png
│ │ │ │ ├── integeruser.png
│ │ │ │ ├── lavish.png
│ │ │ │ ├── mrstorm.png
│ │ │ │ ├── netowrk-map.png
│ │ │ │ ├── palma.png
│ │ │ │ ├── r1x.png
│ │ │ │ ├── spam.png
│ │ │ │ ├── unive.png
│ │ │ │ └── xire.png
│ │ │ └── js
│ │ │ │ ├── ad_charts.js
│ │ │ │ ├── amcharts.js
│ │ │ │ ├── amstock.js
│ │ │ │ ├── bootstrap.min.js
│ │ │ │ ├── chart_dark.js
│ │ │ │ ├── dctf.js
│ │ │ │ ├── footable.min.js
│ │ │ │ ├── images
│ │ │ │ ├── dragIconRectSmall.svg
│ │ │ │ └── lensWhite.svg
│ │ │ │ ├── jeopardy_charts.js
│ │ │ │ ├── jquery-2.0.3.min.js
│ │ │ │ ├── jquery-2.0.3.min.map
│ │ │ │ ├── npm.js
│ │ │ │ ├── popper.min.js
│ │ │ │ └── serial.js
│ │ └── templates
│ │ │ ├── 403.html
│ │ │ ├── 404.html
│ │ │ ├── 500.html
│ │ │ ├── _macros.html
│ │ │ ├── admin
│ │ │ ├── data.html
│ │ │ └── index.html
│ │ │ ├── challenge.html
│ │ │ ├── challenges.html
│ │ │ ├── challenges_scoreboard.html
│ │ │ ├── credits.html
│ │ │ ├── design.html
│ │ │ ├── hints.html
│ │ │ ├── index.html
│ │ │ ├── layout.html
│ │ │ ├── login.html
│ │ │ ├── rules.html
│ │ │ ├── scoreboard.html
│ │ │ ├── service.html
│ │ │ ├── submit.html
│ │ │ ├── team.html
│ │ │ ├── teams.html
│ │ │ ├── user.html
│ │ │ └── writeup.html
│ └── dctf2017
│ │ ├── static
│ │ ├── css
│ │ │ ├── bootstrap.css
│ │ │ ├── bootstrap.css.map
│ │ │ ├── bootstrap.min.css
│ │ │ ├── ctforge.css
│ │ │ ├── custom.css
│ │ │ ├── dctf-admin.css
│ │ │ ├── dctf.css
│ │ │ └── footable.bootstrap.min.css
│ │ ├── fonts
│ │ │ ├── 9IGqbwlMn4Zg3as8alsdNA.woff2
│ │ │ ├── CfvjE7QXPaQqLo02SkpIgA.ttf
│ │ │ ├── RQxK-3RA0Lnf3gnnnNrAsYW_AySPyikQrZReizgrnuw.ttf
│ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ ├── glyphicons-halflings-regular.woff2
│ │ │ └── t3vZkumW9T_w4ukdwBVHtA.woff2
│ │ ├── img
│ │ │ ├── 404.png
│ │ │ ├── bg.jpg
│ │ │ ├── bug.png
│ │ │ ├── cog.png
│ │ │ ├── coin.png
│ │ │ ├── favicon.ico
│ │ │ ├── flag.png
│ │ │ ├── galactic_empire_logo.png
│ │ │ ├── head.png
│ │ │ ├── integeruser.png
│ │ │ ├── lavish.png
│ │ │ ├── mrstorm.png
│ │ │ ├── palma.png
│ │ │ ├── r1x.png
│ │ │ ├── spam.png
│ │ │ └── xire.png
│ │ └── js
│ │ │ ├── bootstrap.js
│ │ │ ├── bootstrap.min.js
│ │ │ ├── charts.js
│ │ │ ├── dctf.js
│ │ │ ├── footable.min.js
│ │ │ ├── jquery-2.0.3.min.js
│ │ │ ├── jquery-2.0.3.min.map
│ │ │ └── npm.js
│ │ └── templates
│ │ ├── 403.html
│ │ ├── 404.html
│ │ ├── 500.html
│ │ ├── _macros.html
│ │ ├── admin
│ │ ├── data.html
│ │ └── index.html
│ │ ├── challenge.html
│ │ ├── challenges.html
│ │ ├── challenges_scoreboard.html
│ │ ├── credits.html
│ │ ├── design.html
│ │ ├── index.html
│ │ ├── layout.html
│ │ ├── login.html
│ │ ├── scoreboard.html
│ │ ├── service.html
│ │ ├── submit.html
│ │ ├── team.html
│ │ ├── teams.html
│ │ ├── user.html
│ │ └── writeup.html
├── users.py
├── utils.py
└── views.py
└── setup.py
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | **/__pycache__
3 | CTForge.egg-info
4 | tests
5 | .DS_Store
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | recursive-include ctforge/themes *
2 | recursive-include ctforge/db *
3 | recursive-include ctforge/scripts *
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | CTForge
2 | =======
3 | Forge your own CTF.
4 |
5 | CTForge is the framework developed by the hacking team from University of Venice to easily host jeopardy and attack-defense [CTF security competitions](https://ctftime.org/ctf-wtf/). It provides the software components for running the game, namely the website and the checkbot (optional). The website is the primary interface used by players to access the game rules, the challenges/services descriptions and the scoreboard. In case of an attack-defense game mode the checkbot will, cyclically, store new flags in each team and retrieve them to ensure that everything is working properly.
6 |
7 | Setup
8 | -----
9 | Depending on the desired game mode, requirements and setup may change. Instructions below are for a basic install of ctforge in jeopardy mode using the built-in webserver. Remember that deploying ctforge in production requires a real webserver like [nginx](http://nginx.org/) paired with [uWSGI](https://github.com/unbit/uwsgi).
10 |
11 | Since CTForge is entirely written in Python, a working Python 3 installation is required. Additionally, the [PostgreSQL](http://www.postgresql.org/) DBMS is needed. Detailed steps for configuring and installing the software on a server are provided below (tested on Ubuntu 16.04, although we use [Gentoo](https://wiki.gentoo.org/wiki/Hardened_Gentoo) on production hosts).
12 |
13 | Install the aforementioned packages
14 |
15 | $ sudo apt install python3-dev postgresql postgresql-contrib postgresql-server-dev-all
16 |
17 | Add a database user with the permission to create new databases
18 |
19 | $ sudo service postgresql start
20 | $ sudo -u postgres createuser -d -P ctforge
21 |
22 | Download and unpack the CTForge source code
23 |
24 | $ git clone git@github.com:secgroup/ctforge.git
25 | $ cd ctforge
26 |
27 | Now prepare the Python virtualenv
28 |
29 | $ mkdir -p ~/.venvs/
30 | $ virtualenv -p /usr/bin/python3 ~/.venvs/ctforge
31 | $ . ~/.venvs/ctforge/bin/activate
32 |
33 | Install the framework in development mode for now, adjust the configuration file to your needs then initialize CTForge. The initialization script will prompt for an administrative user which will be used to login on the website and add/modify the live settings of the game (challenges/services/teams).
34 |
35 | (ctforge)$ ./setup.py develop
36 | (ctforge)$ cp ctforge.conf ctforge.custom.conf
37 | (ctforge)$ vim ctforge.custom.conf
38 | (ctforge)$ ctforge -c ctforge.custom.conf init
39 | [*] Reading configuration from ctforge.custom.ctforge.conf
40 |
41 | Welcome to the installation script of CTForge
42 | Please backup your /home/ctforge/.ctforge/ctforge.conf file before continuing.
43 |
44 | Do you want to proceed? (y/n) y
45 | [*] Creating database schema
46 | [*] Installing SQL procedures
47 | [*] Adding an administrative user
48 | name: Marco
49 | surname: Squarcina
50 | mail: squarcina@*****.**
51 | password: *******************
52 | re-enter the password: *******************
53 | Save configuration to /home/ctforge/.ctforge/ctforge.conf ? (y/n) y
54 |
55 |
56 | Now you can run the site and edit your custom theme, the application will automatically reload upon file modifications:
57 |
58 | (ctforge)$ ctforge run
59 |
60 | Feel free to start editing your theme from the default theme `dctf2017` (under the `themes/` folder). When you are done editing the template, install the package using:
61 |
62 | (ctforge)$ ./setup.py install
63 |
64 |
65 | Contacts
66 | --------
67 | CTForge is developed by [Marco Squarcina](https://minimalblue.com), Mauro Tempesta and Lorenzo Veronese aided by all the guys from [c00kies@venice](https://secgroup.github.io/).
68 |
69 |
--------------------------------------------------------------------------------
/ctforge.conf:
--------------------------------------------------------------------------------
1 | # .ini style configuration file for CTForge
2 |
3 | [DEFAULT]
4 | base_dir = ~/.ctforge
5 | ; show_names = yes
6 |
7 | [mode_jeopardy]
8 | active = no
9 | bonus = no
10 |
11 | [mode_attackdefense]
12 | active = yes
13 | flag_prefix =
14 | flag_suffix = =
15 | flag_chars = 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
16 | flag_length = 31
17 | flag_regexp = [A-Z0-9]{31}=
18 | ; # duration of each round in seconds
19 | round_duration = 120
20 | always_submit = yes
21 |
22 | [website]
23 | static_folder = themes/ctforge/static
24 | template_folder = themes/ctforge/templates
25 | ; url = https://localhost:5000/
26 | ; # start date used to display scoreboard graphs
27 | ; date_start = 2016-01-01 00:00:00.0
28 | ; log_file = %(base_dir)s/logs/site.log
29 | ; secret_key = ChengeMeWithRandomStuffASAP
30 | ; secure_cookie = no
31 | ; debug = yes
32 |
33 | [database]
34 | ; host = localhost
35 | ; port = 5432
36 | ; user = ctforge
37 | ; password = ctforge
38 | ; name = ctforge
39 |
40 | [flagbot]
41 | log_file = %(base_dir)s/logs/bot.log
42 | flagid_script_path = %(base_dir)s/bot/flagid
43 | bot_script_path = %(base_dir)s/bot/
44 | ; log_format = %%(asctime)s [%%(levelname)s] %%(message)s
45 |
--------------------------------------------------------------------------------
/ctforge.crontab:
--------------------------------------------------------------------------------
1 | # DO NOT EDIT THIS FILE - edit the master and reinstall.
2 | # (/tmp/crontab.XXXX3STwtW installed on Thu Apr 26 17:18:47 2018)
3 | # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
4 | SHELL=/bin/bash
5 | PWNLIB_NOTERM=1
6 |
7 | # increment the round and dispatch new flags every 4 hours starting from
8 | # midnight
9 | #0 0-23/4 * * * source /home/ctforge/.venvs/ctforge/bin/activate; ctfbot --advance --dispatch -t 30 -n 4 &>> /home/ctforge/.ctforge/logs/cron.log
10 |
11 | # check services integrity every hour at minutes 11, 21, 31, 41, 51
12 | #11-51/10 * * * * sleep $((RANDOM\%(60*5))); source /home/ctforge/.venvs/ctforge/bin/activate; ctfbot --check -t 30 -n 4 -v &>> /home/ctforge/.ctforge/logs/cron.log
13 | # and to the same at minute 01 when the round is not incremented
14 | #1 1-3,5-7,9-11,13-15,17-19,21-23 * * * sleep $((RANDOM\%(60*5))); source /home/ctforge/.venvs/ctforge/bin/activate; ctfbot --check -t 30 -n 4 -v &>> /home/ctforge/.ctforge/logs/cron.log
15 |
16 | # FAST ROUNDS
17 |
18 | # DiSPATCH: every 2 minutes
19 | #*/2 * * * * source /home/ctforge/.venvs/ctforge/bin/activate; ctfbot --advance --dispatch -t 30 -n 4 -v &>> /home/ctforge/.ctforge/logs/cron.log
20 | # CHECK: some seconds later
21 | #*/2 * * * * sleep 30; sleep $((RANDOM\%(5))); source /home/ctforge/.venvs/ctforge/bin/activate; ctfbot --check -t 30 -n 4 -v &>> /home/ctforge/.ctforge/logs/cron.log
22 |
23 |
--------------------------------------------------------------------------------
/ctforge/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 |
4 | # CTForge: Forge your own CTF.
5 |
6 | # Copyright (C) 2016-2019 Marco Squarcina
7 | # Copyright (C) 2016-2019 Mauro Tempesta
8 | # Copyright (C) 2016-2019 Lorenzo Veronese
9 |
10 | # This program is free software: you can redistribute it and/or modify
11 | # it under the terms of the GNU Affero General Public License as published
12 | # by the Free Software Foundation, either version 3 of the License, or
13 | # (at your option) any later version.
14 |
15 | # This program is distributed in the hope that it will be useful,
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | # GNU Affero General Public License for more details.
19 |
20 | # You should have received a copy of the GNU Affero General Public License
21 | # along with this program. If not, see .
22 |
23 |
24 | import os
25 | import sys
26 | import logging
27 | from flask import Flask
28 | from flask.json import JSONEncoder
29 | from flask_login import LoginManager
30 | from flask_wtf.csrf import CSRFProtect
31 | from flask_misaka import Misaka
32 | from flask_cache import Cache
33 |
34 | from datetime import date, timedelta
35 |
36 | from ctforge import utils
37 |
38 |
39 | __author__ = "Marco Squarcina"
40 | __credits__ = ["Francesco Palmarini", "Marco Squarcina", "Mauro Tempesta"]
41 | __license__ = "MIT"
42 | __copyright__ = "Copyright 2014-17, University of Venice"
43 | __maintainer__ = "Marco Squarcina"
44 | __email__ = "squarcina@unive.it"
45 |
46 | # parse the configuration file
47 | try:
48 | user_config_file = os.path.expanduser('~/.ctforge/ctforge.conf')
49 | config_file = user_config_file if os.path.isfile(user_config_file) else 'ctforge.conf'
50 | config = utils.parse_conf(config_file)
51 | except Exception:
52 | import traceback
53 | traceback.print_exc()
54 | pass
55 |
56 | app = Flask(__name__, static_folder=config['STATIC_FOLDER'],
57 | template_folder=config['TEMPLATE_FOLDER'])
58 | app.config.update(config)
59 | app.config['SEND_FILE_MAX_AGE_DEFAULT'] = timedelta(minutes=30)
60 |
61 | login_manager = LoginManager()
62 | login_manager.init_app(app)
63 |
64 | csrf = CSRFProtect()
65 | csrf.init_app(app)
66 |
67 | md = Misaka(html=False, fenced_code=True)
68 | md.init_app(app)
69 |
70 | cache = Cache(app, config={'CACHE_TYPE': 'simple'})
71 |
72 | # initialize the logging system
73 | if app.config['LOG_FILE'] is not None:
74 | try:
75 | logfile = app.config['LOG_FILE']
76 | file_handler = logging.FileHandler(logfile)
77 | file_handler.setFormatter(logging.Formatter((
78 | '-'*90,
79 | 'Message type: %(levelname)s',
80 | 'Location: %(pathname)s:%(lineno)d',
81 | 'Module: %(module)s',
82 | 'Function: %(funcName)s',
83 | 'Time: %(asctime)s',
84 | 'Message: %(message)s')))
85 | file_handler.setLevel(logging.WARNING)
86 | app.logger.addHandler(file_handler)
87 | except (FileNotFoundError, PermissionError) as e:
88 | sys.stderr.write('[!] Unable to access the log file {}\n'.format(logfile))
89 |
90 |
91 | class CustomJSONEncoder(JSONEncoder):
92 | def default(self, obj):
93 | try:
94 | if isinstance(obj, date):
95 | return obj.strftime("%a, %d %b %Y %H:%M:%S")
96 | iterable = iter(obj)
97 | except TypeError:
98 | pass
99 | else:
100 | return list(iterable)
101 | return JSONEncoder.default(self, obj)
102 |
103 | app.json_encoder = CustomJSONEncoder
104 |
105 | import ctforge.views
106 |
--------------------------------------------------------------------------------
/ctforge/database.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 |
4 | # CTForge: Forge your own CTF.
5 |
6 | # Copyright (C) 2016-2019 Marco Squarcina
7 | # Copyright (C) 2016-2019 Mauro Tempesta
8 | # Copyright (C) 2016-2019 Lorenzo Veronese
9 |
10 | # This program is free software: you can redistribute it and/or modify
11 | # it under the terms of the GNU Affero General Public License as published
12 | # by the Free Software Foundation, either version 3 of the License, or
13 | # (at your option) any later version.
14 |
15 | # This program is distributed in the hope that it will be useful,
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | # GNU Affero General Public License for more details.
19 |
20 | # You should have received a copy of the GNU Affero General Public License
21 | # along with this program. If not, see .
22 |
23 |
24 | import sys
25 | import psycopg2
26 | from flask import g, flash
27 |
28 | from ctforge import app
29 |
30 |
31 | def get_db_connection():
32 | """Initialize a connection to the database."""
33 |
34 | db_conn = getattr(g, 'db_conn', None)
35 | if db_conn is None:
36 | try:
37 | g.db_conn = db_connect()
38 | g.db_conn.autocommit = True
39 | db_conn = g.db_conn
40 | except psycopg2.Error as e:
41 | app.logger.critical('Unable to connect to the database: {}'.format(e))
42 | sys.exit(1)
43 | return db_conn
44 |
45 | def db_connect(database=None, logger=app.logger):
46 | try:
47 | db_conn = psycopg2.connect(
48 | host=app.config['DB_HOST'],
49 | user=app.config['DB_USER'],
50 | password=app.config['DB_PASSWORD'],
51 | database=app.config['DB_NAME'] if database is None else database,
52 | port=app.config['DB_PORT'],
53 | cursor_factory=psycopg2.extras.RealDictCursor)
54 | except psycopg2.Error as e:
55 | logger.critical('Unable to connect to the database: {}'.format(e))
56 | sys.exit(1)
57 | return db_conn
58 |
59 | @app.teardown_appcontext
60 | def db_disconnect(exception=None, logger=app.logger):
61 | """Disconnect from the database."""
62 |
63 | try:
64 | db_conn = getattr(g, 'db_conn', None)
65 | if db_conn is not None:
66 | db_conn.close()
67 | except Exception as e:
68 | logger.critical('Unable to close the database connection: {}'.format(e))
69 | sys.exit(1)
70 |
71 | def query_handler(query, data):
72 | """Handle UPDATE and INSERT queries in the admin panel."""
73 |
74 | try:
75 | db_conn = get_db_connection()
76 | with db_conn.cursor() as cur:
77 | cur.execute(query, data)
78 | flash('Operation successfully completed', 'success')
79 | except psycopg2.Error as e:
80 | db_conn.rollback()
81 | flash('Error: {}'.format(e), 'error')
82 |
--------------------------------------------------------------------------------
/ctforge/db/procedures.sql:
--------------------------------------------------------------------------------
1 |
2 | -- CTForge: Forge your own CTF.
3 |
4 | -- Copyright (C) 2016-2019 Marco Squarcina
5 | -- Copyright (C) 2016-2019 Mauro Tempesta
6 | -- Copyright (C) 2016-2019 Lorenzo Veronese
7 |
8 | -- This program is free software: you can redistribute it and/or modify
9 | -- it under the terms of the GNU Affero General Public License as published
10 | -- by the Free Software Foundation, either version 3 of the License, or
11 | -- (at your option) any later version.
12 |
13 | -- This program is distributed in the hope that it will be useful,
14 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | -- GNU Affero General Public License for more details.
17 |
18 | -- You should have received a copy of the GNU Affero General Public License
19 | -- along with this program. If not, see .
20 |
21 | /* Get the ID of the current round. */
22 | CREATE OR REPLACE FUNCTION get_current_round() RETURNS INT AS $$
23 | DECLARE
24 | current_round INT;
25 | BEGIN
26 | SELECT MAX(id) INTO current_round FROM rounds;
27 | RETURN current_round;
28 | END;
29 | $$ LANGUAGE plpgsql;
30 |
31 | /* The trigger creates an empty score row upon team insertion. */
32 | CREATE OR REPLACE FUNCTION add_score_entry() RETURNS TRIGGER AS $$
33 | DECLARE
34 | current_round INT;
35 | BEGIN
36 | /* Pick the current round from the rounds table: if the table is empty
37 | * (this happens only when the first team is added to the DB), add a
38 | * row with round 0. */
39 | SELECT get_current_round() INTO current_round;
40 | IF current_round IS NULL THEN
41 | current_round := 0;
42 | INSERT INTO rounds (id) VALUES (current_round);
43 | END IF;
44 | /* Use the function GREATEST to avoid inserting scores with round -1 when
45 | * the CTF is not started yet. */
46 | INSERT INTO scores
47 | SELECT GREATEST(current_round - 1, 0), NEW.id, id, 0, 0, 0
48 |
49 | FROM services;
50 |
51 | RETURN NEW;
52 | END;
53 | $$ LANGUAGE plpgsql;
54 |
55 | DROP TRIGGER IF EXISTS fill_scores_table ON teams;
56 | CREATE TRIGGER fill_scores_table
57 | AFTER INSERT ON teams FOR EACH ROW
58 | EXECUTE PROCEDURE add_score_entry();
59 |
--------------------------------------------------------------------------------
/ctforge/exceptions.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 |
4 | # CTForge: Forge your own CTF.
5 |
6 | # Copyright (C) 2016-2019 Marco Squarcina
7 | # Copyright (C) 2016-2019 Mauro Tempesta
8 | # Copyright (C) 2016-2019 Lorenzo Veronese
9 |
10 | # This program is free software: you can redistribute it and/or modify
11 | # it under the terms of the GNU Affero General Public License as published
12 | # by the Free Software Foundation, either version 3 of the License, or
13 | # (at your option) any later version.
14 |
15 | # This program is distributed in the hope that it will be useful,
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | # GNU Affero General Public License for more details.
19 |
20 | # You should have received a copy of the GNU Affero General Public License
21 | # along with this program. If not, see .
22 |
23 |
24 | class InvalidToken(Exception):
25 | pass
26 |
27 | class InvalidFlag(Exception):
28 | pass
29 |
30 | class OwnFlag(Exception):
31 | pass
32 |
33 | class ExpiredFlag(Exception):
34 | pass
35 |
36 | class ServiceCorrupted(Exception):
37 | pass
38 |
--------------------------------------------------------------------------------
/ctforge/scripts/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/scripts/__init__.py
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/css/ctforge.css:
--------------------------------------------------------------------------------
1 |
2 | /* CTForge: Forge your own CTF.
3 |
4 |
5 | Copyright (C) 2016-2019 Marco Squarcina
6 | Copyright (C) 2016-2019 Mauro Tempesta
7 | Copyright (C) 2016-2019 Lorenzo Veronese
8 |
9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Affero General Public License as published
11 | by the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Affero General Public License for more details.
18 |
19 | You should have received a copy of the GNU Affero General Public License
20 | along with this program. If not, see . */
21 | body {
22 | min-height: 500px;
23 | padding-top: 70px;
24 | }
25 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/css/custom.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/css/custom.css
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/css/dctf-admin.css:
--------------------------------------------------------------------------------
1 |
2 | /* CTForge: Forge your own CTF.
3 |
4 |
5 | Copyright (C) 2016-2019 Marco Squarcina
6 | Copyright (C) 2016-2019 Mauro Tempesta
7 | Copyright (C) 2016-2019 Lorenzo Veronese
8 |
9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Affero General Public License as published
11 | by the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Affero General Public License for more details.
18 |
19 | You should have received a copy of the GNU Affero General Public License
20 | along with this program. If not, see . */
21 | textarea.form-control {
22 | width: 100%;
23 | min-height: 500px;
24 | overflow-x: hidden;
25 | overflow-y: auto;
26 | font-family: monospace;
27 | white-space: pre-wrap;
28 | word-wrap: break-word;
29 | }
30 |
31 | textarea.form-control:disabled {
32 | overflow-x: scroll;
33 | overflow-y: auto;
34 | word-wrap: normal;
35 | white-space: pre;
36 | }
37 |
38 | .modal {
39 | overflow-y: auto;
40 | }
41 | #flash-messages .modal-content {
42 | opacity: 0.9;
43 | background: none;
44 | color: inherit;
45 | box-shadow: none;
46 | border: 0;
47 | margin: 0;
48 | }
49 |
50 | .modal .modal-dialog {
51 | margin: 50px auto;
52 | }
53 |
54 | /* Footable fix */
55 | .footable-filtering-search .input-group-btn {
56 | display: none;
57 | }
58 | .input-group .form-control {
59 | border-top-right-radius: 0.25rem !important;
60 | border-bottom-right-radius: 0.25rem !important;
61 | }
62 |
63 | thead, tr {
64 | background-color: #32383e;
65 | background-clip: border-box;
66 | }
67 |
68 | table {
69 | background-color: #32383e;
70 | background-clip: border-box;
71 | border: 1px solid rgba(0, 0, 0, 0.6);
72 | border-radius: 0.25rem;
73 | }
74 | .table>thead>tr>.active, .table>tbody>tr>.active, .table>tfoot>tr>.active,
75 | .table>thead>.active>td, .table>tbody>.active>td, .table>tfoot>.active>td,
76 | .table>thead>.active>th, .table>tbody>.active>th, .table>tfoot>.active>th {
77 | background-color: #404448;
78 | background-clip: border-box;
79 | }
80 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/fonts/9IGqbwlMn4Zg3as8alsdNA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/fonts/9IGqbwlMn4Zg3as8alsdNA.woff2
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/fonts/CfvjE7QXPaQqLo02SkpIgA.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/fonts/CfvjE7QXPaQqLo02SkpIgA.ttf
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/fonts/RQxK-3RA0Lnf3gnnnNrAsYW_AySPyikQrZReizgrnuw.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/fonts/RQxK-3RA0Lnf3gnnnNrAsYW_AySPyikQrZReizgrnuw.ttf
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/fonts/t3vZkumW9T_w4ukdwBVHtA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/fonts/t3vZkumW9T_w4ukdwBVHtA.woff2
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/10Sec.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/10Sec.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/404.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/ai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/ai.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/bg.jpg
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/bug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/bug.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/c00kies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/c00kies.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/cog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/cog.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/coin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/coin.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/ctforge_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/ctforge_logo.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/cyberchallenge_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/cyberchallenge_logo.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/cyberchallenge_logo_front.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/cyberchallenge_logo_front.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/cyberchallenge_logo_front_ad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/cyberchallenge_logo_front_ad.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/favicon.ico
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/flag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/flag.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/galactic_empire_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/galactic_empire_logo.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/head.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/head.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/integeruser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/integeruser.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/lavish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/lavish.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/mrstorm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/mrstorm.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/netowrk-map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/netowrk-map.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/palma.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/palma.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/r1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/r1x.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/spam.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/spam.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/unive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/unive.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/img/xire.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/ctforge/static/img/xire.png
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/js/ad_charts.js:
--------------------------------------------------------------------------------
1 |
2 | /* CTForge: Forge your own CTF.
3 |
4 | *
5 | * Copyright (C) 2016-2019 Marco Squarcina
6 | * Copyright (C) 2016-2019 Mauro Tempesta
7 | * Copyright (C) 2016-2019 Lorenzo Veronese
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with this program. If not, see . */
21 | var defaultGraphSettings = {
22 | "lineThickness": 3,
23 | "type": "line"
24 | };
25 |
26 | var defaultChartSettings = {
27 | "categoryAxis": {
28 | "minPeriod": "ss",
29 | "parseDates": false,
30 | "title": "Round"
31 | },
32 | "categoryField": "round",
33 | "chartCursor": {
34 | "categoryBalloonText": "[[category]]",
35 | "enabled": true
36 | },
37 | "chartScrollbar": {
38 | "dragIcon": "dragIconRectSmall",
39 | "enabled": true,
40 | "scrollbarHeight": 10,
41 | "dragIconHeight": 22,
42 | "dragIconWidth": 22
43 | },
44 | "fontFamily": "Monda",
45 | "fontSize": 14,
46 | "legend": {
47 | "color": "#D4D4D4",
48 | "enabled": true,
49 | "useGraphSettings": true
50 | },
51 | "theme": "dark",
52 | "titles": [{
53 | "size": 15,
54 | "text": "Global Score"
55 | }],
56 | "type": "serial",
57 | "valueAxes": [{
58 | "title": "Points"
59 | }],
60 | "numberFormatter": {
61 | "precision": 2,
62 | "decimalSeparator": ".",
63 | "thousandsSeparator": ""
64 | }
65 | };
66 |
67 | var adChart = null;
68 |
69 | function makeChart(divId, data, populate) {
70 | if (adChart) adChart.clear();
71 | adChart = $.extend(true, {}, defaultChartSettings);
72 | populate(adChart, data);
73 | AmCharts.makeChart(divId, adChart);
74 | }
75 |
76 | function compareByDate(o1, o2) {
77 | return o1.date - o2.date;
78 | }
79 |
80 | function scoresChart(chart, scores) {
81 | chart.graphs = [];
82 | chart.dataProvider = [];
83 |
84 | for (var team in scores) {
85 | var g = $.extend(true, {}, defaultGraphSettings);
86 | g.balloonText = "[[title]]\n[[value]]pts";
87 | g.title = g.valueField = team;
88 | chart.graphs.push(g);
89 | for (round in scores[team]) {
90 | var s = { round: round | 0 };
91 | s[g.valueField] = scores[team][round];
92 | chart.dataProvider.push(s);
93 | }
94 | chart.dataProvider.sort(function (a,b) { return a.round - b.round; });
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/js/chart_dark.js:
--------------------------------------------------------------------------------
1 | AmCharts.themes.dark={themeName:"dark",AmChart:{color:"#e7e7e7",backgroundColor:"#282828"},AmCoordinateChart:{colors:["#ae85c9","#aab9f7","#b6d2ff","#c9e6f2","#c9f0e1","#e8d685","#e0ad63","#d48652","#d27362","#495fba","#7a629b","#8881cc"]},AmStockChart:{colors:["#639dbd","#e8d685","#ae85c9","#c9f0e1","#d48652","#629b6d","#719dc3","#719dc3"]},AmSlicedChart:{outlineAlpha:1,outlineThickness:2,labelTickColor:"#FFFFFF",labelTickAlpha:0.3,colors:["#495fba","#e8d685","#ae85c9","#c9f0e1","#d48652","#629b6d","#719dc3","#719dc3"]},AmRectangularChart:{zoomOutButtonColor:'#FFFFFF',zoomOutButtonRollOverAlpha:0.15,zoomOutButtonImage:"lensWhite"},AxisBase:{axisColor:"#FFFFFF",axisAlpha:0.3,gridAlpha:0.1,gridColor:"#FFFFFF",dashLength:3},ChartScrollbar:{backgroundColor:"#000000",backgroundAlpha:0.2,graphFillAlpha:0.2,graphLineAlpha:0,graphFillColor:"#FFFFFF",selectedGraphFillColor:"#FFFFFF",selectedGraphFillAlpha:0.4,selectedGraphLineColor:"#FFFFFF",selectedBackgroundColor:"#FFFFFF",selectedBackgroundAlpha:0.09,gridAlpha:0.15},ChartCursor:{cursorColor:"#FFFFFF",color:"#000000",cursorAlpha:0.5},AmLegend:{color:"#e7e7e7"},AmGraph:{lineAlpha:0.9},GaugeArrow:{color:"#FFFFFF",alpha:0.8,nailAlpha:0,innerRadius:"40%",nailRadius:15,startWidth:15,borderAlpha:0.8,nailBorderAlpha:0},GaugeAxis:{tickColor:"#FFFFFF",tickAlpha:1,tickLength:15,minorTickLength:8,axisThickness:3,axisColor:'#FFFFFF',axisAlpha:1,bandAlpha:0.8},TrendLine:{lineColor:"#c03246",lineAlpha:0.8},AreasSettings:{alpha:0.8,color:"#FFFFFF",colorSolid:"#000000",unlistedAreasAlpha:0.4,unlistedAreasColor:"#FFFFFF",outlineColor:"#000000",outlineAlpha:0.5,outlineThickness:0.5,rollOverColor:"#3c5bdc",rollOverOutlineColor:"#000000",selectedOutlineColor:"#000000",selectedColor:"#f15135",unlistedAreasOutlineColor:"#000000",unlistedAreasOutlineAlpha:0.5},LinesSettings:{color:"#FFFFFF",alpha:0.8},ImagesSettings:{alpha:0.8,labelColor:"#FFFFFF",color:"#FFFFFF",labelRollOverColor:"#3c5bdc"},ZoomControl:{buttonFillAlpha:0.7,buttonIconColor:"#494949"},SmallMap:{mapColor:"#FFFFFF",rectangleColor:"#FFFFFF",backgroundColor:"#000000",backgroundAlpha:0.7,borderThickness:1,borderAlpha:0.8},PeriodSelector:{color:"#e7e7e7"},PeriodButton:{color:"#e7e7e7",background:"transparent",opacity:0.7,border:"1px solid rgba(255, 255, 255, .15)",MozBorderRadius:"5px",borderRadius:"5px",margin:"1px",outline:"none",boxSizing:"border-box"},PeriodButtonSelected:{color:"#e7e7e7",backgroundColor:"rgba(255, 255, 255, 0.1)",border:"1px solid rgba(255, 255, 255, .3)",MozBorderRadius:"5px",borderRadius:"5px",margin:"1px",outline:"none",opacity:1,boxSizing:"border-box"},PeriodInputField:{color:"#e7e7e7",background:"transparent",border:"1px solid rgba(255, 255, 255, .15)",outline:"none"},DataSetSelector:{color:"#e7e7e7",selectedBackgroundColor:"rgba(255, 255, 255, .25)",rollOverBackgroundColor:"rgba(255, 255, 255, .15)"},DataSetCompareList:{color:"#e7e7e7",lineHeight:"100%",boxSizing:"initial",webkitBoxSizing:"initial",border:"1px solid rgba(255, 255, 255, .15)"},DataSetSelect:{border:"1px solid rgba(255, 255, 255, .15)",outline:"none"}};
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/js/dctf.js:
--------------------------------------------------------------------------------
1 |
2 | /* CTForge: Forge your own CTF.
3 |
4 | *
5 | * Copyright (C) 2016-2019 Marco Squarcina
6 | * Copyright (C) 2016-2019 Mauro Tempesta
7 | * Copyright (C) 2016-2019 Lorenzo Veronese
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with this program. If not, see . */
21 | $(document).ready(function() {
22 | $('.sortable').footable();
23 | });
24 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/js/images/dragIconRectSmall.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/js/images/lensWhite.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/static/js/npm.js:
--------------------------------------------------------------------------------
1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
2 | require('../../js/transition.js')
3 | require('../../js/alert.js')
4 | require('../../js/button.js')
5 | require('../../js/carousel.js')
6 | require('../../js/collapse.js')
7 | require('../../js/dropdown.js')
8 | require('../../js/modal.js')
9 | require('../../js/tooltip.js')
10 | require('../../js/popover.js')
11 | require('../../js/scrollspy.js')
12 | require('../../js/tab.js')
13 | require('../../js/affix.js')
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/403.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Forbidden{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 |
Forbidden
27 |
The requested page cannot be accessed, try to login
28 | {% endblock %}
29 | {% block footer %}{% endblock %}
30 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/404.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Not Found{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
28 | {% endblock %}
29 | {% block footer %}{% endblock %}
30 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/500.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Not Found{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 |
Server Error
27 |
Something is wrong, please report this issue.
28 | {% endblock %}
29 | {% block footer %}{% endblock %}
30 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/_macros.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 |
22 | {% macro render_pretty_bools(data) %}
23 | {% if data is none %}
24 | none
25 | {% elif data is sameas true %}
26 | yes
27 | {% elif data is sameas false %}
28 | no
29 | {% else %}
30 | {{ data }}
31 | {% endif %}
32 | {% endmacro %}
33 |
34 | {% macro tabify(data, keys, target, id, class='') %}
35 |
102 | {% endif %}
103 | {% endfor %}
104 | {% endmacro %}
105 |
106 | {% macro get_status_badge(status) %}
107 | {% if status == 1 %}
108 | UP
109 | {% elif status == 0 %}
110 | CORRUPTED
111 | {% elif status == 2 %}
112 | NO FLAG
113 | {% else %}
114 | NOT CHECKED
115 | {% endif %}
116 | {% endmacro %}
117 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/admin/data.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 | {% from "_macros.html" import render_inline_fields %}
27 |
28 |
29 |
54 |
55 | {% endblock %}
56 | {% block footer %}{% endblock %}
57 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/challenge.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}{{ challenge.name }}{% endblock %}
23 | {% block content %}
24 |
25 |
103 | {% endif %}
104 |
105 | {% endblock %}
106 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/challenges.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Challenges{% endblock %}
23 | {% block content %}
24 |
25 |
Challenges
26 |
27 | {% if config.JEOPARDY_BONUS %}
28 |
Bonus points: +3, +2, +1 to the first, second, third solver of each challenge
29 | {% endif %}
30 |
31 |
32 | {% if settings['ctf_running'] %}
33 | {% if settings['time_enabled'] %}
34 |
35 |
36 |
37 |
38 | 00:00:00
39 |
40 |
41 |
61 | {% endif %}
62 | {% else %}
63 |
64 | {% if settings['time_enabled'] %}
65 | {% if settings['ctf_ended'] %}
66 | The CTF is over!
67 | You can still submit flags, however you won't be awarded any points.
68 | {% else %}
69 | The CTF starts at {{ settings['start_time'] }}
70 | {% endif %}
71 | {% else %}
72 | The CTF is coming soon!
73 | {% endif %}
74 |
75 | {% endif %}
76 |
77 |
78 |
79 |
80 | {% if settings['ctf_running'] or settings['ctf_ended'] %}
81 | {% if challenges %}
82 | {% for chal in challenges %}
83 |
103 |
104 | {% endblock %}
105 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/credits.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Credits{% endblock %}
23 | {% block content %}
24 |
25 |
Credits
26 |
27 |
28 |
29 |
The following persons contributed to the development of the CTF infrastructure
30 |
31 |
Francesco Palmarini (erpalma), Ca' Foscari Venezia
64 |
65 | This website is proudly powered by CTForge
66 |
67 |
68 |
69 |
70 |
71 | {% endblock %}
72 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/hints.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Hints{% endblock %}
23 | {% block content %}
24 |
25 |
Hints
26 |
27 | {% if settings['ctf_running'] or settings['ctf_ended'] %}
28 |
29 | {% if current_poll != None and not settings['ctf_ended'] %}
30 |
31 |
32 |
33 | Next Hint
34 | Poll
35 |
36 |
37 |
51 |
52 |
79 |
80 | {% endif %}
81 |
82 |
Released Hints
83 |
84 | {% if not released_hints %}
85 |
86 |
87 | No Hints.
88 |
89 |
90 |
91 | {% else %}
92 | {% for hint in released_hints %}
93 |
118 | {% if settings['time_enabled'] %}
119 | The CTF starts at {{ settings['start_time'] }}
120 | {% else %}
121 | The CTF is coming soon!
122 | {% endif %}
123 |
124 |
125 | {% endif %}
126 |
127 | {% endblock %}
128 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Home{% endblock %}
23 | {% block content %}
24 |
25 |
40 | A Capture the Flag (CTF) is a computer security competition. CTF contests are usually designed to serve as an educational exercise to give participants experience in securing a machine, as well as conducting and reacting to the sort of attacks found in the real world. There are two main styles of capture the flag competitions: jeopardy and attack/defense.
41 |
42 |
43 | In an attack/defense style competition, each team is given a machine (or a small network) to defend on an isolated network. Teams are scored on both their success in defending their assigned machine and on their success in attacking the other team's machines. Depending on the nature of the particular CTF game, teams may either be attempting to take an opponent's flag from their machine or teams may be attempting to plant their own flag on their opponent's machine.
44 |
45 |
46 |
47 |
48 |
49 | {% endblock %}
50 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/login.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Login{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 |
27 |
28 |
37 |
38 |
39 |
40 | {% endblock %}
41 | {% block footer %}{% endblock %}
42 |
43 |
44 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/service.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}{{ service.name }}{% endblock %}
23 | {% block content %}
24 |
25 |
{{ service.name }}
26 |
27 | {% if not service.active %}
28 |
Service deactivated
29 | {% endif %}
30 |
31 |
32 |
33 | {{ service.description|safe }}
34 |
35 |
36 |
37 |
38 | {% endblock %}
39 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/submit.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Flag Submission Service{% endblock %}
23 | {% block content %}
24 |
25 |
26 |
27 |
28 |
38 |
39 |
40 |
41 |
42 | {% endblock %}
43 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/team.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Home{% endblock %}
23 | {% block content %}
24 |
25 |
79 |
80 | {% endblock %}
81 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/teams.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Teams{% endblock %}
23 | {% block content %}
24 |
25 |
Teams
26 |
27 |
28 | {% for team in teams %}
29 |
30 |
{{ team.name }} (team{{ team.id }})
31 |
32 |
33 | {% if config.SHOW_NAMES %}
34 |
Name
Surname
35 | {% endif %}
36 |
Nickname
37 |
38 | {% for user in users %}
39 | {% if team.id == user.team_id %}
40 |
41 | {% if config.SHOW_NAMES %}
42 |
{{ user.name }}
{{ user.surname }}
43 | {% endif %}
44 |
{{ user.nickname }}
45 | {% endif %}
46 | {% endfor %}
47 |
48 |
49 |
50 | {% endfor %}
51 |
52 |
53 | {% endblock %}
54 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/user.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}User Profile{% endblock %}
23 | {% block content %}
24 |
25 |
75 | {% endif %}
76 |
77 | {% endblock %}
78 |
--------------------------------------------------------------------------------
/ctforge/themes/ctforge/templates/writeup.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Writeup{% endblock %}
23 | {% block content %}
24 |
25 |
53 |
54 | {% endblock %}
55 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/css/ctforge.css:
--------------------------------------------------------------------------------
1 |
2 | /* CTForge: Forge your own CTF.
3 |
4 |
5 | Copyright (C) 2016-2019 Marco Squarcina
6 | Copyright (C) 2016-2019 Mauro Tempesta
7 | Copyright (C) 2016-2019 Lorenzo Veronese
8 |
9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Affero General Public License as published
11 | by the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Affero General Public License for more details.
18 |
19 | You should have received a copy of the GNU Affero General Public License
20 | along with this program. If not, see . */
21 | body {
22 | min-height: 500px;
23 | padding-top: 70px;
24 | }
25 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/css/custom.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/css/custom.css
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/css/dctf-admin.css:
--------------------------------------------------------------------------------
1 |
2 | /* CTForge: Forge your own CTF.
3 |
4 |
5 | Copyright (C) 2016-2019 Marco Squarcina
6 | Copyright (C) 2016-2019 Mauro Tempesta
7 | Copyright (C) 2016-2019 Lorenzo Veronese
8 |
9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Affero General Public License as published
11 | by the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Affero General Public License for more details.
18 |
19 | You should have received a copy of the GNU Affero General Public License
20 | along with this program. If not, see . */
21 | textarea.form-control {
22 | width: 100%;
23 | min-height: 500px;
24 | overflow-x: hidden;
25 | overflow-y: auto;
26 | font-family: monospace;
27 | white-space: pre-wrap;
28 | word-wrap: break-word;
29 | }
30 |
31 | textarea.form-control:disabled {
32 | overflow-x: scroll;
33 | overflow-y: auto;
34 | word-wrap: normal;
35 | white-space: pre;
36 | }
37 |
38 | .modal {
39 | overflow-y: auto;
40 | }
41 | #flash-messages .modal-content {
42 | opacity: 0.9;
43 | background: none;
44 | color: inherit;
45 | box-shadow: none;
46 | border: 0;
47 | margin: 0;
48 | }
49 |
50 | .modal .modal-dialog {
51 | margin: 50px auto;
52 | }
53 |
54 | /* Footable fix */
55 | .footable-filtering-search .input-group-btn {
56 | display: none;
57 | }
58 | .input-group .form-control {
59 | border-top-right-radius: 0.25rem !important;
60 | border-bottom-right-radius: 0.25rem !important;
61 | }
62 |
63 | thead, tr {
64 | background-color: #32383e;
65 | background-clip: border-box;
66 | }
67 |
68 | table {
69 | background-color: #32383e;
70 | background-clip: border-box;
71 | border: 1px solid rgba(0, 0, 0, 0.6);
72 | border-radius: 0.25rem;
73 | }
74 | .table>thead>tr>.active, .table>tbody>tr>.active, .table>tfoot>tr>.active,
75 | .table>thead>.active>td, .table>tbody>.active>td, .table>tfoot>.active>td,
76 | .table>thead>.active>th, .table>tbody>.active>th, .table>tfoot>.active>th {
77 | background-color: #404448;
78 | background-clip: border-box;
79 | }
80 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/fonts/9IGqbwlMn4Zg3as8alsdNA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/fonts/9IGqbwlMn4Zg3as8alsdNA.woff2
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/fonts/CfvjE7QXPaQqLo02SkpIgA.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/fonts/CfvjE7QXPaQqLo02SkpIgA.ttf
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/fonts/RQxK-3RA0Lnf3gnnnNrAsYW_AySPyikQrZReizgrnuw.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/fonts/RQxK-3RA0Lnf3gnnnNrAsYW_AySPyikQrZReizgrnuw.ttf
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/fonts/t3vZkumW9T_w4ukdwBVHtA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/fonts/t3vZkumW9T_w4ukdwBVHtA.woff2
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/10Sec.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/10Sec.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/404.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/ai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/ai.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/bg.jpg
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/bug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/bug.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/c00kies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/c00kies.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/cog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/cog.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/coin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/coin.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/ctforge_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/ctforge_logo.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/cyberchallenge_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/cyberchallenge_logo.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/cyberchallenge_logo_front.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/cyberchallenge_logo_front.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/cyberchallenge_logo_front_ad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/cyberchallenge_logo_front_ad.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/favicon.ico
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/flag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/flag.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/galactic_empire_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/galactic_empire_logo.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/head.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/head.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/integeruser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/integeruser.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/lavish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/lavish.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/mrstorm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/mrstorm.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/netowrk-map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/netowrk-map.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/palma.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/palma.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/r1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/r1x.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/spam.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/spam.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/unive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/unive.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/img/xire.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/cyberchallenge/static/img/xire.png
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/js/ad_charts.js:
--------------------------------------------------------------------------------
1 |
2 | /* CTForge: Forge your own CTF.
3 |
4 | *
5 | * Copyright (C) 2016-2019 Marco Squarcina
6 | * Copyright (C) 2016-2019 Mauro Tempesta
7 | * Copyright (C) 2016-2019 Lorenzo Veronese
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with this program. If not, see . */
21 | var defaultGraphSettings = {
22 | "lineThickness": 3,
23 | "type": "line"
24 | };
25 |
26 | var defaultChartSettings = {
27 | "categoryAxis": {
28 | "minPeriod": "ss",
29 | "parseDates": false,
30 | "title": "Round"
31 | },
32 | "categoryField": "round",
33 | "chartCursor": {
34 | "categoryBalloonText": "[[category]]",
35 | "enabled": true
36 | },
37 | "chartScrollbar": {
38 | "dragIcon": "dragIconRectSmall",
39 | "enabled": true,
40 | "scrollbarHeight": 10,
41 | "dragIconHeight": 22,
42 | "dragIconWidth": 22
43 | },
44 | "fontFamily": "Monda",
45 | "fontSize": 14,
46 | "legend": {
47 | "color": "#D4D4D4",
48 | "enabled": true,
49 | "useGraphSettings": true
50 | },
51 | "theme": "dark",
52 | "titles": [{
53 | "size": 15,
54 | "text": "Global Score"
55 | }],
56 | "type": "serial",
57 | "valueAxes": [{
58 | "title": "Points"
59 | }],
60 | "numberFormatter": {
61 | "precision": 2,
62 | "decimalSeparator": ".",
63 | "thousandsSeparator": ""
64 | }
65 | };
66 |
67 | var adChart = null;
68 |
69 | function makeChart(divId, data, populate) {
70 | if (adChart) adChart.clear();
71 | adChart = $.extend(true, {}, defaultChartSettings);
72 | populate(adChart, data);
73 | AmCharts.makeChart(divId, adChart);
74 | }
75 |
76 | function compareByDate(o1, o2) {
77 | return o1.date - o2.date;
78 | }
79 |
80 | function scoresChart(chart, scores) {
81 | chart.graphs = [];
82 | chart.dataProvider = [];
83 |
84 | for (var team in scores) {
85 | var g = $.extend(true, {}, defaultGraphSettings);
86 | g.balloonText = "[[title]]\n[[value]]pts";
87 | g.title = g.valueField = team;
88 | chart.graphs.push(g);
89 | for (round in scores[team]) {
90 | var s = { round: round | 0 };
91 | s[g.valueField] = scores[team][round];
92 | chart.dataProvider.push(s);
93 | }
94 | chart.dataProvider.sort(function (a,b) { return a.round - b.round; });
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/js/chart_dark.js:
--------------------------------------------------------------------------------
1 | AmCharts.themes.dark={themeName:"dark",AmChart:{color:"#e7e7e7",backgroundColor:"#282828"},AmCoordinateChart:{colors:["#ae85c9","#aab9f7","#b6d2ff","#c9e6f2","#c9f0e1","#e8d685","#e0ad63","#d48652","#d27362","#495fba","#7a629b","#8881cc"]},AmStockChart:{colors:["#639dbd","#e8d685","#ae85c9","#c9f0e1","#d48652","#629b6d","#719dc3","#719dc3"]},AmSlicedChart:{outlineAlpha:1,outlineThickness:2,labelTickColor:"#FFFFFF",labelTickAlpha:0.3,colors:["#495fba","#e8d685","#ae85c9","#c9f0e1","#d48652","#629b6d","#719dc3","#719dc3"]},AmRectangularChart:{zoomOutButtonColor:'#FFFFFF',zoomOutButtonRollOverAlpha:0.15,zoomOutButtonImage:"lensWhite"},AxisBase:{axisColor:"#FFFFFF",axisAlpha:0.3,gridAlpha:0.1,gridColor:"#FFFFFF",dashLength:3},ChartScrollbar:{backgroundColor:"#000000",backgroundAlpha:0.2,graphFillAlpha:0.2,graphLineAlpha:0,graphFillColor:"#FFFFFF",selectedGraphFillColor:"#FFFFFF",selectedGraphFillAlpha:0.4,selectedGraphLineColor:"#FFFFFF",selectedBackgroundColor:"#FFFFFF",selectedBackgroundAlpha:0.09,gridAlpha:0.15},ChartCursor:{cursorColor:"#FFFFFF",color:"#000000",cursorAlpha:0.5},AmLegend:{color:"#e7e7e7"},AmGraph:{lineAlpha:0.9},GaugeArrow:{color:"#FFFFFF",alpha:0.8,nailAlpha:0,innerRadius:"40%",nailRadius:15,startWidth:15,borderAlpha:0.8,nailBorderAlpha:0},GaugeAxis:{tickColor:"#FFFFFF",tickAlpha:1,tickLength:15,minorTickLength:8,axisThickness:3,axisColor:'#FFFFFF',axisAlpha:1,bandAlpha:0.8},TrendLine:{lineColor:"#c03246",lineAlpha:0.8},AreasSettings:{alpha:0.8,color:"#FFFFFF",colorSolid:"#000000",unlistedAreasAlpha:0.4,unlistedAreasColor:"#FFFFFF",outlineColor:"#000000",outlineAlpha:0.5,outlineThickness:0.5,rollOverColor:"#3c5bdc",rollOverOutlineColor:"#000000",selectedOutlineColor:"#000000",selectedColor:"#f15135",unlistedAreasOutlineColor:"#000000",unlistedAreasOutlineAlpha:0.5},LinesSettings:{color:"#FFFFFF",alpha:0.8},ImagesSettings:{alpha:0.8,labelColor:"#FFFFFF",color:"#FFFFFF",labelRollOverColor:"#3c5bdc"},ZoomControl:{buttonFillAlpha:0.7,buttonIconColor:"#494949"},SmallMap:{mapColor:"#FFFFFF",rectangleColor:"#FFFFFF",backgroundColor:"#000000",backgroundAlpha:0.7,borderThickness:1,borderAlpha:0.8},PeriodSelector:{color:"#e7e7e7"},PeriodButton:{color:"#e7e7e7",background:"transparent",opacity:0.7,border:"1px solid rgba(255, 255, 255, .15)",MozBorderRadius:"5px",borderRadius:"5px",margin:"1px",outline:"none",boxSizing:"border-box"},PeriodButtonSelected:{color:"#e7e7e7",backgroundColor:"rgba(255, 255, 255, 0.1)",border:"1px solid rgba(255, 255, 255, .3)",MozBorderRadius:"5px",borderRadius:"5px",margin:"1px",outline:"none",opacity:1,boxSizing:"border-box"},PeriodInputField:{color:"#e7e7e7",background:"transparent",border:"1px solid rgba(255, 255, 255, .15)",outline:"none"},DataSetSelector:{color:"#e7e7e7",selectedBackgroundColor:"rgba(255, 255, 255, .25)",rollOverBackgroundColor:"rgba(255, 255, 255, .15)"},DataSetCompareList:{color:"#e7e7e7",lineHeight:"100%",boxSizing:"initial",webkitBoxSizing:"initial",border:"1px solid rgba(255, 255, 255, .15)"},DataSetSelect:{border:"1px solid rgba(255, 255, 255, .15)",outline:"none"}};
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/js/dctf.js:
--------------------------------------------------------------------------------
1 |
2 | /* CTForge: Forge your own CTF.
3 |
4 | *
5 | * Copyright (C) 2016-2019 Marco Squarcina
6 | * Copyright (C) 2016-2019 Mauro Tempesta
7 | * Copyright (C) 2016-2019 Lorenzo Veronese
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with this program. If not, see . */
21 | $(document).ready(function() {
22 | $('.sortable').footable();
23 | });
24 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/js/images/dragIconRectSmall.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/js/images/lensWhite.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/static/js/npm.js:
--------------------------------------------------------------------------------
1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
2 | require('../../js/transition.js')
3 | require('../../js/alert.js')
4 | require('../../js/button.js')
5 | require('../../js/carousel.js')
6 | require('../../js/collapse.js')
7 | require('../../js/dropdown.js')
8 | require('../../js/modal.js')
9 | require('../../js/tooltip.js')
10 | require('../../js/popover.js')
11 | require('../../js/scrollspy.js')
12 | require('../../js/tab.js')
13 | require('../../js/affix.js')
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/403.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Forbidden{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 |
Forbidden
27 |
The requested page cannot be accessed, try to login
28 | {% endblock %}
29 | {% block footer %}{% endblock %}
30 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/404.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Not Found{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
28 | {% endblock %}
29 | {% block footer %}{% endblock %}
30 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/500.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Not Found{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 |
Server Error
27 |
Something is wrong, please report this issue.
28 | {% endblock %}
29 | {% block footer %}{% endblock %}
30 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/_macros.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 |
22 | {% macro render_pretty_bools(data) %}
23 | {% if data is none %}
24 | none
25 | {% elif data is sameas true %}
26 | yes
27 | {% elif data is sameas false %}
28 | no
29 | {% else %}
30 | {{ data }}
31 | {% endif %}
32 | {% endmacro %}
33 |
34 | {% macro tabify(data, keys, target, id, class='') %}
35 |
102 | {% endif %}
103 | {% endfor %}
104 | {% endmacro %}
105 |
106 | {% macro get_status_badge(status) %}
107 | {% if status == 1 %}
108 | UP
109 | {% elif status == 0 %}
110 | CORRUPTED
111 | {% elif status == 2 %}
112 | NO FLAG
113 | {% else %}
114 | NOT CHECKED
115 | {% endif %}
116 | {% endmacro %}
117 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/admin/data.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 | {% from "_macros.html" import render_inline_fields %}
27 |
28 |
29 |
54 |
55 | {% endblock %}
56 | {% block footer %}{% endblock %}
57 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/challenge.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}{{ challenge.name }}{% endblock %}
23 | {% block content %}
24 |
25 |
103 | {% endif %}
104 |
105 | {% endblock %}
106 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/challenges.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Challenges{% endblock %}
23 | {% block content %}
24 |
25 |
Challenges
26 |
27 | {% if config.JEOPARDY_BONUS %}
28 |
Bonus points: +3, +2, +1 to the first, second, third solver of each challenge
29 | {% endif %}
30 |
31 |
32 | {% if settings['ctf_running'] %}
33 | {% if settings['time_enabled'] %}
34 |
35 |
36 |
37 |
38 | 00:00:00
39 |
40 |
41 |
61 | {% endif %}
62 | {% else %}
63 |
64 | {% if settings['time_enabled'] %}
65 | {% if settings['ctf_ended'] %}
66 | The CTF is over!
67 | You can still submit flags, however you won't be awarded any points.
68 | {% else %}
69 | The CTF starts at {{ settings['start_time'] }}
70 | {% endif %}
71 | {% else %}
72 | The CTF is coming soon!
73 | {% endif %}
74 |
75 | {% endif %}
76 |
77 |
78 |
79 |
80 | {% if settings['ctf_running'] or settings['ctf_ended'] %}
81 | {% if challenges %}
82 | {% for chal in challenges %}
83 |
103 |
104 | {% endblock %}
105 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/credits.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Credits{% endblock %}
23 | {% block content %}
24 |
25 |
Credits
26 |
27 |
28 |
29 |
The following persons contributed to the development of the CTF infrastructure
30 |
31 |
Francesco Palmarini (erpalma), Ca' Foscari Venezia
32 |
Marco Squarcina (lavish), Ca' Foscari Venezia
33 |
Mauro Tempesta (MrStorm), Ca' Foscari Venezia
34 |
Lorenzo Veronese (wert310), Ca' Foscari Venezia
35 |
36 |
Services have been provided by Ca' Foscari. Blame these guys if you got stuck on some problems
37 |
38 |
Francesco Benvenuto (comewel), Ca' Foscari Venezia
39 |
Marco Gasparini (xire), Ca' Foscari Venezia
40 |
Francesco Palmarini (erpalma), Ca' Foscari Venezia
87 |
88 | CCIT CTF '19 is proudly powered by CTForge
89 |
90 |
91 |
92 |
93 |
94 | {% endblock %}
95 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/hints.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Hints{% endblock %}
23 | {% block content %}
24 |
25 |
Hints
26 |
27 | {% if settings['ctf_running'] or settings['ctf_ended'] %}
28 |
29 | {% if current_poll != None and not settings['ctf_ended'] %}
30 |
31 |
32 |
33 | Next Hint
34 | Poll
35 |
36 |
37 |
51 |
52 |
79 |
80 | {% endif %}
81 |
82 |
Released Hints
83 |
84 | {% if not released_hints %}
85 |
86 |
87 | No Hints.
88 |
89 |
90 |
91 | {% else %}
92 | {% for hint in released_hints %}
93 |
118 | {% if settings['time_enabled'] %}
119 | The CTF starts at {{ settings['start_time'] }}
120 | {% else %}
121 | The CTF is coming soon!
122 | {% endif %}
123 |
124 |
125 | {% endif %}
126 |
127 | {% endblock %}
128 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Home{% endblock %}
23 | {% block content %}
24 |
25 |
26 |
27 |
CCIT CTF '19 is the final Capture The Flag contest of the CyberChallenge.IT training program. It's now time to prove your skills!
28 |
29 |
30 |
CTF?
31 |
32 |
33 | A Capture the Flag (CTF) is a computer security competition. CTF contests are usually designed to serve as an educational exercise to give participants experience in securing a machine, as well as conducting and reacting to the sort of attacks found in the real world. There are two main styles of capture the flag competitions: jeopardy and attack/defense.
34 |
35 |
36 | In an attack/defense style competition, each team is given a machine (or a small network) to defend on an isolated network. Teams are scored on both their success in defending their assigned machine and on their success in attacking the other team's machines. Depending on the nature of the particular CTF game, teams may either be attempting to take an opponent's flag from their machine or teams may be attempting to plant their own flag on their opponent's machine.
37 |
38 |
39 |
40 |
41 |
42 | {% endblock %}
43 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/login.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Login{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 |
27 |
28 |
37 |
38 |
39 |
40 | {% endblock %}
41 | {% block footer %}{% endblock %}
42 |
43 |
44 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/service.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}{{ service.name }}{% endblock %}
23 | {% block content %}
24 |
25 |
{{ service.name }}
26 |
27 | {% if not service.active %}
28 |
Service deactivated
29 | {% endif %}
30 |
31 |
32 |
33 | {{ service.description|safe }}
34 |
35 |
36 |
37 |
38 | {% endblock %}
39 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/submit.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Flag Submission Service{% endblock %}
23 | {% block content %}
24 |
25 |
26 |
27 |
28 |
38 |
39 |
40 |
41 |
42 | {% endblock %}
43 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/team.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Home{% endblock %}
23 | {% block content %}
24 |
25 |
79 |
80 | {% endblock %}
81 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/teams.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Teams{% endblock %}
23 | {% block content %}
24 |
25 |
Teams
26 |
27 |
28 | {% for team in teams %}
29 |
30 |
{{ team.name }} (team{{ team.id }})
31 |
32 |
33 | {% if config.SHOW_NAMES %}
34 |
Name
Surname
35 | {% endif %}
36 |
Nickname
37 |
38 | {% for user in users %}
39 | {% if team.id == user.team_id %}
40 |
41 | {% if config.SHOW_NAMES %}
42 |
{{ user.name }}
{{ user.surname }}
43 | {% endif %}
44 |
{{ user.nickname }}
45 | {% endif %}
46 | {% endfor %}
47 |
48 |
49 |
50 | {% endfor %}
51 |
52 |
53 | {% endblock %}
54 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/user.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}User Profile{% endblock %}
23 | {% block content %}
24 |
25 |
75 | {% endif %}
76 |
77 | {% endblock %}
78 |
--------------------------------------------------------------------------------
/ctforge/themes/cyberchallenge/templates/writeup.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Writeup{% endblock %}
23 | {% block content %}
24 |
25 |
53 |
54 | {% endblock %}
55 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/css/ctforge.css:
--------------------------------------------------------------------------------
1 |
2 | /* CTForge: Forge your own CTF.
3 |
4 |
5 | Copyright (C) 2016-2019 Marco Squarcina
6 | Copyright (C) 2016-2019 Mauro Tempesta
7 | Copyright (C) 2016-2019 Lorenzo Veronese
8 |
9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Affero General Public License as published
11 | by the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Affero General Public License for more details.
18 |
19 | You should have received a copy of the GNU Affero General Public License
20 | along with this program. If not, see . */
21 | body {
22 | min-height: 500px;
23 | padding-top: 70px;
24 | }
25 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/css/custom.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/css/custom.css
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/css/dctf-admin.css:
--------------------------------------------------------------------------------
1 |
2 | /* CTForge: Forge your own CTF.
3 |
4 |
5 | Copyright (C) 2016-2019 Marco Squarcina
6 | Copyright (C) 2016-2019 Mauro Tempesta
7 | Copyright (C) 2016-2019 Lorenzo Veronese
8 |
9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Affero General Public License as published
11 | by the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Affero General Public License for more details.
18 |
19 | You should have received a copy of the GNU Affero General Public License
20 | along with this program. If not, see . */
21 | textarea.form-control {
22 | width: 100%;
23 | min-height: 500px;
24 | overflow-x: hidden;
25 | overflow-y: auto;
26 | font-family: monospace;
27 | white-space: pre-wrap;
28 | word-wrap: break-word;
29 | }
30 |
31 | textarea.form-control:disabled {
32 | overflow-x: scroll;
33 | overflow-y: auto;
34 | word-wrap: normal;
35 | white-space: pre;
36 | }
37 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/fonts/9IGqbwlMn4Zg3as8alsdNA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/fonts/9IGqbwlMn4Zg3as8alsdNA.woff2
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/fonts/CfvjE7QXPaQqLo02SkpIgA.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/fonts/CfvjE7QXPaQqLo02SkpIgA.ttf
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/fonts/RQxK-3RA0Lnf3gnnnNrAsYW_AySPyikQrZReizgrnuw.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/fonts/RQxK-3RA0Lnf3gnnnNrAsYW_AySPyikQrZReizgrnuw.ttf
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/fonts/t3vZkumW9T_w4ukdwBVHtA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/fonts/t3vZkumW9T_w4ukdwBVHtA.woff2
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/404.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/bg.jpg
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/bug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/bug.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/cog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/cog.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/coin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/coin.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/favicon.ico
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/flag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/flag.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/galactic_empire_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/galactic_empire_logo.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/head.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/head.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/integeruser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/integeruser.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/lavish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/lavish.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/mrstorm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/mrstorm.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/palma.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/palma.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/r1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/r1x.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/spam.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/spam.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/img/xire.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/secgroup/ctforge/d7b2e2af62d3f07c0d003a95c28837ac09c16c8c/ctforge/themes/dctf2017/static/img/xire.png
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/js/dctf.js:
--------------------------------------------------------------------------------
1 |
2 | /* CTForge: Forge your own CTF.
3 |
4 | *
5 | * Copyright (C) 2016-2019 Marco Squarcina
6 | * Copyright (C) 2016-2019 Mauro Tempesta
7 | * Copyright (C) 2016-2019 Lorenzo Veronese
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with this program. If not, see . */
21 | $(document).ready(function() {
22 | $('.sortable').footable();
23 | });
24 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/static/js/npm.js:
--------------------------------------------------------------------------------
1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
2 | require('../../js/transition.js')
3 | require('../../js/alert.js')
4 | require('../../js/button.js')
5 | require('../../js/carousel.js')
6 | require('../../js/collapse.js')
7 | require('../../js/dropdown.js')
8 | require('../../js/modal.js')
9 | require('../../js/tooltip.js')
10 | require('../../js/popover.js')
11 | require('../../js/scrollspy.js')
12 | require('../../js/tab.js')
13 | require('../../js/affix.js')
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/403.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Forbidden{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 |
Forbidden
27 |
The requested page cannot be accessed, try to login
28 | {% endblock %}
29 | {% block footer %}{% endblock %}
30 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/404.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Not Found{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
28 | {% endblock %}
29 | {% block footer %}{% endblock %}
30 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/500.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Not Found{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 |
Server Error
27 |
Something is wrong, please report this issue.
28 | {% endblock %}
29 | {% block footer %}{% endblock %}
30 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/_macros.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 |
22 | {% macro render_pretty_bools(data) %}
23 | {% if data is none %}
24 | none
25 | {% elif data is sameas true %}
26 | yes
27 | {% elif data is sameas false %}
28 | no
29 | {% else %}
30 | {{ data }}
31 | {% endif %}
32 | {% endmacro %}
33 |
34 | {% macro tabify(data, keys, target, id, class='') %}
35 |
102 | {% endif %}
103 | {% endfor %}
104 | {% endmacro %}
105 |
106 | {% macro get_status_badge(status) %}
107 | {% if status == 1 %}
108 | UP
109 | {% elif status == 0 %}
110 | CORRUPTED
111 | {% elif status == 2 %}
112 | NO FLAG
113 | {% else %}
114 | NOT CHECKED
115 | {% endif %}
116 | {% endmacro %}
117 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/admin/data.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 | {% from "_macros.html" import render_inline_fields %}
27 |
28 |
29 |
50 |
51 | {% endblock %}
52 | {% block footer %}{% endblock %}
53 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/admin/index.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Admin Panel{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 | {% from "_macros.html" import tabify, render_pretty_bools %}
27 |
28 |
101 |
102 | {% endblock %}
103 | {% block footer %}{% endblock %}
104 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/challenge.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}{{ challenge.name }}{% endblock %}
23 | {% block content %}
24 |
25 |
Writeup submission can be performed until a grade is assigned
64 |
65 |
72 |
73 |
74 | {% endif %}
75 | {% endif %}
76 | {% if not solved %}
77 |
78 |
79 |
80 |
88 |
89 |
90 |
91 | {% endif %}
92 | {% else %}
93 |
94 |
Challenge disabled
95 |
96 | {% endif %}
97 |
98 | {% endblock %}
99 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/challenges.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Challenges{% endblock %}
23 | {% block content %}
24 |
25 |
68 |
69 |
70 |
Challenges
71 |
72 | {% if config.JEOPARDY_BONUS %}
73 |
Bonus points: +3, +2, +1 to the first, second, third solver of each challenge
94 |
95 | {% endblock %}
96 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/challenges_scoreboard.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Challenge Scoreboard{% endblock %}
23 | {% block content %}
24 |
25 |
Challenge Scoreboard
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | {% endblock %}
95 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Home{% endblock %}
23 | {% block content %}
24 |
25 |
26 |
27 |
Deep Space DAIS CTF (DCTF) is a Capture The Flag hacking contest
28 | in which a number of alien races fight independently against each other in
29 | order to tower over the galactic empire.
30 |
31 |
32 |
33 |
The goal of each team is to maintain a set of services such that they
34 | remain available and uncompromised throughout the contest. Each team also has
35 | to attempt to compromise the other teams' services. Since all the teams have
36 | access to a copy of the same virtual machine containing the vulnerable
37 | services, each team has to find vulnerabilities in its host and fix them
38 | without disrupting the services.
39 |
40 |
41 |
At the same time, the teams have to leverage their knowledge about the
42 | vulnerabilities they find to compromise the servers run by other teams.
43 | Compromising a service allows a team to bypass the service's security
44 | mechanisms and to "capture the flag" associated with the service. The team
45 | that has the best combination of attack and defense skills wins.
46 |
47 |
48 |
In parallel with the main contest, a number of side challenges are
49 | left to be solved to the bravest participants. Since points earned by
50 | solving challenges do not contribute to the score of the teams,
51 | these problems must be solved individually.
52 |
53 |
54 | {% endblock %}
55 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/login.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Login{% endblock %}
23 | {% block navigation %}{% endblock %}
24 | {% block content %}
25 |
26 |
27 |
28 |
37 |
38 |
39 |
40 | {% endblock %}
41 | {% block footer %}{% endblock %}
42 |
43 |
44 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/service.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}{{ service.name }}{% endblock %}
23 | {% block content %}
24 |
25 |
{{ service.name }}
26 |
27 | {% if not service.active %}
28 |
Service deactivated
29 | {% endif %}
30 |
31 | {{ service.description|safe }}
32 |
33 | {% endblock %}
34 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/submit.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Flag Submission Service{% endblock %}
23 | {% block content %}
24 |
25 |
26 |
27 |
28 |
38 |
39 |
40 |
41 |
42 | {% endblock %}
43 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/team.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Home{% endblock %}
23 | {% block content %}
24 |
25 |
79 |
80 | {% endblock %}
81 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/teams.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Teams{% endblock %}
23 | {% block content %}
24 |
25 |
Teams
26 |
27 |
28 |
29 | {% for team in teams %}
30 |
31 |
{{ team.name }} (team{{ team.id }})
32 |
33 |
Name
Surname
34 |
35 | {% for user in users %}
36 | {% if team.id == user.team_id %}
37 |
{{ user.name }}
{{ user.surname }}
38 | {% endif %}
39 | {% endfor %}
40 |
41 |
42 |
43 | {% endfor %}
44 |
45 |
46 |
47 | {% endblock %}
48 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/user.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}User Profile{% endblock %}
23 | {% block content %}
24 |
25 |
60 |
61 | {% endblock %}
62 |
--------------------------------------------------------------------------------
/ctforge/themes/dctf2017/templates/writeup.html:
--------------------------------------------------------------------------------
1 |
2 | {# CTForge: Forge your own CTF. #}
3 |
4 | {# Copyright (C) 2016-2019 Marco Squarcina #}
5 | {# Copyright (C) 2016-2019 Mauro Tempesta #}
6 | {# Copyright (C) 2016-2019 Lorenzo Veronese #}
7 |
8 | {# This program is free software: you can redistribute it and/or modify #}
9 | {# it under the terms of the GNU Affero General Public License as published #}
10 | {# by the Free Software Foundation, either version 3 of the License, or #}
11 | {# (at your option) any later version. #}
12 |
13 | {# This program is distributed in the hope that it will be useful, #}
14 | {# but WITHOUT ANY WARRANTY; without even the implied warranty of #}
15 | {# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #}
16 | {# GNU Affero General Public License for more details. #}
17 |
18 | {# You should have received a copy of the GNU Affero General Public License #}
19 | {# along with this program. If not, see . #}
20 |
21 | {% extends "layout.html" %}
22 | {% block title %}Writeup{% endblock %}
23 | {% block content %}
24 |
25 |
53 |
54 | {% endblock %}
55 |
--------------------------------------------------------------------------------
/ctforge/users.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 |
4 | # CTForge: Forge your own CTF.
5 |
6 | # Copyright (C) 2016-2019 Marco Squarcina
7 | # Copyright (C) 2016-2019 Mauro Tempesta
8 | # Copyright (C) 2016-2019 Lorenzo Veronese
9 |
10 | # This program is free software: you can redistribute it and/or modify
11 | # it under the terms of the GNU Affero General Public License as published
12 | # by the Free Software Foundation, either version 3 of the License, or
13 | # (at your option) any later version.
14 |
15 | # This program is distributed in the hope that it will be useful,
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | # GNU Affero General Public License for more details.
19 |
20 | # You should have received a copy of the GNU Affero General Public License
21 | # along with this program. If not, see .
22 |
23 |
24 | from flask_login import UserMixin
25 |
26 | from ctforge.database import get_db_connection
27 |
28 | class User(UserMixin):
29 | def __init__(self, id, team_id, name, surname, nickname, mail, affiliation, password, admin, hidden, active=True):
30 | self.id = id
31 | self.team_id = team_id
32 | self.name = name
33 | self.nickname = nickname
34 | self.surname = surname
35 | self.mail = mail
36 | self.affiliation = affiliation
37 | self.password = password
38 | self.admin = admin
39 | self.hidden = hidden
40 | self.active = active
41 |
42 | def get_id(self):
43 | return self.mail
44 |
45 | @staticmethod
46 | def get(mail):
47 | """Return a User instance by querying the database."""
48 |
49 | db_conn = get_db_connection()
50 | with db_conn.cursor() as cur:
51 | cur.execute('SELECT * FROM users WHERE mail = %s', [mail])
52 | res = cur.fetchone()
53 | return User(**res) if res else None
54 |
--------------------------------------------------------------------------------
/ctforge/utils.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 |
4 | # CTForge: Forge your own CTF.
5 |
6 | # Copyright (C) 2016-2019 Marco Squarcina
7 | # Copyright (C) 2016-2019 Mauro Tempesta
8 | # Copyright (C) 2016-2019 Lorenzo Veronese
9 |
10 | # This program is free software: you can redistribute it and/or modify
11 | # it under the terms of the GNU Affero General Public License as published
12 | # by the Free Software Foundation, either version 3 of the License, or
13 | # (at your option) any later version.
14 |
15 | # This program is distributed in the hope that it will be useful,
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | # GNU Affero General Public License for more details.
19 |
20 | # You should have received a copy of the GNU Affero General Public License
21 | # along with this program. If not, see .
22 |
23 |
24 | import sys
25 | import string
26 | import random
27 | import datetime
28 | import configparser
29 | import os.path
30 |
31 | from flask import flash
32 |
33 | def parse_conf(fname):
34 | # load default config
35 | try:
36 | # parse the configuration file
37 | config = configparser.ConfigParser()
38 | config.read(fname)
39 | conf = dict(
40 | DB_HOST = config.get('database', 'host', fallback='127.0.0.1'),
41 | DB_PORT = config.getint('database', 'port', fallback=5432),
42 | DB_NAME = config.get('database', 'name', fallback='ctforge'),
43 | DB_USER = config.get('database', 'user', fallback='ctforge'),
44 | DB_PASSWORD = config.get('database', 'password', fallback='ctforge'),
45 |
46 | SHOW_NAMES = config.getboolean('DEFAULT', 'show_names', fallback=True),
47 |
48 | JEOPARDY_ACTIVE = config.getboolean('mode_jeopardy', 'active', fallback=True),
49 | JEOPARDY_BONUS = config.getboolean('mode_jeopardy', 'bonus', fallback=True),
50 |
51 | ATTACKDEFENSE_ACTIVE = config.getboolean('mode_attackdefense', 'active', fallback=False),
52 | ROUND_DURATION = config.getint('mode_attackdefense', 'round_duration', fallback=300),
53 | ALWAYS_SUBMIT = config.getboolean('mode_attackdefense','always_submit', fallback=False),
54 | FLAG_PREFIX = config.get('mode_attackdefense', 'flag_prefix', fallback='flg{'),
55 | FLAG_SUFFIX = config.get('mode_attackdefense', 'flag_suffix', fallback='}'),
56 | FLAG_CHARS = config.get('mode_attackdefense', 'flag_chars', fallback=string.ascii_letters + string.digits),
57 | FLAG_LENGTH = config.getint('mode_attackdefense', 'flag_length', fallback=25),
58 | FLAG_REGEXP = config.get('mode_attackdefense', 'flag_regexp', fallback='flg\{[a-zA-Z0-9]{25}\}'),
59 |
60 | STATIC_FOLDER = config.get('website', 'static_folder', fallback='themes/dctf2017/static'),
61 | TEMPLATE_FOLDER = config.get('website', 'template_folder', fallback='themes/dctf2017/templates'),
62 | URL = config.get('website', 'url', fallback='http://localhost:5000/'),
63 | DATE_START = datetime.datetime.strptime(config.get('website', 'date_start', fallback='2017-02-15 00:00:00.0'), "%Y-%m-%d %H:%M:%S.%f"),
64 | DEBUG = config.getboolean('website', 'debug', fallback=False),
65 | SESSION_COOKIE_SECURE = config.getboolean('website', 'secure_cookie', fallback=False),
66 | LOG_FILE = config.get('website', 'log_file', fallback=None),
67 | SECRET_KEY = config.get('website', 'secret_key', fallback='ChengeMeWithRandomStuffASAP'),
68 | BOT_LOG_FILE = config.get('flagbot', 'log_file', fallback=None),
69 | BOT_SCRIPT_PATH = config.get('flagbot', 'bot_script_path', fallback='~/.ctforge/bot/')
70 | )
71 | except (configparser.NoOptionError, configparser.NoSectionError) as e:
72 | sys.stderr.write('Malformed configuration file, aborting: {}\n'.format(e))
73 | sys.exit(1)
74 | # expand home
75 | for k in ['LOG_FILE', 'BOT_LOG_FILE', 'BOT_SCRIPT_PATH']:
76 | if conf[k] is not None:
77 | conf[k] = os.path.expanduser(conf[k])
78 |
79 | return conf
80 |
81 | def flash_errors(form):
82 | """Handle form errors via flash messages."""
83 |
84 | for field, errors in form.errors.items():
85 | for error in errors:
86 | msg = 'Error in the {} field: {}'.format(
87 | getattr(form, field).label.text, error)
88 | flash(msg, 'error')
89 |
90 | def generate_flag(prefix, suffix, charset, length):
91 | """Generate a random flag according to the provided config."""
92 |
93 | return prefix + ''.join(random.choice(charset) for _ in range(length)) + suffix
94 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 |
4 | # CTForge: Forge your own CTF.
5 |
6 | # Copyright (C) 2016-2019 Marco Squarcina
7 | # Copyright (C) 2016-2019 Mauro Tempesta
8 | # Copyright (C) 2016-2019 Lorenzo Veronese
9 |
10 | # This program is free software: you can redistribute it and/or modify
11 | # it under the terms of the GNU Affero General Public License as published
12 | # by the Free Software Foundation, either version 3 of the License, or
13 | # (at your option) any later version.
14 |
15 | # This program is distributed in the hope that it will be useful,
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | # GNU Affero General Public License for more details.
19 |
20 | # You should have received a copy of the GNU Affero General Public License
21 | # along with this program. If not, see .
22 |
23 |
24 | from setuptools import setup, find_packages
25 |
26 | setup(
27 | name='CTForge',
28 | version='0.8',
29 | description='Forge you own CTF',
30 | long_description=__doc__,
31 | license='MIT',
32 | author='Marco Squarcina',
33 | author_email='squarcina AT unive.it',
34 | packages=find_packages(),
35 | include_package_data=True,
36 | zip_safe=False,
37 | entry_points = {
38 | 'console_scripts': [
39 | 'ctforge = ctforge.scripts.ctforge:main',
40 | 'ctfbot = ctforge.scripts.ctfbot:main'
41 | ]
42 | },
43 | install_requires=[
44 | 'Flask>=0.10.1',
45 | 'Flask-Login>=0.3.2',
46 | 'Flask-WTF>=0.12',
47 | 'Flask-Misaka>=0.4.1',
48 | 'py-bcrypt>=0.4',
49 | 'psycopg2-binary>=2.6.1',
50 | 'Flask-Cache==0.13w'
51 | ],
52 | dependency_links=['https://github.com/wert310/flask-cache/tarball/master#egg=Flask-Cache-0.13w'],
53 | classifiers=[
54 | 'Private :: Do Not Upload'
55 | ]
56 | )
57 |
--------------------------------------------------------------------------------