Guest User

Untitled

a guest
Jan 13th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <?
  2. include('config/site.php');
  3. if ($_POST['s'] == 1){
  4. $u=$_POST['user'];
  5. $p=$_POST['pass'];
  6. $pass = md5($p.':'.PASSWORD_SALT);
  7.  
  8. $con = mysql_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD);
  9. if (!$con)
  10. {
  11. die('Could not connect: ' . mysql_error());
  12. }
  13.  
  14. mysql_select_db(DB_DATABASE, $con);
  15. mysql_query("UPDATE Users SET uPassword = '$pass'
  16. WHERE uName = '$u'");
  17. mysql_close($con);
  18. echo' There I fixed your stupid. Your new password is "'.$p.'". Don\'t loose it again.<br/>';
  19. }
  20. else
  21. echo'
  22. <html>
  23. <head>
  24. <title>Who says you can\'t fix stupid.</title>
  25. </head>
  26. <body>
  27. <form action="fixstupid.php" method="post">
  28. Username:<input name="user" type="text" /> New Pass:<input name="pass" type="text" />
  29. <input name="s" type="hidden" value="1" /><input name="" type="submit" />
  30. </form>
  31. <body>
  32. <html>
  33. ';
  34. ?>
Add Comment
Please, Sign In to add comment