daily pastebin goal
74%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $ini = parse_ini_file('config.ini');
  3. $link = mysqli_connect($ini['db_host'],$ini['db_user'],$ini['db_password']);
  4. $database = mysqli_select_db($link,$ini['db_name']);
  5.  
  6. $user = $_GET['username'];
  7. $password = $_GET['password'];
  8. $tables = $ini['mybb_usertable'];
  9.  
  10. $sql = "SELECT * FROM ". $tables ." WHERE username = '". mysqli_real_escape_string($link,$user) ."'" ;
  11. $result = $link->query($sql);
  12.  
  13. if ($result->num_rows > 0) {
  14.     // Outputting the rows
  15.     while($row = $result->fetch_assoc())
  16.     {
  17.        
  18.         $password = $row['password'];
  19.         $salt = $row['salt'];
  20.         $plain_pass = $_GET['password'];
  21.         $stored_pass = md5(md5($salt).md5($plain_pass));
  22.        
  23.         function Redirect($url, $permanent = false)
  24.         {
  25.             if (headers_sent() === false)
  26.             {
  27.                 header('Location: ' . $url, true, ($permanent === true) ? 301 : 302);
  28.             }
  29.         exit();
  30.         }
  31.        
  32.         if($stored_pass != $row['password'])
  33.         {
  34.             echo "0"; // Wrong pass, user exists
  35.         }
  36.         else
  37.         {
  38.             echo "1"; // Correct pass
  39.         }
  40.     }
  41. }
  42. else
  43. {
  44.     echo "2"; // User doesn't exist
  45. }
  46.  
  47.  
  48.  
  49. //-----------------------------------------------------
  50. // Coded by /id/Thaisen! Free loader source
  51. // https://github.com/ThaisenPM/Cheat-Loader-CSGO-2.0
  52. // Note to the person using this, removing this
  53. // text is in violation of the license you agreed
  54. // to by downloading. Only you can see this so what
  55. // does it matter anyways.
  56. // Copyright © ThaisenPM 2017
  57. // Licensed under a MIT license
  58. // Read the terms of the license here
  59. // https://github.com/ThaisenPM/Cheat-Loader-CSGO-2.0/blob/master/LICENSE
  60. //-----------------------------------------------------
  61. ?>
  62.  
  63. <head>
  64. <title>Checking login info</title>
  65. </head>
RAW Paste Data
Top