"""bak URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.views.decorators.csrf import csrf_exempt

from core.views import *

urlpatterns = [
    path('', index, name='index'),
    path('problems/', problems, name='problems'),

    path('problems/broken_access/', broken_access, name='brute_force'),
    path('problems/broken_access/explanation', ba_explanation, name='explanation'),
    path('problems/broken_access/showcase', ba_showcase, name='showcase'),
    path('problems/broken_access/countermeasures', ba_countermeasures, name='countermeasures'),
    path('problems/broken_access/user1', ba_badexample, name='badexample'),

    path('problems/injections/', injections, name='injections'),
    path('problems/injections/explanation', ij_explanation, name='explanation'),
    path('problems/injections/showcase', ij_showcase, name='showcase'),
    path('problems/injections/example', csrf_exempt(ij_example), name='example'),
    path('problems/injections/countermeasures', ij_countermeasures, name='countermeasures'),

    path('problems/cryptographic_failures/', cryptographic_failures, name='cf'),
    path('problems/cryptographic_failures/explanation', cf_explanation, name='explanation'),
    path('problems/cryptographic_failures/showcase', cf_showcase, name='showcase'),
    path('problems/cryptographic_failures/countermeasures', cf_countermeasures, name='countermeasures'),
    path('problems/cryptographic_failures/script', download_script_ia, name='download_script_ia'),
    path('problems/cryptographic_failures/rsa', download_script_rsa, name='download_script_rsa'),

    path('problems/identification_authentication_failures/', Ident_Auth_Failures, name='IAF'),
    path('problems/identification_authentication_failures/explanation', ia_explanation, name='explanation'),
    path('problems/identification_authentication_failures/example', csrf_exempt(ia_example), name='explanation'),
    path('problems/identification_authentication_failures/showcase', ia_showcase, name='showcase'),
    path('problems/identification_authentication_failures/countermeasures', ia_countermeasures, name='countermeasures'),
    path('problems/identification_authentication_failures/usernames', download_usernames, name='download_usernames'),
    path('problems/identification_authentication_failures/passwords', download_passwords, name='download_passwords'),
    path('problems/identification_authentication_failures/script', download_script, name='download_script'),

    path('problems/vulnerable_outdated_components/', Vuln_Outd_Components, name='VOC'),
    path('problems/vulnerable_outdated_components/explanation', vo_explanation, name='explanation'),
    path('problems/vulnerable_outdated_components/showcase', vo_showcase, name='showcase'),
    path('problems/vulnerable_outdated_components/countermeasures', vo_countermeasures, name='countermeasures'),

    path('profile/', profile, name='profile'),
    path('signup/', signup, name='signup'),
    path('signin/', signin, name='signin'),
    path('signout/', signout, name='signout'),

    path('about/', about, name='about'),
    path('admin/', admin.site.urls),
]
