Advertisement
Guest User

Untitled

a guest
Oct 6th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 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": "natas14", "pass": "<censored>" };</script></head>
  11. <body>
  12. <h1>natas14</h1>
  13. <div id="content">
  14. <?
  15. if(array_key_exists("username", $_REQUEST)) {
  16. $link = mysql_connect('localhost', 'natas14', '<censored>');
  17. mysql_select_db('natas14', $link);
  18.  
  19. $query = "SELECT * from users where username=\"".$_REQUEST["username"]."\" and password=\"".$_REQUEST["password"]."\"";
  20. if(array_key_exists("debug", $_GET)) {
  21. echo "Executing query: $query<br>";
  22. }
  23.  
  24. if(mysql_num_rows(mysql_query($query, $link)) > 0) {
  25. echo "Successful login! The password for natas15 is <censored><br>";
  26. } else {
  27. echo "Access denied!<br>";
  28. }
  29. mysql_close($link);
  30. } else {
  31. ?>
  32.  
  33. <form action="index.php" method="POST">
  34. Username: <input name="username"><br>
  35. Password: <input name="password"><br>
  36. <input type="submit" value="Login" />
  37. </form>
  38. <? } ?>
  39. <div id="viewsource"><a href="index-source.html">View sourcecode</a></div>
  40. </div>
  41. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement