Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hosting #7

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Iete_ctf/IETE_CTF/CTF/__pycache__/urls.cpython-311.pyc
Binary file not shown.
Binary file modified Iete_ctf/IETE_CTF/CTF/__pycache__/views.cpython-311.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion Iete_ctf/IETE_CTF/CTF/static/js/preloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var strings = [
"Loading content",
"Page rendered",
"Starting display manager",
"WELCOME TO IETE CTF INC 2024",
"WELCOME TO IETE CTF 2024",
"Initializing..."
];

Expand Down
4 changes: 2 additions & 2 deletions Iete_ctf/IETE_CTF/CTF/templates/ctf/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>IETE CTF</title>
<title>FLAGATHON</title>

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">

Expand Down Expand Up @@ -35,7 +35,7 @@
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a href="index.html" class="pl-md-0 p-3 text-decoration-none text-light">
<h3 class="bold"><span class="color_danger">IETE</span><span class="color_white">CTF</span></h3>
<h3 class="bold"><span class="color_danger"></span>FLAGATHON<span class="color_white"></span></h3>
</a>
</div>
<div class="navbar-nav ml-auto">
Expand Down
17 changes: 7 additions & 10 deletions Iete_ctf/IETE_CTF/CTF/templates/ctf/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>IETE CTF</title>
<title>FLAGATHON</title>

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">

Expand Down Expand Up @@ -35,7 +35,7 @@
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a href="index.html" class="pl-md-0 p-3 text-decoration-none text-light">
<h3 class="bold"><span class="color_danger">IETE</span><span class="color_white">CTF</span></h3>
<h3 class="bold"><span class="color_danger">FLAGATHON</span><span class="color_white"></span></h3>
</a>
</div>
<div class="navbar-nav ml-auto">
Expand All @@ -62,19 +62,16 @@ <h1 class="display-1 bold color_white content__title text-center"><span class="c
<div class="row justify-content-center hackerFont">
<div class="col-md-8">
<h5 class="bold color_white pt-3">
What is Capture the Flag?
What is Flagathon?
</h5>
A capture the flag (CTF) contest is a special kind of cybersecurity competition designed to challenge its participants to solve computer security problems and/or capture and defend computer systems. The game consists of a series of challenges where participants
A Flagathon (CTF) contest is a special kind of cybersecurity competition designed to challenge its participants to solve computer security problems and/or capture and defend computer systems. The game consists of a series of challenges where participants
must reverse engineer, break, hack, decrypt, or do whatever it takes to solve the challenge. The challenges are all set up with the intent of being hacked, making it an excellent, legal way to get hands-on experience.
<h5 class="bold color_white pt-3">
About IETE CTF
About Flagathon
</h5>
IETE CTF is a event event where students partcipate from all over the world!<br> Out aim is about spreading the importance of cybersecurity in today's
Our aim is about spreading the importance of cybersecurity in today's
community. Each and every person should be aware of different vulnerabilities in systems as well as how to protect onselves agains cyber attacks<br> We believe gamification is the best technique to teach oneself about cybersecurity.
<h5 class="bold color_white pt-3">
Who can play IETE CTF
</h5>
IETE CTF is mainly focused at students who are undergraduates.

<div class="row text-center pt-5">
<div class="col-xl-12">
<button class="btn btn-outline-danger btn-shadow px-3my-2 ml-0 ml-sm-1 text-left typewriter" onclick="(function(){window.location.href='/login'})();">
Expand Down
4 changes: 2 additions & 2 deletions Iete_ctf/IETE_CTF/CTF/templates/ctf/hackerboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>IETE CTF</title>
<title>FLAGATHON</title>

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">

Expand Down Expand Up @@ -38,7 +38,7 @@
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a href="index.html" class="pl-md-0 p-3 text-decoration-none text-light">
<h3 class="bold"><span class="color_danger">IETE</span><span class="color_white">CTF</span></h3>
<h3 class="bold"><span class="color_danger">FLAGATHON</span><span class="color_white"></span></h3>
</a>
</div>
<div class="navbar-nav ml-auto">
Expand Down
14 changes: 7 additions & 7 deletions Iete_ctf/IETE_CTF/CTF/templates/ctf/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>IETE CTF</title>
<title>FLAGATHON</title>

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">

Expand Down Expand Up @@ -40,8 +40,8 @@
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a href="index.html" class="pl-md-0 p-3 text-decoration-none text-light">
<h3 class="bold"><span class="" style="color: greenyellow;">IETE</span><span class="color_white">CTF</span></h3>
<a class="pl-md-0 p-3 text-decoration-none text-light">
<h3 class="bold"><span class="color_danger">FLAGATHON</span><span class="color_white"></span></h3>
</a>
</div>
<div class="navbar-nav ml-auto">
Expand All @@ -61,17 +61,17 @@ <h3 class="bold"><span class="" style="color: greenyellow;">IETE</span><span cla
<div class="container">
<div class="row">
<div class="col-xl-8">
<h1 class="display-1 bold color_danger content__title" style="color:greenyellow">IETE CTF<span class="vim-caret">&nbsp;</span></h1>
<h1 class="display-1 bold color_white content__title2">INC 2024</h1>
<h1 class="display-1 bold color_danger content__title" style="color:greenyellow">FLAGATHON<span class="vim-caret">&nbsp;</span></h1>
<h1 class="display-1 bold color_white content__title2">LETS HACK IT</h1>
</div>
</div>
<div class="row">
<div class="col-xl-4">
<p class="mt-5 text-grey text-spacey hackerFont lead">
The quieter you become the more you are able to hear.
</p>
<button class="btn btn-shadow px-3 my-2 ml-0 ml-sm-1 text-left typewriter" style="color:black;outline-color: black; background-color:white;" onclick="location.href = '{% url 'login1' %}';">
<h4>Login</h4>
<button class="btn btn-shadow px-3 my-2 ml-0 ml-sm-1 text-left typewriter" style="color:black;outline-color: black; background-color:white;" onclick="location.href = '{% url 'signup' %}';">
<h4>Register</h4>
</button>
</div>
</div>
Expand Down
9 changes: 6 additions & 3 deletions Iete_ctf/IETE_CTF/CTF/templates/ctf/instructions.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>IETE CTF</title>
<title>FLAGATHON</title>

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">

Expand Down Expand Up @@ -35,7 +35,7 @@
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a href="index.html" class="pl-md-0 p-3 text-decoration-none text-light">
<h3 class="bold"><span class="" style="color: greenyellow;">IETE</span><span class="color_white">CTF</span></h3>
<h3 class="bold"><span class="" style="color: greenyellow;">FLAGATHON</span><span class="color_white"></span></h3>
</a>
</div>
<div class="navbar-nav ml-auto">
Expand Down Expand Up @@ -87,9 +87,12 @@ <h5 class="bold color_white pt-3">
</ul>
<div class="row text-center pt-5">
<div class="col-xl-12">
<button class="btn btn-shadow px-3 my-2 ml-0 ml-sm-1 text-left typewriter" style="color: greenyellow;" onclick="(function(){window.location.href='/QUEST'})();">
<button class="btn btn-outline-danger btn-shadow px-3 my-2 ml-0 ml-sm-1 text-left typewriter" onclick="(function(){window.location.href='/QUEST'})();">

<h4>LET THE HACKING BEGIN!</h4>

</button>
<h6 style='color:pink'>This Window will open on 18th April 2024 at 6PM. </h6>
<small id="registerHelp" class="mt-2 form-text text-muted">We expect each and every one of you to comply by the rules. Failure to do so might result in a permanent ban.</small>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions Iete_ctf/IETE_CTF/CTF/templates/ctf/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>IETE CTF</title>
<title>Flagathon</title>

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">

Expand Down Expand Up @@ -35,7 +35,7 @@
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a href="index.html" class="pl-md-0 p-3 text-decoration-none text-light">
<h3 class="bold"><span class="color_danger">IETE</span><span class="color_white">CTF</span></h3>
<h3 class="bold"><span class="color_danger">FLAGATHON</span><span class="color_white"></span></h3>
</a>
</div>
<div class="navbar-nav ml-auto">
Expand All @@ -56,7 +56,7 @@ <h3 class="bold"><span class="color_danger">IETE</span><span class="color_white"
<div class="container">
<div class="row">
<div class="col-xl-8">
<h1 class="display-1 bold color_white content__title">IETE CTF<span class="vim-caret">&nbsp;</span></h1>
<h1 class="display-1 bold color_white content__title">FLAGATHON<span class="vim-caret">&nbsp;</span></h1>
<p class="text-grey text-spacey hackerFont lead mb-5">
Type your credentials to conquer the world
</p>
Expand Down
2 changes: 1 addition & 1 deletion Iete_ctf/IETE_CTF/CTF/templates/ctf/quests.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h6 class="solvers">Solvers:{{ question.solved_by }} &nbsp;<span class="color_da
<p>{{ question.Qdes }}</p>
<form method="POST" id="my_event_form">
{% csrf_token %}
<a target="_blank" href="#!" class="btn btn-outline-secondary btn-shadow"><span class="fa fa-download mr-2"></span>Download</a>
<a target="_blank" href="/" class="btn btn-outline-secondary btn-shadow"><span class="fa fa-download mr-2"></span>Download</a>
<a href="#hint" data-toggle="modal" data-target="#hint" class="btn btn-outline-secondary btn-shadow" onclick="getHint({{question.Qid}})"><span class="far fa-lightbulb mr-2"></span>Hint</a>
<div class="input-group mt-3" >
<div class="ht-tm-element custom-control custom-radio">
Expand Down
6 changes: 3 additions & 3 deletions Iete_ctf/IETE_CTF/CTF/templates/ctf/register.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>IETE CTF</title>
<title>FLAGATHON</title>

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">

Expand Down Expand Up @@ -35,7 +35,7 @@
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a href="index.html" class="pl-md-0 p-3 text-decoration-none text-light">
<h3 class="bold"><span class="color_danger">IETE</span><span class="color_white">CTF</span></h3>
<h3 class="bold"><span class="color_danger">FLAGATHON</span><span class="color_white"></span></h3>
</a>
</div>
<div class="navbar-nav ml-auto">
Expand All @@ -56,7 +56,7 @@ <h3 class="bold"><span class="color_danger">IETE</span><span class="color_white"
<div class="container">
<div class="row">
<div class="col-xl-10">
<h1 class="display-1 bold color_white content__title">IETE CTF
<h1 class="display-1 bold color_white content__title">FLAGATHON
<span class="vim-caret">&nbsp;</span></h1>
<p class="text-grey text-spacey hackerFont lead mb-5">
Join the community and be part of the future of the information security industry.
Expand Down
4 changes: 3 additions & 1 deletion Iete_ctf/IETE_CTF/CTF/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.urls import path

from . import views
from .views import download_file

urlpatterns = [
path('', views.index, name='index'),
Expand All @@ -13,5 +14,6 @@
path('logout', views.logout, name='logout'),
path('check', views.check, name='check'),
path('hint', views.hint, name='hint'),
path('leaderboard', views.leaderboard, name='leaderboard')
path('leaderboard', views.leaderboard, name='leaderboard'),

]
9 changes: 9 additions & 0 deletions Iete_ctf/IETE_CTF/CTF/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from django.http import HttpResponse
import datetime
import time
from django.shortcuts import get_object_or_404
from .models import UserProfile, Questions, Submission
from django.contrib.auth.models import User, auth

Expand Down Expand Up @@ -191,6 +192,14 @@ def logout(request):
auth.logout(request)
return redirect("/")

def download_file(request , file_id):
file_obj = get_object_or_404(YourFileModel, id=file_id) # Retrieve the file object from the database
file_content = open(file_obj.file.path, 'rb').read() # Read the file content
response = HttpResponse(file_content, content_type='application/octet-stream')
response['Content-Disposition'] = f'attachment; filename="{file_obj.file.name}"'
return response



def leaderboard(request):
# data = Submission.objects.all().order_by("-curr_score", "-sub_time")
Expand Down
Binary file modified Iete_ctf/IETE_CTF/IETE_CTF/__pycache__/settings.cpython-311.pyc
Binary file not shown.
Binary file modified Iete_ctf/IETE_CTF/IETE_CTF/__pycache__/wsgi.cpython-311.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion Iete_ctf/IETE_CTF/IETE_CTF/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['.vercel.app']
ALLOWED_HOSTS = []


# Application definition
Expand Down
Binary file modified Iete_ctf/IETE_CTF/db.sqlite3
Binary file not shown.
2 changes: 1 addition & 1 deletion Iete_ctf/IETE_CTF/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"src": "IETE_CTF/wsgi.py",
"use": "@vercel/python",
"config": { "maxLambdaSize": "15mb", "runtime": "python3.11.2" }
"config": { "maxLambdaSize": "15mb", "runtime": "python3.9" }
}
],
"routes": [
Expand Down