Compare commits
No commits in common. "13895d7712113ce959738e64c56a08005df6ef14" and "1771f3c2bbe61fca08aaf5a3d68c2a790c33c145" have entirely different histories.
13895d7712
...
1771f3c2bb
|
@ -1,26 +0,0 @@
|
|||
from django.contrib import sitemaps
|
||||
from django.urls import reverse
|
||||
from .models import Category, CTF
|
||||
from .views import category, ctf
|
||||
|
||||
class CategorySitemap(sitemaps.Sitemap):
|
||||
changefreq = "weekly"
|
||||
priority = 0.7
|
||||
i18n = True
|
||||
|
||||
def items(self):
|
||||
return Category.objects.all()
|
||||
|
||||
def location(self, obj):
|
||||
return reverse(category, kwargs={'cat_slug': obj.slug})
|
||||
|
||||
class CTFSitemap(sitemaps.Sitemap):
|
||||
changefreq = "weekly"
|
||||
priority = 0.7
|
||||
i18n = True
|
||||
|
||||
def items(self):
|
||||
return CTF.objects.all()
|
||||
|
||||
def location(self, obj):
|
||||
return reverse(ctf, kwargs={'cat_slug': obj.category.slug, 'ctf_slug': obj.slug})
|
|
@ -8,7 +8,7 @@
|
|||
<div class="col-sm-12 col-md-9">
|
||||
<div class="ctf-block">
|
||||
<div class="ctf-head">
|
||||
<h1>{{ ctf.name }}</h1>
|
||||
<h3>{{ ctf.name }}</h3>
|
||||
<small>{% trans "Published date" %} : {{ ctf.pub_date }}</small>
|
||||
</div>
|
||||
{% if date < ctf.pub_date %}
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
{% block content %}
|
||||
{% load i18n %}
|
||||
<div class="row">
|
||||
<div class="col-12 ctf-head">
|
||||
<h1>{{ cat.name }}</h1>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-9 news-card">
|
||||
<h3>{{ cat.name }}</h3>
|
||||
{% if ctfs %}
|
||||
<table class="table table-striped table-dark">
|
||||
<thead>
|
||||
|
|
|
@ -1,15 +1,7 @@
|
|||
from django.contrib.sitemaps.views import sitemap
|
||||
from django.urls import path
|
||||
from .sitemaps import CategorySitemap, CTFSitemap
|
||||
from . import views
|
||||
|
||||
sitemaps = {
|
||||
'categories': CategorySitemap(),
|
||||
'challenges': CTFSitemap(),
|
||||
}
|
||||
|
||||
urlpatterns = [
|
||||
path('<str:cat_slug>/', views.category, name='category'),
|
||||
path('<str:cat_slug>/<str:ctf_slug>', views.ctf, name='ctf'),
|
||||
path('sitemap.xml', sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'),
|
||||
path('<str:cat_slug>/<str:ctf_slug>', views.ctf, name='ctf')
|
||||
]
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
from django.contrib import sitemaps
|
||||
from django.urls import reverse
|
||||
from .models import Event
|
||||
|
||||
class EventsSitemap(sitemaps.Sitemap):
|
||||
changefreq = "daily"
|
||||
priority = 0.7
|
||||
i18n = True
|
||||
|
||||
def items(self):
|
||||
return Event.objects.all()
|
||||
|
||||
def location(self, obj):
|
||||
return reverse('events:event_info', kwargs={'event_slug': obj.slug})
|
||||
|
||||
class StaticViewSitemap(sitemaps.Sitemap):
|
||||
priority = 0.7
|
||||
changefreq = 'daily'
|
||||
i18n = True
|
||||
def items(self):
|
||||
return ['events:events']
|
||||
|
||||
def location(self, item):
|
||||
return reverse(item)
|
|
@ -7,7 +7,7 @@
|
|||
<div class="ctf-block">
|
||||
<a href="{% url 'events:event_info' event_slug=event.slug %}">< Back to event</a>
|
||||
<div class="ctf-head">
|
||||
<h1>{% trans "Event" %} - {{ event.name }}</h1>
|
||||
<h2>{% trans "Event" %} - {{ event.name }}</h2>
|
||||
<h4>{{ ctf.name }}</h4>
|
||||
<small>{% trans "Published date" %} : {{ ctf.pub_date }}</small>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{% endif %}
|
||||
<div class="event-block">
|
||||
<div class="event-head" style="background-image:linear-gradient(180deg, rgba(102,102,102,0.3) 100%, rgba(29,29,29,1) 100%),url('{{ event.img }}');">
|
||||
<h1>{{ event.name }}</h1>
|
||||
<h3>{{ event.name }}</h3>
|
||||
{% if ended == True %}
|
||||
<small>{% trans "This event is over." %}</small>
|
||||
{% else %}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
{% block content %}
|
||||
{% load i18n %}
|
||||
<div class="row">
|
||||
<div class="col-12 ctf-head">
|
||||
<h1>{% trans "Events" %}</h1>
|
||||
<div class="col-12">
|
||||
<h3>{% trans "Events" %}</h3>
|
||||
</div>
|
||||
{% if events %}
|
||||
{% for ev in events %}
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
from django.contrib.sitemaps.views import sitemap
|
||||
from django.urls import path
|
||||
from .sitemaps import StaticViewSitemap, EventsSitemap
|
||||
from . import views
|
||||
|
||||
app_name = "events"
|
||||
|
||||
sitemaps = {
|
||||
'events': EventsSitemap(),
|
||||
'static': StaticViewSitemap(),
|
||||
}
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.events, name='events'),
|
||||
path('sitemap.xml', sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'),
|
||||
path('<str:event_slug>', views.event, name='event_info'),
|
||||
path('<str:event_slug>/challenge/<str:chall_slug>', views.chall_event_info, name='event_chall_info'),
|
||||
path('pwd/<str:event_slug>', views.submit_pwd, name='submit_pwd'),
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
from django.contrib import sitemaps
|
||||
from django.urls import reverse
|
||||
|
||||
class StaticViewSitemap(sitemaps.Sitemap):
|
||||
priority = 0.5
|
||||
changefreq = 'monthly'
|
||||
i18n = True
|
||||
def items(self):
|
||||
return ['home', 'cgu']
|
||||
|
||||
def location(self, item):
|
||||
return reverse(item)
|
|
@ -4,7 +4,7 @@
|
|||
{% get_current_language as lang %}
|
||||
<div class="row">
|
||||
<div class="col-12 news-card">
|
||||
<h1>Conditions générales d'utilisation du site 42CTF</h1>
|
||||
<h2>Conditions générales d'utilisation du site 42CTF</h2>
|
||||
|
||||
<h5>Article 1 : Objet</h5>
|
||||
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
from django.contrib.sitemaps.views import sitemap
|
||||
from django.urls import path
|
||||
from .sitemaps import StaticViewSitemap
|
||||
from . import views
|
||||
|
||||
sitemaps = {
|
||||
'static': StaticViewSitemap(),
|
||||
}
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.home, name='home'),
|
||||
path('CGU', views.cgu, name='cgu'),
|
||||
path('sitemap.xml', sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'),
|
||||
]
|
||||
|
|
|
@ -9,15 +9,12 @@ from django.utils.translation import (
|
|||
LANGUAGE_SESSION_KEY, check_for_language, get_language,
|
||||
)
|
||||
from django.core.files.storage import default_storage
|
||||
|
||||
# import datetime
|
||||
from django.utils import timezone
|
||||
|
||||
import datetime
|
||||
from collections import defaultdict
|
||||
import operator
|
||||
|
||||
def get_weekly_top():
|
||||
week_ago = timezone.now() - timezone.timedelta(days=7)
|
||||
week_ago = datetime.datetime.now() - datetime.timedelta(days=7)
|
||||
weekly_flags = CTF_flags.objects.filter(flag_date__gt=week_ago, ctf__disabled=False, ctf__event=None)
|
||||
scores = defaultdict(int)
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ INSTALLED_APPS = [
|
|||
'resources.apps.ResourcesConfig',
|
||||
'django.contrib.sites',
|
||||
'api.apps.ApiConfig',
|
||||
'django.contrib.sitemaps',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
from django.contrib import sitemaps
|
||||
from django.urls import reverse
|
||||
|
||||
class StaticViewSitemap(sitemaps.Sitemap):
|
||||
priority = 0.5
|
||||
changefreq = 'monthly'
|
||||
i18n = True
|
||||
def items(self):
|
||||
return ['resources:about', 'resources:howToStart', 'resources:contribute', 'resources:becomeMember']
|
||||
|
||||
def location(self, item):
|
||||
return reverse(item)
|
|
@ -3,13 +3,12 @@
|
|||
{% load i18n %}
|
||||
{% get_current_language as lang %}
|
||||
<div class="row">
|
||||
<div class="col-12 ctf-head">
|
||||
<h1>{% trans "About 42ctf" %}</h1>
|
||||
</div>
|
||||
{% load i18n %}
|
||||
{% get_current_language as lang %}
|
||||
<div class="col-sm-12">
|
||||
<div class="ctf-block">
|
||||
<div class="ctf-head text-center">
|
||||
<h1>{% trans "What is 42CTF ?" %}</h1>
|
||||
<div class="ctf-head">
|
||||
<center><h3>{% trans "What is 42CTF ?" %}</h3></center>
|
||||
</div>
|
||||
<div class="ctf-body">
|
||||
<h4>{% trans "A short introduction to CTF" %}</h4>
|
||||
|
@ -32,5 +31,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -4,8 +4,8 @@
|
|||
{% load i18n %}
|
||||
{% get_current_language as lang %}
|
||||
<div class="row">
|
||||
<div class="col-12 ctf-head">
|
||||
<h1>{% trans "Become a 42CTF member" %}</h1>
|
||||
<div class="col-12">
|
||||
<h3>{% trans "Become a 42CTF member" %}</h3>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="ctf-block text-center">
|
||||
|
@ -43,7 +43,6 @@
|
|||
<div class="ctf-head text-center">
|
||||
<h4>{% trans "What do I get ?" %}</h4>
|
||||
</div>
|
||||
<br><br>
|
||||
{% blocktranslate %}
|
||||
- A <span class='is-member'>different color</span> for your pseudo in the scoreboard, to let everyone know you're a member.<br>
|
||||
- The possibility to play past CTF, with challenges no longer available, in the form of private events with the people of your choice.<br>
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
{% load i18n %}
|
||||
{% get_current_language as lang %}
|
||||
<div class="row">
|
||||
<div class="col-12 ctf-head">
|
||||
<h1>{% trans "Contribute to 42ctf" %}</h1>
|
||||
</div>
|
||||
{% block donate %}
|
||||
{% include "./donate.html" %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
{% get_current_language as lang %}
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="ctf-block">
|
||||
<div class="ctf-head text-center">
|
||||
<h3>{% trans "Create new challenges" %}</h3>
|
||||
<div class="ctf-head">
|
||||
<center><h3>{% trans "Create new challenges" %}</h3></center>
|
||||
</div>
|
||||
<div class="ctf-body">
|
||||
{% trans "If you want to create new challenges for 42CTF, send us a message on " %}<a class="footer_imgs" href="https://discord.gg/DwZqPpA" target="_blank"><img src="/static/img/discord.png" width="30"></a> !<br><br>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{% block content %}
|
||||
{% load i18n %}
|
||||
{% get_current_language as lang %}
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="ctf-block">
|
||||
<div class="ctf-head text-center">
|
||||
<h3>{% trans "Edit this page" %}</h3>
|
||||
<div class="ctf-head">
|
||||
<center><h3>{% trans "Edit this page" %}</h3></center>
|
||||
</div>
|
||||
<div class="ctf-body">
|
||||
<br>
|
||||
|
|
|
@ -2,11 +2,7 @@
|
|||
{% block content %}
|
||||
{% load i18n %}
|
||||
{% get_current_language as lang %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 ctf-head">
|
||||
<h1>{% trans "Beginner guide" %}</h1>
|
||||
</div>
|
||||
{% block tools %}
|
||||
{% include "./tools.html" %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{% block content %}
|
||||
{% load i18n %}
|
||||
{% get_current_language as lang %}
|
||||
<div class="col-12">
|
||||
<div class="col-sm-12">
|
||||
<div class="ctf-block">
|
||||
<div class="ctf-head">
|
||||
<h3>{% trans "Recommended Tools" %}</h3>
|
||||
<center><h3>{% trans "Recommended Tools" %}</h3></center>
|
||||
</div>
|
||||
<div class="ctf-body">
|
||||
{% trans "To get you started, we built a VM that you can simply import in" %} <a href="https://www.virtualbox.org/wiki/Downloads">Virtual Box</a> {% trans "with a bunch of useful tools." %}<br>
|
||||
|
|
|
@ -1,16 +1,11 @@
|
|||
from django.contrib.sitemaps.views import sitemap
|
||||
from django.urls import path
|
||||
from . import views
|
||||
from .sitemaps import StaticViewSitemap
|
||||
|
||||
app_name = "resources"
|
||||
sitemaps = {
|
||||
'static': StaticViewSitemap(),
|
||||
}
|
||||
|
||||
urlpatterns = [
|
||||
path('about', views.about, name='about'),
|
||||
path('how-to-start', views.howToStart, name='howToStart'),
|
||||
path('contribute', views.contribute, name='contribute'),
|
||||
path('become-member', views.becomeMember, name='becomeMember'),
|
||||
path('sitemap.xml', sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'),
|
||||
]
|
||||
|
|
|
@ -3,11 +3,9 @@
|
|||
{% block content %}
|
||||
{% load is_member %}
|
||||
<div class="row">
|
||||
<div class="col-12 ctf-head">
|
||||
<h1>{% trans "Scoreboard" %}</h1>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div>
|
||||
<h4>Scoreboard</h4>
|
||||
<table class="table table-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -88,14 +88,9 @@ pre {
|
|||
border: none;
|
||||
}
|
||||
|
||||
.ctf-head h1 {
|
||||
text-transform: uppercase;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.ctf-block {
|
||||
background-color: #1d1d1d;
|
||||
min-height: 35vh;
|
||||
min-height: 30vh;
|
||||
padding: 30px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
<meta property="twitter:description" content="42CTF is a cybersecurity challenges platform created by School 42 students.">
|
||||
<meta property="twitter:image" content="{% static "img/42ctf_logo.png" %}">
|
||||
|
||||
<link rel="canonical" href="https://www.42ctf.org/{{ request.path }}">
|
||||
|
||||
<meta name="Description" content="42CTF is a cybersecurity challenges platform created by School 42 students.">
|
||||
<meta name="keywords" content="42, cybersécurité, cybersecurity, hack, hacking, challenge, solution, exercice, hacking challenge, hack challenge, exercice hack, exercice hacking, capture the flag, CTF, security, sécurité, Documentation,Applicatif,Cryptologie,Challenges,Outils,Réseaux,CrackinWebW Client,Programmation,Cryptanaly,Application,Présentation,Réseau,Stéganographie,Web Serveur,Cracking,Classement,Challenges, Informatique,Capture The Flag,Forensic,Web," />
|
||||
</head>
|
||||
|
@ -88,7 +86,7 @@
|
|||
{% ismember request.user.userprofileinfo as is_member %}
|
||||
{% if not is_member %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-distinguish text-center" href="{% url 'resources:becomeMember' %}">{% translate "Become a member" %}</a>
|
||||
<a class="nav-link nav-distinguish" href="{% url 'resources:becomeMember' %}">{% translate "Become a member" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item dropdown">
|
||||
|
|
Loading…
Reference in New Issue