Advertisement
e4ch

page_source

Jan 22nd, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 4.16 KB | None | 0 0
  1. <?php if(isset($_GET['hl'])){ highlight_file(__FILE__); exit; }
  2.    error_reporting(0); session_start();  
  3.    // Anti XSS filter
  4.    $_REQUEST = array_map("strip_tags", $_REQUEST);
  5.    // For later, when we will store infos about visitors.
  6.    chdir("tmp");
  7. ?>
  8. <!DOCTYPE html>
  9. <html>
  10.     <head>
  11.         <title>Work in progress...</title>
  12.         <meta charset="utf-8" />
  13.         <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  14.         <style>
  15.             body {
  16.                 background-color: #aaa;
  17.                 color:#fff;
  18.             }
  19.              
  20.             .page {
  21.                 width: 50%;
  22.                 margin: 0 auto;
  23.                 margin-top: 75px;
  24.             }
  25.              
  26.              
  27.             .menu ul li {
  28.                 display:inline-block;
  29.                 vertical-align:top;
  30.                 margin-right: 30px;
  31.                  
  32.             }
  33.         </style>
  34.     </head>
  35.     <body>
  36.         <div class="page">
  37.             <div class="menu">
  38.                 <ul>
  39.                     <li><a href="?page=default">Home</a></li>
  40.                     <li><a href="?page=introduction">Introduction</a></li>
  41.                     <li><a href="?page=privacy">Privacy</a></li>
  42.                     <li><a href="?page=contactus">Contact</a></li>
  43.                 </ul>
  44.             </div>
  45.              
  46.             <div class="content">
  47.                 <?php
  48.                        switch($_GET['page']) {
  49.                            case 'default':
  50.                            default:
  51.                                echo "<p>Welcome to our website about infosec. It's still under construction, but you can begin to browse some pages!</p>";
  52.                                 break;
  53.                             case 'introduction':
  54.                                 echo "<p>Our website will introduce some new vulnerabilities. Let's check it out later!</p>";
  55.                                 break;
  56.                             case 'privacy':
  57.                                 echo "<p>This website is unbreakable, so don't worry when contacting us about some new vulnerabilities!</p>";
  58.                                 break;
  59.                             case 'contactus':
  60.                                 echo "<p>You can't contact us for the moment, but it will be available later.</p>";
  61.                                 $_SESSION['challenge'] = rand(100000,999999);
  62.                                 break;
  63.                             case 'captcha':
  64.                                 if(isset($_SESSION['challenge'])) echo $_SESSION['challenge'];
  65.                                 // Will make an image later
  66.                 touch($_SESSION['challenge']);
  67.                                 break;
  68.                             case 'captcha-verify':
  69.                 // verification functions take a file for later, when we'll provide more way of verification
  70.                                 function verifyFromString($file, $response) {
  71.                                     if($_SESSION['challenge'] === $response) return true;
  72.                                     else return false;
  73.                                 }
  74.                                  
  75.                                 // Captcha from math op
  76.                                 function verifyFromMath($file, $response) {
  77.                                     if(eval("return ".$_SESSION['challenge']." ;") === $response) return true;
  78.                                     else return false;
  79.                                 }
  80.                                 if(isset($_REQUEST['answer']) && isset($_REQUEST['method']) && function_exists($_REQUEST['method'])){
  81.                                    $_REQUEST['method']("./".$_SESSION['challenge'], $_REQUEST['answer']);
  82.                                 }
  83.                                 break;
  84.  
  85.                         }
  86.                 ?>
  87.             </div>
  88.         </div>
  89.         <p><a href="/?hl">View code source of the file, to be sure we're secure!</a></p>
  90.         <p><a href="/phpinfo.php">Show our configurations</a></p>
  91.     </body>
  92. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement