Advertisement
Guest User

Untitled

a guest
Apr 15th, 2013
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.12 KB | None | 0 0
  1. <?php
  2. /*
  3.     Made by IOn savage(9/06/12)
  4. */
  5. echo "Steam Resolver->Version:1.0 - Made by IOn savage(9/06/12)<br><br>";
  6. error_reporting(0);
  7.  
  8. function contains($substring, $string) {
  9.         return (strpos($string, $substring) === false ? false : true);
  10. }
  11. function ping($ip) {
  12.     $status = "";
  13.     if($fp = fsockopen($ip,80,$errCode,$errStr,0.5)) {  
  14.        $status = "Alive";
  15.     } else {
  16.        $status = "Dead";
  17.     }
  18.     fclose($fp);
  19.     return $status;
  20. }
  21. $steamid = mysql_escape_string($_GET['steamid']);
  22.  
  23. $steamid = strlen($steamid) != 0 ? $steamid : die("Must put a steamid");
  24. $steamid = contains("STEAM", $steamid) == false ? die("Must put a steamid") : $steamid;
  25.  
  26. echo "Searching for IP's Related to:(".$steamid.")<br><br>";
  27.  
  28.  
  29. function get_data($URL) {
  30.     $user_agent = 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)';
  31.     $ch = curl_init();
  32.     curl_setopt($ch, CURLOPT_URL, $URL);
  33.     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  34.     curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
  35.     curl_setopt($ch, CURLOPT_HEADER, 0);
  36.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  37.     curl_setopt($ch, CURLOPT_REFERER, 'http://www.google.com/');
  38.     $data = curl_exec($ch);
  39.     curl_close($ch);
  40.     return $data;
  41. }
  42.  
  43. $getIDInfo = get_data("http://steamidconverter.com/".$steamid);
  44. $getIDInfoArray = split(" ",$getIDInfo, -1);
  45. $getIDInfoCount = count($getIDInfoArray);
  46.  
  47. for($x = 0; x < $getIDInfoCount; ++$x) {
  48.     if(contains("name=\"keywords\"", $getIDInfoArray[$x])) {
  49.         $t = 0;
  50.         while(strlen($profileID) != 17) {
  51.             $profileID = str_replace(",","",$getIDInfoArray[$x + $t]);
  52.             $t++;
  53.         }
  54.         $steamURL = "http://steamcommunity.com/profiles/";
  55.         echo "Click Image to go to profile page!<br>";
  56.         echo "<a href=\"".$steamURL.$profileID."\" title=\"ProfileLink\"><img src=\"http://steamsignature.com/classic-".$profileID.".png\"/></a>";
  57.         break;
  58.     }
  59.    
  60. }
  61.  
  62.  
  63. $searchPage = get_data("http://www.google.com/cse?q=".$steamid."&hl=en&num=2000&client=google-csbe");
  64. $searchArray = split(" ",$searchPage, -1);
  65. $searchCount = count($searchArray);
  66. $uniqueArray = array();
  67. $n = 0;
  68.  
  69. for($i = 0; $i < $searchCount; ++$i) {
  70.     if(contains("address",$searchArray[$i])) {
  71.         if(strlen($searchArray[$i + 1]) == 2 && strlen($searchArray[$i + 2]) > 3 && strlen($searchArray[$i + 2]) < 20 && strlen($searchArray[i + 5]) < 20) {
  72.             if(!in_array($searchArray[$i + 2], $uniqueArray) && !contains("<br>",$searchArray[$i]) && strlen($searchArray[$i + 5]) > 3) {
  73.                 if(contains("Invoked", $searchArray[$i + 5]) === false) {
  74.                     $Date = contains("-", $searchArray[$i + 5]) == true ? str_replace("-", "/", $searchArray[$i + 5]) : $searchArray[$i + 5];
  75.                     $DateSplit = split("/",$Date, -1);
  76.                     $DateLen = strlen($DateSplit[2]) > 2 ? str_replace("20", "", $DateSplit[2]) : $DateSplit[2];
  77.                     if($DateSplit[0] > 12) {
  78.                         $Date = $DateSplit[1]."/".$DateSplit[0]."/".$DateLen;
  79.                     } else {
  80.                         $Date = $DateSplit[0]."/".$DateSplit[1]."/".$DateLen;
  81.                     }
  82.                    
  83.                 } else {
  84.                     $Date = "Unknown";
  85.                 }
  86.                 $Date = contains(",", $Date) == true ? str_replace(",","",$Date) : $Date;
  87.                 $IP = explode(".",$searchArray[$i + 2]);
  88.                 $IP = $IP[0].".".$IP[1].".".$IP[2].".".$IP[3];
  89.                 $Country = $searchArray[$i + 1];
  90.                 $Info = "Date: ".$Date." || (".$Country.") ".$IP.", Status: ".ping($IP);
  91.                 if(contains("...",$Info) === false) {                
  92.                     echo "<br>$Info";
  93.                     array_push($uniqueArray, $searchArray[$i + 2]);
  94.                     $n++;
  95.                 }
  96.             } else {
  97.                 $dupeCount++;
  98.             }    
  99.         }
  100.     }
  101.    
  102. }
  103. if($n == 0) {
  104.     print("<br>Sorry, was not able to find a record of this SteamID ($steamid)</br>");
  105. } else {
  106.     print("<br><br>Found $n unique IP's and ".$dupeCount." duplicates!");
  107. }
  108.  
  109. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement