SHARE
TWEET

Untitled

a guest Jun 23rd, 2011 31,807 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. // lulzhunter.php - by th3j35t3r
  4.  
  5. // Linux only really.
  6. // This is a PHP Command line script.
  7. // So you are gonna need PHP5 and PHP5-CLI
  8. // If ya don't got that you can get em using this (on Ubuntu):
  9. // 'sudo apt-get install php5 php5-cli'
  10. // Then from your shell just execute 'php lulzhunter.php'
  11. // it's quick n dirty (therefore slow) - but will get the job done
  12.  
  13.  
  14. $sIP1 = '124.217.224.0';
  15. $sIP2 = '124.217.255.255';
  16.  
  17.  
  18.  
  19. echo "Scanning for Lulz....\n";
  20.  
  21. // the scouty bit;
  22.  
  23. $aIPList = array();
  24. if ((ip2long($sIP1) !== -1) && (ip2long($sIP2) !== -1)) // As of PHP5, -1 => False
  25.  {
  26.  for ($lIP = ip2long($sIP1) ; $lIP <= ip2long($sIP2) ; $lIP++)
  27.   {
  28.   $aIPList[] = long2ip($lIP);
  29.  
  30. // the findy bit
  31.  
  32.  
  33. $TargetIP = long2ip($lIP);
  34.  
  35. $url         = $TargetIP;
  36. $socket       = ( bool )false;
  37. $error      = ( bool )false;
  38.  
  39. $socket = @fsockopen( $url, 80, $errno, $errstr, 10 ) or $error = ( bool )true;
  40.  
  41. if ( ( $socket ) && ( !$error ) )
  42. {
  43.  
  44. $urlcheckresponse = @file_get_contents("http://".$TargetIP);
  45.  
  46. $haystack = $urlcheckresponse;
  47.  
  48. $needle = "Lulz";
  49.  
  50. $pos = strpos($haystack,$needle);
  51. if($pos === false) {
  52.  // string needle NOT found in haystack
  53. $match = "negatory";
  54. echo ".";
  55. }
  56. else {
  57.  
  58. $match = "affirmative";
  59.  
  60. echo "\n\n";
  61.  
  62. echo "Lulz Server found right here: ".$TargetIP;
  63.  
  64. echo "\n\n";
  65.  
  66. echo "Make sure you let @th3j35t3r know on Twitter. TY. Peace and Stay Frosty";
  67.  
  68. echo "\n\n";
  69.  
  70. exit();
  71.  
  72.  
  73.  
  74. }
  75.  
  76. }
  77.  
  78.  
  79. }
  80.  
  81.  
  82.  
  83.  
  84.  
  85.   }
  86.  
  87. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top