| Server IP : 89.248.107.232 / Your IP : 216.73.217.70 Web Server : Apache System : Linux host2.kasilh.com 5.14.0-687.36.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 7 05:40:49 EDT 2026 x86_64 User : seg ( 10005) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/seg-sa.es/gessing.es/wp-content/plugins/akeebabackupwp/app/Solo/Pythia/ |
Upload File : |
<?php
/**
* @package solo
* @copyright 2014-2016 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU GPL version 3 or later
*/
namespace Solo\Pythia;
use Awf\Application\Application;
use Awf\Filesystem\File;
use Awf\Mvc\Model;
use Solo\Model\Multidb;
class Pythia
{
protected $application = null;
/**
* Public constructor
*
* @param Application $app The application we are attached to
*/
function __construct($app = null)
{
if (is_null($app))
{
$app = Application::getInstance();
}
$this->application = $app;
}
/**
* Get information about the script installed under $path. Guessing classes ("oracles") try to figure out what
* kind of CMS/script is installed and its database settings.
*
* @param string $path The path to scan
*
* @return array
*/
public function getCmsInfo($path)
{
// Initialise
$ret = array(
'cms' => 'generic',
'installer' => 'angie-generic',
'database' => array(
'driver' => 'mysqli',
'host' => '',
'port' => '',
'username' => '',
'password' => '',
'name' => '',
'prefix' => '',
),
'extradirs' => array(),
'extradb' => array()
);
// Get a list of all the CMS guessing classes
$dummy = array();
$fs = new File($dummy);
$files = $fs->directoryFiles(__DIR__ . '/Oracle', '.php');
if (empty($files))
{
return $ret;
}
foreach ($files as $file)
{
$className = '\\Solo\\Pythia\\Oracle\\' . ucfirst(basename($file, '.php'));
/** @var OracleInterface $o */
$o = new $className($path);
if ($o->isRecognised())
{
$ret['cms'] = $o->getName();
$ret['installer'] = $o->getInstaller();
$ret['database'] = $o->getDbInformation();
$ret['extradirs'] = $o->getExtradirs();
// Please note that if you have any extra db, the Oracle class should automatically add it to the filters
$ret['extradb'] = $o->getExtraDb();
return $ret;
}
}
return $ret;
}
}