Compare commits
No commits in common. "2615ad01cddbc11d3995c510abc94cec0ea8414e" and "e6402f37ddd2bfbdc1f28b540a17ad5603e9adcc" have entirely different histories.
2615ad01cd
...
e6402f37dd
|
@ -1,3 +0,0 @@
|
||||||
[submodule "src/ctfs/templates/challenges"]
|
|
||||||
path = src/ctfs/templates/challenges
|
|
||||||
url = https://gitea.42ctf.org/42CTF/challenges-descriptions.git
|
|
71
README.md
71
README.md
|
@ -1,34 +1,47 @@
|
||||||
# 42CTF
|
# 42ctf
|
||||||
|
CTF by 42 students
|
||||||
[42CTF](https://www.42ctf.org) is a CTF platform created by School 42 students and open to anyone.
|
|
||||||
|
|
||||||
|
|
||||||
### Todo
|
### Todo
|
||||||
|
|
||||||
TODO has been migrated to [issues](https://gitea.42ctf.org/42CTF/website/issues) !
|
- [x] Password reset
|
||||||
And hopefully, it is not redirected anymore to `/dev/null`.
|
- [x] Access solved challenges
|
||||||
|
- [x] "Intro" section
|
||||||
|
- [x] Profile edition
|
||||||
|
- [x] Resources page
|
||||||
|
- [x] Flags counter
|
||||||
|
- [x] Graphs on profile page
|
||||||
|
- [ ] Refacto the discord bot with OAuth
|
||||||
|
- [x] Platform translation
|
||||||
|
- [x] French
|
||||||
|
- [ ] Russian
|
||||||
|
- [x] Spanish
|
||||||
|
- [ ] Italian
|
||||||
|
- [x] German
|
||||||
|
- [ ] OAuth 42
|
||||||
|
- [ ] 42 Network leaderboard
|
||||||
|
- [ ] Possibility for users to propose solution to challenges
|
||||||
|
- [ ] Badges/achievments on profile pages
|
||||||
|
- [x] Dynamic scoring
|
||||||
|
|
||||||
### How to contribute ?
|
#### Event feature
|
||||||
|
|
||||||
First, you need to contact a 42CTF admin to get an account on the 42CTF gitea.
|
- [X] make scoreboard for events
|
||||||
You can contact us on [discord](https://discord.gg/3KDvt6hbWW) or by [email](mailto:42ctf@protonmail.com).
|
- [X] make access mod for events :
|
||||||
You can also fill this [form](https://forms.42l.fr/apps/forms/bpmyGR37AR4yHGnC) and we'll contact you.
|
- [X] Sub button for public events
|
||||||
Then, once you have a gitea account, you can fork this repository, do some stuff, and open a pull request.
|
- [X] Access by password
|
||||||
|
- [X] Begin date for display challenges
|
||||||
If you want to translate the platform, then have a look at the [wiki](https://gitea.42ctf.org/42CTF/website/wiki).
|
- [X] Ending date for stop flag submission
|
||||||
|
- [ ] Access by invite link
|
||||||
If you want to help with bot development, it has now its own [repository](https://gitea.42ctf.org/42CTF/bot)
|
- [X] Admin rights
|
||||||
|
- [X] Admin can access to events pages without password
|
||||||
### How to set up my dev environment ?
|
- [X] Admin can subscribe to event without password
|
||||||
|
- [X] process flag submission
|
||||||
There is only one file missing on this repository for you to run the server: `local_settings.py`.
|
- [X] increment user score in Scores model
|
||||||
You should create one in the `src` directory, with the following content:
|
- [X] add filters for admin dashboard
|
||||||
```
|
- [X] add search in fields in admin dashboard
|
||||||
DEBUG = True
|
- [X] Smooth display of events listing
|
||||||
SECRET_KEY = 'what you want'
|
- [X] Event info page with background and noice display
|
||||||
```
|
- [x] Create teams for events
|
||||||
|
- [x] Create/join team
|
||||||
When you'll run `python manage.py migrate` then `python manage.py runserver`, an empty database will be automatically created.
|
- [x] Manage team: change password / leave team
|
||||||
The `local_settings.py` is in the `.gitignore` and should stay that way, so we don't accidentally overwrite the production file when we deploy.
|
- [ ] Dynamic scoring for events
|
||||||
|
|
||||||
To obtain administrator rights you can run `python manage.py createsuperuser`.
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Django==3.2.11
|
Django
|
||||||
requests==2.27.1
|
requests
|
||||||
authlib==0.15.5
|
authlib
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
# Generated by Django 3.2.11 on 2022-02-15 16:13
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('ctfs', '0007_ctf_disabled'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='ctf',
|
|
||||||
name='description_de',
|
|
||||||
),
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='ctf',
|
|
||||||
name='description_ru',
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='ctf',
|
|
||||||
name='port',
|
|
||||||
field=models.PositiveSmallIntegerField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -15,9 +15,10 @@ class CTF(models.Model):
|
||||||
disabled = models.BooleanField(default=False)
|
disabled = models.BooleanField(default=False)
|
||||||
description = models.TextField(blank=True)
|
description = models.TextField(blank=True)
|
||||||
description_en = models.TextField(blank=True)
|
description_en = models.TextField(blank=True)
|
||||||
|
description_ru = models.TextField(blank=True)
|
||||||
|
description_de = models.TextField(blank=True)
|
||||||
file = models.FileField(blank=True, upload_to='challenges')
|
file = models.FileField(blank=True, upload_to='challenges')
|
||||||
ctf_url = models.URLField(blank=True)
|
ctf_url = models.URLField(blank=True)
|
||||||
port = models.PositiveSmallIntegerField(null=True, blank=True)
|
|
||||||
event = models.ForeignKey(Event, null=True, blank=True, on_delete=models.CASCADE)
|
event = models.ForeignKey(Event, null=True, blank=True, on_delete=models.CASCADE)
|
||||||
points = models.PositiveSmallIntegerField()
|
points = models.PositiveSmallIntegerField()
|
||||||
slug = models.SlugField(max_length=55)
|
slug = models.SlugField(max_length=55)
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 18fac3978d21dc824bcffa2bc960aa2bf6b4abd9
|
|
|
@ -2,8 +2,6 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load is_member %}
|
{% load is_member %}
|
||||||
{% load get_chall %}
|
|
||||||
{% get_current_language as lang %}
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-9">
|
<div class="col-sm-12 col-md-9">
|
||||||
<div class="ctf-block">
|
<div class="ctf-block">
|
||||||
|
@ -17,11 +15,11 @@
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="ctf-body">
|
<div class="ctf-body">
|
||||||
{% get_chall_by_lang ctf lang as content %}
|
{% if description %}
|
||||||
{{ content | safe }}
|
{{ description|safe }}
|
||||||
<!-- {% if ctf.port %}
|
{% else %}
|
||||||
<b>nc challenges.42ctf.org {{ ctf.port }}</b>
|
{% trans "No translation available. Please try another language (English or French)." %}
|
||||||
{% endif %} -->
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="ctf-footer">
|
<div class="ctf-footer">
|
||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated %}
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
from django import template
|
|
||||||
|
|
||||||
register = template.Library()
|
|
||||||
|
|
||||||
@register.simple_tag
|
|
||||||
def get_chall_by_lang(chall, lang):
|
|
||||||
print(chall.slug)
|
|
||||||
filepath = "ctfs/templates/challenges/"+ lang + "/" + chall.slug + ".html"
|
|
||||||
print(filepath)
|
|
||||||
try:
|
|
||||||
with open(filepath) as fp:
|
|
||||||
return fp.read()
|
|
||||||
except:
|
|
||||||
return chall.description_en
|
|
|
@ -1,23 +0,0 @@
|
||||||
# Generated by Django 3.2.11 on 2022-02-15 16:06
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('events', '0008_event_dynamic'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='eventplayer',
|
|
||||||
name='id',
|
|
||||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='team',
|
|
||||||
name='id',
|
|
||||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
|
||||||
),
|
|
||||||
]
|
|
Loading…
Reference in New Issue