Advertisement
Guest User

Untitled

a guest
Feb 14th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.51 KB | None | 0 0
  1. <html>
  2. <head>
  3. <!-- This stuff in the header has nothing to do with the level -->
  4. <link rel="stylesheet" type="text/css" href="http://natas.labs.overthewire.org/css/level.css">
  5. <link rel="stylesheet" href="http://natas.labs.overthewire.org/css/jquery-ui.css" />
  6. <link rel="stylesheet" href="http://natas.labs.overthewire.org/css/wechall.css" />
  7. <script src="http://natas.labs.overthewire.org/js/jquery-1.9.1.js"></script>
  8. <script src="http://natas.labs.overthewire.org/js/jquery-ui.js"></script>
  9. <script src=http://natas.labs.overthewire.org/js/wechall-data.js></script><script src="http://natas.labs.overthewire.org/js/wechall.js"></script>
  10. <script>var wechallinfo = { "level": "natas21", "pass": "<censored>" };</script></head>
  11. <body>
  12. <h1>natas21</h1>
  13. <div id="content">
  14. <p>
  15. <b>Note: this website is colocated with <a href="http://natas21-experimenter.natas.labs.overthewire.org">http://natas21-experimenter.natas.labs.overthewire.org</a></b>
  16. </p>
  17.  
  18. <?
  19.  
  20. function print_credentials() { /* {{{ */
  21.   if($_SESSION and array_key_exists("admin", $_SESSION) and $_SESSION["admin"] == 1) {
  22.     print "You are an admin. The credentials for the next level are:<br>";
  23.     print "<pre>Username: natas22\n";
  24.     print "Password: <censored></pre>";
  25.   } else {
  26.     print "You are logged in as a regular user. Login as an admin to retrieve credentials for natas22.";
  27.   }
  28. }
  29. /* }}} */
  30.  
  31. session_start();
  32. print_credentials();
  33.  
  34. ?>
  35.  
  36. <div id="viewsource"><a href="index-source.html">View sourcecode</a></div>
  37. </div>
  38. </body>
  39. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement