403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/security/classes/general/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/security/classes/general/xscan_htaccess.php
<?php

class CBitrixXscanHtaccess {

	public $doc_root = null;
	public $start_time = null;
	public $time_limit = null;
	public $break_point = null;
	public $skip_path = null;
	public $found = false;
	public $result = [];

	function __construct(array $result = [])
	{
		$this->doc_root = rtrim($_SERVER['DOCUMENT_ROOT'], '/');
		$this->start_time = time();

		$mem = (int)ini_get('memory_limit');
		$this->time_limit = ini_get('max_execution_time') ?: 30;
		$this->time_limit = min($this->time_limit, 30);
		$this->time_limit = $this->time_limit * 0.7;

		$this->result = $result;

	}


	function Search($path)
	{
		$path = str_replace('\\', '/', $path);
		do
		{
			$path = str_replace('//', '/', $path, $flag);
		}
		while ($flag);

		if ($this->start_time && time() - $this->start_time > $this->time_limit)
		{
			if (!$this->break_point)
			{
				$this->break_point = $path;
			}
			return;
		}

		if ($this->skip_path && !$this->found)
		{
			if (strpos($this->skip_path, dirname($path)) !== 0)
			{
				return;
			}

			if ($this->skip_path == $path)
			{
				$this->found = true;
			}
		}

		if (is_dir($path)) // dir
		{
			$p = realpath($path);

			if (is_link($path))
			{
				$d = dirname($path);
				if (strpos($p, $d) !== false || strpos($d, $p) !== false)
				{
					return true;
				}
			}

			$dir = opendir($path);

			while ($item = readdir($dir))
			{
				if ($item == '.' || $item == '..')
				{
					continue;
				}

				$this->Search($path . '/' . $item);
			}
			closedir($dir);
		}
		elseif (preg_match('/\.htaccess$/', $path))
		{
			if (!$this->skip_path || $this->found)
			{
				$this->result[] = $path;
			}
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit