One Hat Cyber Team
Your IP :
216.73.217.126
Server IP :
185.33.55.30
Server :
Linux cl30.webspacecontrol.com 5.14.0-611.38.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 10 17:21:28 EDT 2026 x86_64
Server Software :
Apache
PHP Version :
8.1.34
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
cxs2
/
app
/
libs
/
Discover
/
CMS
/
View File Name :
PrestaShop.php
<?php /** * PrestaShop * * @copyright Copyright (c) 2007 DotRoll Kft. (http://www.dotroll.com) * @author Zoltán Istvanovszki <zoltan.istvanovszki@dotroll.com> * @since 2019-06-27 * @package CXS_2.0 */ namespace Discover\CMS; class PrestaShop extends CommonComponent { /** * Init */ public function onConstruct() { $this->type = \substr(__CLASS__, \strrpos(__CLASS__, '\\') + 1); } /** * Look for any intallations * * @param string $hash cPanel username * @param string $brace Used brace from depth checking * @return array */ public function get(string $hash, string $brace): array { $this->hash = $hash; $this->printPercentage(); $instance = []; $found = \array_merge( \glob("/home/$hash/$brace/config/autoload.php", \GLOB_BRACE), \glob("/home/$hash/$brace/config/settings.inc.php", \GLOB_BRACE) ); $GLOBALS['maxInstance'] = \count($found); $GLOBALS['iInstance'] = 0; foreach ($found as $file) { $GLOBALS['iInstance'] ++; if (\strpos($file, "/home/$hash/www/") === 0) { continue; } if (\substr($file, -20) == '/config/autoload.php') { $dir = \substr($file, 0, -20); } else { $dir = \substr($file, 0, -24); } if ($version = \ZebraZ::getVariableFromDefine($file, '_PS_VERSION_')) { $this->printStr("[PrestaShop]"); $instance[$dir] = [ 'type' => $this->type, 'dir' => $dir, 'version' => $version, 'plugins' => $this->getPlugins($dir), ]; } } $this->cleanLine(); return $instance; } /** * Get plugins * * @param string $dir Docroot * @return array */ private function getPlugins(string $dir): array { $plugins = []; foreach (\glob("$dir/modules/*/config.xml") as $pluginfile) { $xml = \simplexml_load_file($pluginfile, null, \LIBXML_NOCDATA); if (!empty($xml->name) && !empty($xml->displayName) && !empty($xml->version)) { $plugins[(string) $xml->name] = [ 'name' => (string) $xml->displayName, 'slug' => (string) $xml->name, 'version' => (string) $xml->version, ]; } } return $plugins; } }