Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <?php
  2.  
  3. if (!isset($_GET['password']) || !is_string($_GET['password'])) {
  4. die("bad password");
  5. }
  6.  
  7. $p = $_GET['password'];
  8.  
  9. if (strlen($p) !== 25) {
  10. die("bad password");
  11. }
  12.  
  13. if (md5($p) !== 'e66c97b8837d0328f3e5522ebb058f85') {
  14. die("bad password");
  15. }
  16.  
  17. // Split the password in five and check the pieces.
  18. // We need to be sure!
  19. $values = array(
  20. 0 => 'e6d9fe6df8fd2a07ca6636729d4a615a',
  21. 5 => '273e97dc41693b152c71715d099a1049',
  22. 10 => 'bd014fafb6f235929c73a6e9d5f1e458',
  23. 15 => 'ab892a96d92d434432d23429483c0a39',
  24. 20 => 'b56a807858d5948a4e4604c117a62c2d'
  25. );
  26.  
  27. for ($i = 0; $i < 25; $i += 5) {
  28. if (md5(substr($p, $i, 5)) !== $values[$i]) {
  29. die("bad password");
  30. }
  31. }
  32.  
  33. die("GW!");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement