From 7ff556a986c6b3f0c519843976db8d993266762f Mon Sep 17 00:00:00 2001 From: Danhia Date: Wed, 16 Feb 2022 13:50:19 +0100 Subject: [PATCH 1/4] Update 'README.md' --- README.md | 69 ++++++++++++++++++++++--------------------------------- 1 file changed, 27 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index b528eeb..f96625c 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,32 @@ -# 42ctf -CTF by 42 students +# 42CTF + +[42CTF](https://www.42ctf.org) is a CTF platform created by School 42 students and open to anyone. + ### Todo -- [x] Password reset -- [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 +TODO has been migrated to [issues](https://gitea.42ctf.org/42CTF/website/issues) ! +And hopefully, it is not redirected anymore to `/dev/null`. -#### Event feature +### How to contribute ? -- [X] make scoreboard for events -- [X] make access mod for events : - - [X] Sub button for public events - - [X] Access by password - - [X] Begin date for display challenges - - [X] Ending date for stop flag submission - - [ ] Access by invite link -- [X] Admin rights - - [X] Admin can access to events pages without password - - [X] Admin can subscribe to event without password -- [X] process flag submission - - [X] increment user score in Scores model -- [X] add filters for admin dashboard -- [X] add search in fields in admin dashboard -- [X] Smooth display of events listing -- [X] Event info page with background and noice display -- [x] Create teams for events - - [x] Create/join team - - [x] Manage team: change password / leave team -- [ ] Dynamic scoring for events +First, you need to contact a 42CTF admin to get an account on the 42CTF gitea. +You can contact us on [discord](https://discord.gg/3KDvt6hbWW) or by [email](mailto:42ctf@protonmail.com). +You can also fill this [form](https://forms.42l.fr/apps/forms/bpmyGR37AR4yHGnC) and we'll contact you. +Then, once you have a gitea account, you can fork this repository, do some stuff, and open a pull request. + +If you want to translate the platform, then have a look at the [wiki](https://gitea.42ctf.org/42CTF/website/wiki). + +If you want to help with bot development, it has now its own [repository](https://gitea.42ctf.org/42CTF/bot) + +### How to set up my dev environment ? + +There is only one file missing on this repository for you to run the server: `local_settings.py`. +You should create one in the `src` directory, with the following content: +``` +DEBUG = True +SECRET_KEY = 'what you want' +``` + +When you'll run `python manage.py runserver`, an empty database will be automatically created. +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. \ No newline at end of file From 0ac395def865c064d15fd1678a5c01717fc23016 Mon Sep 17 00:00:00 2001 From: Danhia Date: Wed, 16 Feb 2022 13:53:57 +0100 Subject: [PATCH 2/4] Update 'requirements.txt' --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 226a15c..8d537b7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -Django -requests -authlib +Django==3.2.11 +requests==2.27.1 +authlib==0.15.5 From b9704d3cb3af20184788a6f7cb62747249e6e644 Mon Sep 17 00:00:00 2001 From: Starthur Date: Wed, 16 Feb 2022 14:13:00 +0100 Subject: [PATCH 3/4] Update README Add information about migrate and admin right on local dev --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f96625c..abc2332 100644 --- a/README.md +++ b/README.md @@ -28,5 +28,15 @@ DEBUG = True SECRET_KEY = 'what you want' ``` -When you'll run `python manage.py runserver`, an empty database will be automatically created. -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. \ No newline at end of file +When you'll run `python manage.py migrate` then `python manage.py runserver`, an empty database will be automatically created. +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. + +To obtain administrator rights you must create a user on the platform. Then you can run `python manage.py shell` and type the following commands: +``` +from django.contrib.auth.models import User +user = User.objects.get(username="") +user.is_staff = True +user.is_admin = True +user.is_superuser = True +user.save() +``` \ No newline at end of file From 28d8874272a2335d3e2a0b8774a35e3a8d8cb7a5 Mon Sep 17 00:00:00 2001 From: Starthur Date: Wed, 16 Feb 2022 14:33:21 +0100 Subject: [PATCH 4/4] Update README Better solution to create superuser admin --- README.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/README.md b/README.md index abc2332..1b2c50e 100644 --- a/README.md +++ b/README.md @@ -31,12 +31,4 @@ SECRET_KEY = 'what you want' When you'll run `python manage.py migrate` then `python manage.py runserver`, an empty database will be automatically created. 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. -To obtain administrator rights you must create a user on the platform. Then you can run `python manage.py shell` and type the following commands: -``` -from django.contrib.auth.models import User -user = User.objects.get(username="") -user.is_staff = True -user.is_admin = True -user.is_superuser = True -user.save() -``` \ No newline at end of file +To obtain administrator rights you can run `python manage.py createsuperuser`. \ No newline at end of file