HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux vgpudjuxex 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User: cod67 (1010)
PHP: 8.2.29
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: /var/www/cod67/data/www/cod67.ru/public_html/kod-admin_old.php
<?php
	$dir = __DIR__;
	
	$login = $_GET['login'];
	
	$newCXode = $_GET['num'];
	$newCXodeP = $_GET['codepswd'];
	
	$domen = $_GET['domen'];
	
	$domen = explode(".", $domen)[0];
	
	$file = '/home/mahaon5/700.zp.ua/'.$domen.'/kode.txt';
	
	$code = file_get_contents($file);
	
	if(!empty($newCXode)){
		if($newCXodeP == 'stalmokas1573'){
			$dir = __DIR__;
			$fil = $file;
			
			$conten = '<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
	(function (d, w, c) {
		(w[c] = w[c] || []).push(function() {
			try {
				w.yaCounter'.$newCXode.' = new Ya.Metrika({
					id:'.$newCXode.',
			clickmap:true,
					trackLinks:true,
					accurateTrackBounce:true
				});
			} catch(e) { }
		});

		var n = d.getElementsByTagName("script")[0],
			s = d.createElement("script"),
			f = function () { n.parentNode.insertBefore(s, n); };
			s.type = "text/javascript";
			s.async = true;
			s.src = "https://mc.yandex.ru/metrika/watch.js";

		if (w.opera == "[object Opera]") {
			d.addEventListener("DOMContentLoaded", f, false);
		} else { f(); }
	})(document, window, "yandex_metrika_callbacks");
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/'.$newCXode.'" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->';
		
			$fp = fopen($fil, "w");
	 
			// записываем в файл текст
			fwrite($fp, $conten);
			 
			// закрываем
			fclose($fp);
		}
	}
	

	if($login == "login"){
		
		$paswd = $_POST['paswd'];
	
	if(!empty($paswd)){
		
		if($paswd == 'stalmokas1573'){
			session_start();
			$_SESSION['access']=1;
			header('Location: /kod-admin.php');
		}else{
			header('Location: /kod-admin.php?login=login');
		}
		
	}
		
		
		?>
		<form method="POST">
		  <input type="password" placeholder="Пароль" name="paswd">
		  <input type="submit">
		</form>
		<?php
	}else{
	
	$paswd = $_POST['paswd'];
	
	if(!empty($paswd)){
		if($paswd == 'stalmokas1573'){
			session_start();
			$_SESSION['access']=1;
			header('Location: /kod-admin.php');
		}else{
			header('Location: /kod-admin.php?login=login');
		}
		
	}
	session_start();
	if(!isset($_SESSION['access']) || $_SESSION['access']!=1)
		header('Location: /kod-admin.php?login=login');
	
	
	$Newcode = $_POST['code'];

	
	if(!empty($Newcode)){
		$file = $dir.'/kode.txt';
		
		$fp = fopen($file, "w");
 
		// записываем в файл текст
		fwrite($fp, $Newcode);
		 
		// закрываем
		fclose($fp);
		
	}
	
	
?>
<form method="POST">
<textarea name="code"><?php echo $code; ?></textarea>
<button type="submit">SAVE</button>
</form>
	<?php }?>