summaryrefslogtreecommitdiffstats
path: root/chall/src/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'chall/src/index.php')
-rw-r--r--chall/src/index.php58
1 files changed, 58 insertions, 0 deletions
diff --git a/chall/src/index.php b/chall/src/index.php
new file mode 100644
index 0000000..c0ead91
--- /dev/null
+++ b/chall/src/index.php
@@ -0,0 +1,58 @@
+<?php
+session_start();
+
+function generateRandomString($length = 24)
+{
+ $characters = '0123456789abcdefghijklmnopqrstuvwxyz';
+ $charactersLength = strlen($characters);
+ $randomString = '';
+ for ($i = 0; $i < $length; $i++) {
+ $randomString .= $characters[rand(0, $charactersLength - 1)];
+ }
+ return $randomString;
+}
+
+if (!isset($_SESSION['userid'])) {
+ $_SESSION['userid'] = generateRandomString();
+}
+?>
+
+<!doctype html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <meta name="description" content="">
+ <meta name="author" content="">
+ <link rel="icon" href="favicon.ico">
+
+ <title>LOLPython Transpiler Service</title>
+
+ <!-- Bootstrap core CSS -->
+ <link href="css/bootstrap.min.css" rel="stylesheet">
+
+ <link href="css/custom.css" rel="stylesheet">
+
+</head>
+
+<body>
+ <!-- Main jumbotron for a primary marketing message or call to action -->
+ <?php include("form.php") ?>
+ <footer class="container">
+ <p>&copy; LOLPython Transpiler Service 2024</p>
+ </footer>
+
+ <!-- Bootstrap core JavaScript
+ ================================================== -->
+ <!-- Placed at the end of the document so the pages load faster -->
+ <script
+ src="https://code.jquery.com/jquery-3.5.1.min.js"
+ integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
+ crossorigin="anonymous"></script>
+ <script src="js/vendor/popper.min.js"></script>
+ <script src="js/bootstrap.min.js"></script>
+ <script src="js/rockstar.js"></script>
+</body>
+
+</html> \ No newline at end of file