Advertisement
e4ch

vulnshop_central_code

Jan 22nd, 2018
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.87 KB | None | 0 0
  1. <?php
  2.         switch($_GET['page']) {
  3.             case 'default':
  4.             default:
  5.                 echo "<p>Welcome to our website about infosec. It's still under construction, but you can begin to browse some pages!</p>";
  6.                 break;
  7.             case 'introduction':
  8.                 echo "<p>Our website will introduce some new vulnerabilities. Let's check it out later!</p>";
  9.                 break;
  10.             case 'privacy':
  11.                 echo "<p>This website is unbreakable, so don't worry when contacting us about some new vulnerabilities!</p>";
  12.                 break;
  13.             case 'contactus':
  14.                 echo "<p>You can't contact us for the moment, but it will be available later.</p>";
  15.                 $_SESSION['challenge'] = rand(100000,999999);
  16.                 break;
  17.             case 'captcha':
  18.                 if(isset($_SESSION['challenge'])) echo $_SESSION['challenge'];
  19.                 // Will make an image later
  20.                 touch($_SESSION['challenge']);
  21.                 break;
  22.             case 'captcha-verify':
  23.                 // verification functions take a file for later, when we'll provide more way of verification
  24.                 function verifyFromString($file, $response) {
  25.                     if($_SESSION['challenge'] === $response) return true;
  26.                     else return false;
  27.                 }
  28.                 // Captcha from math op
  29.                 function verifyFromMath($file, $response) {
  30.                     if(eval("return ".$_SESSION['challenge']." ;") === $response) return true;
  31.                     else return false;
  32.                 }
  33.                 if(isset($_REQUEST['answer']) && isset($_REQUEST['method']) && function_exists($_REQUEST['method'])){
  34.                     $_REQUEST['method']("./".$_SESSION['challenge'], $_REQUEST['answer']);
  35.                 }
  36.                 break;
  37.         }
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement