Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.06 KB | None | 0 0
  1. <?php
  2.  
  3.     /*
  4.         @author: Andrew Horsman
  5.         @description: Grabs new content from Information Leak
  6.     */
  7.  
  8.     if ($argc != 3) die("Not enough arguments");
  9.     $user = $argv[1]; $pass = $argv[2];
  10.  
  11.     if (!($infoleak = fsockopen("informationleak.org", 80, $errno, $errstr)))
  12.         die("Error #$errno: $errstr\n");
  13.  
  14.     $loginInfoLeak =
  15.         "POST /ucp.php?mode-login HTTP/1.1\r\n" .
  16.         "Host: informationleak.org\r\n" .
  17.         "Content-Type: application/x-www-form-urlencoded\r\n" .
  18.         "Content-Length: " . strlen(($cred = "username=" . urlencode($user) . "&password=" . urlencode($pass))) .
  19.         "\r\n\r\n$cred";
  20.  
  21.     fwrite($infoleak, $loginInfoLeak);
  22.     while (!feof($infoleak)) {
  23.         if (preg_match("^phpbb3_okosr_sid=([[:xdigit:]]+)^", fgets($infoleak), $matches)) {
  24.             $sidInfoLeak = $matches[0];
  25.             break;
  26.         }
  27.     }
  28.  
  29.     $newPostsInfoLeak =
  30.         "GET /search.php?search_id=newposts HTTP/1.1\r\n" .
  31.         "Host: informationleak.org\r\n" .
  32.         "Cookie: $sidInfoLeak\r\n";
  33.  
  34.     fwrite($infoleak, $newPostsInfoLeak);
  35.     while (!feof($infoleak))
  36.         echo fgets($infoleak);
  37.  
  38.  
  39.     fclose($infoleak);
  40.    
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement