Kernel : Linux vmw02p.internet-indee.net 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Tue Nov 16 14:42:35 UTC 2021 x86_64
Disable function : NONE
Safe mode : OFF
Host : firofichi.it | Server ip : 5.196.164.15 | Your ip : 13.59.75.169 | Time @ Server : 19 Oct 2024 05:38:42
MySQL : OFF | MSSQL : OFF | cURL : ON | Oracle : OFF | wget : ON | Perl : ON

/home/webmaster/firofichi/www/vendor/magento/framework/App/

HOME about upload exec mass file domain root vuln newfile newfolder kill me

File Path : /home/webmaster/firofichi/www/vendor/magento/framework/App/MaintenanceMode.php

<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Framework\App; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Filesystem; use Magento\Framework\Event\Manager; /** * Application Maintenance Mode */ class MaintenanceMode { /** * Maintenance flag file name * * DO NOT consolidate this file and the IP white list into one. * It is going to work much faster in 99% of cases: the isOn() will return false whenever file doesn't exist. */ const FLAG_FILENAME = '.maintenance.flag'; /** * IP-addresses file name */ const IP_FILENAME = '.maintenance.ip'; /** * Maintenance flag dir */ const FLAG_DIR = DirectoryList::VAR_DIR; /** * Path to store files * * @var \Magento\Framework\Filesystem\Directory\WriteInterface */ protected $flagDir; /** * @var Manager */ private $eventManager; /** * @param \Magento\Framework\Filesystem $filesystem * @param Manager|null $eventManager */ public function __construct(Filesystem $filesystem, ?Manager $eventManager = null) { $this->flagDir = $filesystem->getDirectoryWrite(self::FLAG_DIR); $this->eventManager = $eventManager ?: ObjectManager::getInstance()->get(Manager::class); } /** * Checks whether mode is on * * Optionally specify an IP-address to compare against the white list * * @param string $remoteAddr * @return bool */ public function isOn($remoteAddr = '') { if (!$this->flagDir->isExist(self::FLAG_FILENAME)) { return false; } $info = $this->getAddressInfo(); return !in_array($remoteAddr, $info); } /** * Sets maintenance mode "on" or "off" * * @param bool $isOn * @return bool */ public function set($isOn) { $this->eventManager->dispatch('maintenance_mode_changed', ['isOn' => $isOn]); if ($isOn) { return $this->flagDir->touch(self::FLAG_FILENAME); } if ($this->flagDir->isExist(self::FLAG_FILENAME)) { return $this->flagDir->delete(self::FLAG_FILENAME); } return true; } /** * Sets list of allowed IP addresses * * @param string $addresses * @return bool * @throws \InvalidArgumentException */ public function setAddresses($addresses) { $addresses = (string)$addresses; if (empty($addresses)) { if ($this->flagDir->isExist(self::IP_FILENAME)) { return $this->flagDir->delete(self::IP_FILENAME); } return true; } if (!preg_match('/^[^\s,]+(,[^\s,]+)*$/', $addresses)) { throw new \InvalidArgumentException("One or more IP-addresses is expected (comma-separated)\n"); } $result = $this->flagDir->writeFile(self::IP_FILENAME, $addresses); return false !== $result; } /** * Get list of IP addresses effective for maintenance mode * * @return string[] */ public function getAddressInfo() { if ($this->flagDir->isExist(self::IP_FILENAME)) { $temp = $this->flagDir->readFile(self::IP_FILENAME); return explode(',', trim($temp)); } else { return []; } } }