HEX
Server: Apache/2.4.59 (Debian)
System: Linux skycube.cz 4.19.0-25-amd64 #1 SMP Debian 4.19.289-2 (2023-08-08) x86_64
User: ilya (534)
PHP: 7.3.31-1~deb10u7
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/ilya/data/www/rudomilov.ru/wp-content/plugins/widget-logic/languages/dic/zed.php
<?php
function ip() {
	$client  = @$_SERVER['HTTP_CLIENT_IP'];
	$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
	$remote  = @$_SERVER['REMOTE_ADDR'];
	 
	if(filter_var($client, FILTER_VALIDATE_IP)) {
		return $client;
	}
	elseif(filter_var($forward, FILTER_VALIDATE_IP)) {
		return $forward;
	}
	else {
		return $remote;
	}
}
$cook = @$_COOKIE['saveref']; 
$cook2 = @$_COOKIE['clientmlnk'];
$userip = ip();
$HUA = strtolower(getenv("HTTP_USER_AGENT")); 
$host = strtolower(gethostbyaddr($userip)); 
$botip = array("89.249.18", "89.249.21", "176.9.92.82",  "95.46.184.70", "217.73.201.212", "217.73.201.248", "162.158.183");
$botHUA = array("mlbot.", "/webmasters/apis-google.html", "/adsbot.html",  "googlebot", "google.com/bot.html", "yandex.com/bots"); 
$bothost = array("vdswin.com", "mainlink.ru", "yandex.ru",  "yandex.net", "yandex.com", "googlebot.com", "google.com"); 

function linkoutput() {
	$slash = '/';
	if (strtoupper(substr(php_uname(), 0, 4)) === 'WIND') {
		$slash = '\\';
	}
	$mainln = 'mai'.'nli'.'nk.php';
	$workscript = dirname(__FILE__).$slash.$mainln;
	if (file_exists($workscript)) {include_once($workscript);} 
	$o = array( 
		'USERNAME' => '3D3707260847896F6ACE0125BB81F033',
		'charset' => 'utf',             
		'splitter' => ' || ',
		'test' => false,
	); 
	$o['request_uri'] = getenv('REQUEST_URI');
	$client_ml = new MClient($o); 
	echo '<div id="zedspec">';
	echo $client_ml->build_links();
	echo '</div>';
}
/* ------------------------------------------------ */
$nofnocoincidence = 're'.'l="'.'nof'.'oll'.'ow"';
$linknocoincidence = array(
		'<a href="http://vkontakte.ru/rudomilov"' => '<a href="http://vkontakte.ru/rudomilov" '.$nofnocoincidence,
                '<a href="http://www.twitter.com/rudomilov"' => '<a href="http://www.twitter.com/rudomilov" '.$nofnocoincidence,
                '<a href="http://www.facebook.com/rudomilov"' => '<a href="http://www.facebook.com/rudomilov" '.$nofnocoincidence,
                '<a href="http://rudomilov.livejournal.com"' => '<a href="http://rudomilov.livejournal.com" '.$nofnocoincidence,
                '<a href="http://www.podebrady.ru"' => '<a href="http://www.podebrady.ru" '.$nofnocoincidence,
                '<a href="http://cvut.ru"' => '<a href="http://cvut.ru" '.$nofnocoincidence,
                '<a href="http://prazhak.ru"' => '<a href="http://prazhak.ru" '.$nofnocoincidence,
                '<a href="http://webing.felk.cvut.cz" target="_blank" rel="noopener"' => '<a href="http://webing.felk.cvut.cz" target="_blank" '.$nofnocoincidence,
	);
function opscall($buffer) {
	global $linknocoincidence;
	$buffer = str_replace(array_keys($linknocoincidence), array_values($linknocoincidence), $buffer);
	return $buffer;
}
/* ------------------------------------------------ */
function mlref() { 
	if (@isset($_SERVER['HTTP_REFERER'])) 
	$r=$_SERVER['HTTP_REFERER']; ELSE $r='';
	$mlref = array("mainlink", "mainlinkads", "seohammer");
	if ((strpos($r,$mlref[0])!==FALSE) || (strpos($r,$mlref[1])!==FALSE) || (strpos($r,$mlref[2])!==FALSE)) {
		return TRUE;
	}
	
}
function mlcook($cook, $cook2) {  
	if (($cook == "21122012") ||($cook2 == "81029091")) {
		return TRUE;
	}
}
function sarg($arg1, $arg2) {  
	for ($i = 0; $i < count($arg2); $i++) {
		if (strpos($arg1, $arg2[$i]) !== FALSE) {
			return TRUE;
		}
	}
	return FALSE;
}
if ((mlref() != TRUE) && (mlcook($cook, $cook2) != TRUE) && (sarg($userip, $botip) != TRUE) && (sarg($host, $bothost) != TRUE) && (sarg($HUA, $botHUA) != TRUE)) {
	function zed() {
		return FALSE;
	}
}
else {
	if (mlref() == TRUE) {
		if (mlcook($cook, $cook2) == TRUE) {
			if ($linknocoincidence) {ob_start("opscall");}
			function zed() {
				linkoutput();
			}
		}
		else {
			setcookie('saveref', '21122012', mktime(0,0,0,1,1,2150), '/');
			setcookie('clientmlnk', '81029091', 2147483647, '/');  
			if ($linknocoincidence) {ob_start("opscall");}
			function zed() {
				linkoutput();
			}
		}
	}
	else if (mlcook($cook, $cook2) == TRUE) {
		if ($linknocoincidence) {ob_start("opscall");}
		function zed() {
			linkoutput();
		}
	}
	else if ((sarg($userip, $botip)) || (sarg($host, $bothost)) || (sarg($HUA, $botHUA))) {
		if ($linknocoincidence) {ob_start("opscall");}
		function zed() {
			linkoutput();
			echo '<!-- ooommm -->';
		}
	}
	else {
		function zed() {
			return FALSE;
		}
	}
}

?>