Created
August 15, 2011 11:45
-
-
Save navinpai/1146079 to your computer and use it in GitHub Desktop.
Lulzhunter - Find Lulzsec's IP from CloudFlare config (by th3j35t3r)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // lulzhunter.php - by th3j35t3r | |
| // Linux only really. | |
| // This is a PHP Command line script. | |
| // So you are gonna need PHP5 and PHP5-CLI | |
| // If ya don't got that you can get em using this (on Ubuntu): | |
| // 'sudo apt-get install php5 php5-cli' | |
| // Then from your shell just execute 'php lulzhunter.php' | |
| // it's quick n dirty (therefore slow) - but will get the job done | |
| $sIP1 = '124.217.224.0'; | |
| $sIP2 = '124.217.255.255'; | |
| echo "Scanning for Lulz....\n"; | |
| // the scouty bit; | |
| $aIPList = array(); | |
| if ((ip2long($sIP1) !== -1) && (ip2long($sIP2) !== -1)) // As of PHP5, -1 => False | |
| { | |
| for ($lIP = ip2long($sIP1) ; $lIP <= ip2long($sIP2) ; $lIP++) | |
| { | |
| $aIPList[] = long2ip($lIP); | |
| // the findy bit | |
| $TargetIP = long2ip($lIP); | |
| $url = $TargetIP; | |
| $socket = ( bool )false; | |
| $error = ( bool )false; | |
| $socket = @fsockopen( $url, 80, $errno, $errstr, 10 ) or $error = ( bool )true; | |
| if ( ( $socket ) && ( !$error ) ) | |
| { | |
| $urlcheckresponse = @file_get_contents("http://".$TargetIP); | |
| $haystack = $urlcheckresponse; | |
| $needle = "Lulz"; | |
| $pos = strpos($haystack,$needle); | |
| if($pos === false) { | |
| // string needle NOT found in haystack | |
| $match = "negatory"; | |
| echo "."; | |
| } | |
| else { | |
| $match = "affirmative"; | |
| Empty File | |
| echo "\n\n"; | |
| echo "Lulz Server found right here: ".$TargetIP; | |
| echo "\n\n"; | |
| echo "Make sure you let @th3j35t3r know on Twitter. TY. Peace and Stay Frosty"; | |
| echo "\n\n"; | |
| exit(); | |
| } | |
| } | |
| } | |
| } | |
| ?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment