Mr1337Joker

PrestaShop Founder From ( List IP )

Aug 10th, 2016
536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.49 KB | None | 0 0
  1. <?php
  2. @set_time_limit(0);
  3. error_reporting(0);
  4.  
  5. echo "
  6.                                                        
  7. ,--.   ,--.            ,--.       ,--.                  
  8. |   `.'   |,--.--.     |  | ,---. |  |,-. ,---. ,--.--.
  9. |  |'.'|  ||  .--',--. |  || .-. ||     /| .-. :|  .--'
  10. |  |   |  ||  |   |  '-'  /' '-' '|  \  \\   --.|  |    
  11. `--'   `--'`--'    `-----'  `---' `--'`--'`----'`--'    
  12.                                                        
  13. \n\n";
  14. echo "\n==========================================================\n".
  15.      "|| Welcome To PrestaShop Extract Site From List IP      ||\n".
  16.      "==========================================================\n".
  17.      "|| Coded By : MrJoker - Libyan Attacker                 ||\n".
  18.      "==========================================================\n".
  19.      "|| Skype : live:mr9_9 - Face : 1337MrJoker              ||\n".
  20.      "==========================================================\n".
  21.      "|| Usage : php {$argv[0]}                      ||\n".
  22.      "==========================================================\n";
  23.  
  24. echo "Enter List IP : ";
  25. $ips=trim(fgets(STDIN,1024));  
  26. $d=@file($ips);
  27. $t=count($d);  
  28. if(!$d){  
  29.   echo"[-] No File Found";  
  30. exit();  
  31. }  
  32. if($t == 0){  
  33.   echo"[-] No IP Found";  
  34.   exit();  
  35. }  
  36. echo "\n[+] Loded [ $t ] IP\n";  
  37. foreach($d as $vs){  
  38. echo"\n[#] Start With $vs \n";
  39. $vs = trim($vs);
  40. $sites = bingReverse($vs);
  41. echo "\n\t Total Site Loaded : ".count($sites)."\n\n";
  42. foreach($sites as $site){
  43. $getcontents=@get_source($site);
  44. echo "[#] Scaning : $site\n";
  45. if (preg_match('#PrestaShop#i', $getcontents)) {
  46.        
  47.         echo "[+] PrestaShop Site = $site "."\n";
  48.                 echo "\n";
  49.                 $fopen = fopen("PrestaShop.txt","a+");
  50.                 fwrite($fopen,"$site"."\n");
  51.                 fclose($fopen);
  52.         } else {
  53.                 echo "\n";
  54.                 echo "[-] Not PrestaShop"."\n";
  55.                 echo "\n";
  56.  
  57.         }
  58. }
  59. }
  60. function bingReverse($ip){
  61.     $ch = curl_init();
  62.     $i = 1;
  63.     while($i){
  64.         curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  65.         curl_setopt($ch, CURLOPT_URL, "http://www.bing.com/search?q=ip%3A$ip&first=$i");
  66.         curl_setopt($ch, CURLOPT_USERAGENT, 'msnbot/1.0 (+http://search.msn.com/msnbot.htm)');
  67.         curl_setopt($ch, CURLOPT_ENCODING, "gzip, deflate, compress");
  68.         $data = curl_exec($ch);
  69.         preg_match_all('/<h2><a href="(.*?)"/', $data, $matches);
  70.         $links = array_unique($matches[1]);
  71.         foreach($links as $link){
  72.             $allLinks[] = correctit($link);
  73.         }
  74.         if(!preg_match('#"sw_next"#', $data)) break;
  75.         $i+=10;
  76.     }
  77.     curl_close($ch);
  78.     if(!empty($allLinks) && is_array($allLinks)){
  79.         return array_unique($allLinks);
  80.     }
  81. }
  82. function correctit($http){
  83.     if((strpos(trim($http), "http://") === 0) || (strpos(trim($http), "https://") === 0)){
  84.         return parse_url($http, PHP_URL_HOST);
  85.     }else{  return trim($http); }
  86. }      
  87. function get_source($link, $safemode = false, $agent){
  88.     if($safemode === true) sleep(1);
  89.     if(!$agent){ $agent='Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'; }
  90.     if(!function_exists('curl_init')){
  91.         return file_get_contents($link);
  92.     }else{
  93.         $ch = curl_init();
  94.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  95.         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  96.         curl_setopt($ch, CURLOPT_URL, $link);
  97.         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  98.         curl_setopt($ch, CURLOPT_USERAGENT, $agent);
  99.         curl_setopt($ch, CURLOPT_ENCODING, 0);
  100.         curl_setopt($ch, CURLOPT_TIMEOUT, 30);
  101.         $data = curl_exec($ch);
  102.         curl_close($ch);
  103.        
  104.         return $data;
  105.     }
  106. }
  107. ?>
Advertisement
Add Comment
Please, Sign In to add comment