HEX
Server: Apache/2.4.6 (CloudLinux) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16
System: Linux s1.gigspace.ru 3.10.0-962.3.2.lve1.5.77.el7.x86_64 #1 SMP Mon Dec 12 07:06:14 EST 2022 x86_64
User: samok164 (6070)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /var/www/samok164/data/www2/culture-style.ru/rzgn/r4_enumslots.php
<?
	if (empty($_GET['time']) || empty($_GET['key']))
	{
		die('Signature required.');
	}

	if (abs($_GET['time'] - time()) > 600)
	{
		die('Signature expired ('.abs($_GET['time'] - time()).' sec).');
	}
	
	$url = ereg_replace("&key=[0-9a-fA-F]*$", "", $_SERVER['REQUEST_URI']);

	if (md5('r4_gluidyb97ascgaha382753jhsdgamsngad087w34'.'http://'.$_SERVER['HTTP_HOST'].$url) != $_GET['key'] )
	{
		die('Incorrect key '.$_GET['key'].'. Host '.$_SERVER['HTTP_HOST']);
	}
	
	

	$r4_log_file = $_SERVER['DOCUMENT_ROOT'].'/rzgn/r4_access.log';
	
	$pages = Array ();	
	$now = time();
	
	if (file_exists($r4_log_file) && filesize($r4_log_file) > 0)
	{
		$lines = file($r4_log_file);
		
		foreach ($lines as $line)
		{
			list ($date, $url, $slots) = explode("\t", trim($line));
			
			if (!isset($pages[$url])) $pages[$url] = 0;
			
			if ($date < $now - 300)
			{
				if ($slots > $pages[$url]) $pages[$url] = $slots;
			}
			else $pages[$url] = $slots;
		}
	
		unlink($r4_log_file);
	}
	
	echo serialize($pages);
?>