Advertisement
Mr1337Joker

PrestaShop Founder From Server IP

Jul 22nd, 2016
1,411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.23 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 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 "Server Target IP : ";
  25. $ip=trim(fgets(STDIN,1024));
  26. $sites = bingReverse($ip);
  27. echo "\n\t Total site loaded : ".count($sites)."\n\n";
  28. foreach($sites as $site){
  29. $getcontents=@get_source($site);
  30. echo "[#] Scaning : $site\n";
  31. if (preg_match('#PrestaShop#i', $getcontents)) {
  32.        
  33.         echo "[+] PrestaShop Site = $site "."\n";
  34.                 echo "\n";
  35.                 $fopen = fopen("PrestaShop.txt","a+");
  36.                 fwrite($fopen,"$site"."\n");
  37.                 fclose($fopen);
  38.         } else {
  39.                 echo "\n";
  40.                 echo "[-] Not PrestaShop"."\n";
  41.                 echo "\n";
  42.  
  43.         }
  44. }
  45. function bingReverse($ip){
  46.     $ch = curl_init();
  47.     $i = 1;
  48.     while($i){
  49.         curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  50.         curl_setopt($ch, CURLOPT_URL, "http://www.bing.com/search?q=ip%3A$ip&first=$i");
  51.         curl_setopt($ch, CURLOPT_USERAGENT, 'msnbot/1.0 (+http://search.msn.com/msnbot.htm)');
  52.         curl_setopt($ch, CURLOPT_ENCODING, "gzip, deflate, compress");
  53.         $data = curl_exec($ch);
  54.         preg_match_all('/<h2><a href="(.*?)"/', $data, $matches);
  55.         $links = array_unique($matches[1]);
  56.         foreach($links as $link){
  57.             $allLinks[] = correctit($link);
  58.         }
  59.         if(!preg_match('#"sw_next"#', $data)) break;
  60.         $i+=10;
  61.     }
  62.     curl_close($ch);
  63.     if(!empty($allLinks) && is_array($allLinks)){
  64.         return array_unique($allLinks);
  65.     }
  66. }
  67. function correctit($http){
  68.     if((strpos(trim($http), "http://") === 0) || (strpos(trim($http), "https://") === 0)){
  69.         return parse_url($http, PHP_URL_HOST);
  70.     }else{  return trim($http); }
  71. }      
  72. function get_source($link, $safemode = false, $agent){
  73.     if($safemode === true) sleep(1);
  74.     if(!$agent){ $agent='Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'; }
  75.     if(!function_exists('curl_init')){
  76.         return file_get_contents($link);
  77.     }else{
  78.         $ch = curl_init();
  79.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  80.         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  81.         curl_setopt($ch, CURLOPT_URL, $link);
  82.         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  83.         curl_setopt($ch, CURLOPT_USERAGENT, $agent);
  84.         curl_setopt($ch, CURLOPT_ENCODING, 0);
  85.         curl_setopt($ch, CURLOPT_TIMEOUT, 30);
  86.         $data = curl_exec($ch);
  87.         curl_close($ch);
  88.        
  89.         return $data;
  90.     }
  91. }
  92. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement