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 :
Drupal.php
<?php /** * Drupal * * @copyright Copyright (c) 2007 DotRoll Kft. (http://www.dotroll.com) * @author Zoltán Istvanovszki <zoltan.istvanovszki@dotroll.com> * @since 2019-06-26 * @package CXS_2.0 */ namespace Discover\CMS; class Drupal 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(); $drupal = []; $found = \array_merge( \glob("/home/$hash/$brace/includes/bootstrap.inc", \GLOB_BRACE), \glob("/home/$hash/$brace/modules/system/system.module", \GLOB_BRACE), \glob("/home/$hash/$brace/core/lib/Drupal.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) == '/core/lib/Drupal.php') { $dir = \substr($file, 0, -20); } elseif (\substr($file, -23) == '/includes/bootstrap.inc') { $dir = \substr($file, 0, -23); } else { $dir = \substr($file, 0, -29); } $version = \exec(\PHP_BINARY . ' -c ' . \APP_PATH . 'config/php.ini ' . \APP_PATH . "libs/Discover/CMS/version/{$this->type}.php $file"); if ($version) { $this->printStr("[Drupal]"); $drupal[$dir] = [ 'type' => $this->type, 'dir' => $dir, 'version' => $version, 'plugins' => $this->getPlugins($dir), ]; } } $this->cleanLine(); return $drupal; } /** * Get plugins * * @param string $dir Docroot * @return array */ private function getPlugins(string $dir): array { $plugins = []; foreach (\array_merge( \glob("$dir/modules/contrib/*/*.info.yml"), \glob("$dir/modules/*/*.info.yml"), \glob("$dir/modules/*/*.info") ) as $pluginfile) { if (\substr($pluginfile, \strrpos($pluginfile, '.')) == '.yml') { $slug = \str_replace('.info.yml', '', \basename($pluginfile)); $info = @\yaml_parse_file($pluginfile); } else { $slug = \str_replace('.info', '', \basename($pluginfile)); $info = @\parse_ini_file($pluginfile); } if (!empty($info['name']) && !empty($info['version'])) { $plugins[$slug] = [ 'name' => $info['name'], 'slug' => $slug, 'version' => $info['version'], ]; } } return $plugins; } }