Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- switch($_GET['page']) {
- case 'default':
- default:
- echo "<p>Welcome to our website about infosec. It's still under construction, but you can begin to browse some pages!</p>";
- break;
- case 'introduction':
- echo "<p>Our website will introduce some new vulnerabilities. Let's check it out later!</p>";
- break;
- case 'privacy':
- echo "<p>This website is unbreakable, so don't worry when contacting us about some new vulnerabilities!</p>";
- break;
- case 'contactus':
- echo "<p>You can't contact us for the moment, but it will be available later.</p>";
- $_SESSION['challenge'] = rand(100000,999999);
- break;
- case 'captcha':
- if(isset($_SESSION['challenge'])) echo $_SESSION['challenge'];
- // Will make an image later
- touch($_SESSION['challenge']);
- break;
- case 'captcha-verify':
- // verification functions take a file for later, when we'll provide more way of verification
- function verifyFromString($file, $response) {
- if($_SESSION['challenge'] === $response) return true;
- else return false;
- }
- // Captcha from math op
- function verifyFromMath($file, $response) {
- if(eval("return ".$_SESSION['challenge']." ;") === $response) return true;
- else return false;
- }
- if(isset($_REQUEST['answer']) && isset($_REQUEST['method']) && function_exists($_REQUEST['method'])){
- $_REQUEST['method']("./".$_SESSION['challenge'], $_REQUEST['answer']);
- }
- break;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement