Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1.  <?php
  2.  
  3. require_once 'flag.php';
  4.  
  5. if (!empty($_SERVER['QUERY_STRING'])) {
  6.     $query = $_SERVER['QUERY_STRING'];
  7.     $res = parse_str($query);
  8.     if (!empty($res['action'])){
  9.         $action = $res['action'];
  10.     }
  11. }
  12.  
  13. if ($action === 'auth') {
  14.     if (!empty($res['user'])) {
  15.         $user = $res['user'];
  16.     }
  17.     if (!empty($res['pass'])) {
  18.         $pass = $res['pass'];
  19.     }
  20.  
  21.     if (!empty($user) && !empty($pass)) {
  22.         $hashed_password = hash('md5', $user.$pass);
  23.     }
  24.     if (!empty($hashed_password) && $hashed_password === 'c019f6e5cd8aa0bbbcc6e994a54c757e') {
  25.         echo $flag;
  26.     }
  27.     else {
  28.         echo 'fail :(';
  29.     }
  30. }
  31. else {
  32.     highlight_file(__FILE__);
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement