cscg24-lolpython

CSCG 2024 Challenge 'Can I Haz Lolpython?'
git clone https://git.sinitax.com/sinitax/cscg24-lolpython
Log | Files | Refs | sfeed.txt

index.php (1559B)


      1<?php
      2session_start();
      3
      4function generateRandomString($length = 24)
      5{
      6  $characters = '0123456789abcdefghijklmnopqrstuvwxyz';
      7  $charactersLength = strlen($characters);
      8  $randomString = '';
      9  for ($i = 0; $i < $length; $i++) {
     10    $randomString .= $characters[rand(0, $charactersLength - 1)];
     11  }
     12  return $randomString;
     13}
     14
     15if (!isset($_SESSION['userid'])) {
     16  $_SESSION['userid'] = generateRandomString();
     17}
     18?>
     19
     20<!doctype html>
     21<html lang="en">
     22
     23<head>
     24  <meta charset="utf-8">
     25  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     26  <meta name="description" content="">
     27  <meta name="author" content="">
     28  <link rel="icon" href="favicon.ico">
     29
     30  <title>LOLPython Transpiler Service</title>
     31
     32  <!-- Bootstrap core CSS -->
     33  <link href="css/bootstrap.min.css" rel="stylesheet">
     34
     35  <link href="css/custom.css" rel="stylesheet">
     36
     37</head>
     38
     39<body>
     40  <!-- Main jumbotron for a primary marketing message or call to action -->
     41 <?php include("form.php") ?>
     42  <footer class="container">
     43    <p>&copy; LOLPython Transpiler Service 2024</p>
     44  </footer>
     45
     46  <!-- Bootstrap core JavaScript
     47    ================================================== -->
     48  <!-- Placed at the end of the document so the pages load faster -->
     49  <script
     50  src="https://code.jquery.com/jquery-3.5.1.min.js"
     51  integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
     52  crossorigin="anonymous"></script>
     53  <script src="js/vendor/popper.min.js"></script>
     54  <script src="js/bootstrap.min.js"></script>
     55  <script src="js/rockstar.js"></script>
     56</body>
     57
     58</html>