One Hat Cyber Team
Your IP :
216.73.217.131
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
/
cli
/
Edit File:
Loginssl.php
<?php /** * loginssl, Loginssl 2.0 CLI Console * * @copyright Copyright (c) 2007 DotRoll Kft. (http://www.dotroll.com) * @author Zoltán Istvanovszki <zoltan.istvanovszki@dotroll.com> * @since 2018.02.14. * @package CXS_2.0 */ use Phalcon\Autoload\Loader; use Phalcon\CLI\Console; use Phalcon\Config\Adapter\Ini as IniAdapter; use Phalcon\Db\Adapter\Pdo\Mysql; use Phalcon\Di\FactoryDefault\Cli; use Phalcon\Logger\Logger; use Phalcon\Logger\Adapter\Stream; use Phalcon\Logger\Formatter\Line as LineFormatter; \ini_set('error_reporting', \E_ALL ^ \E_DEPRECATED); \error_reporting(\E_ALL ^ \E_DEPRECATED); \date_default_timezone_set('Europe/Budapest'); \mb_internal_encoding('UTF-8'); \setlocale(\LC_ALL, 'en_US.UTF-8'); #[AllowDynamicProperties] class Loginssl extends Console { /** * Configuration * @var array */ protected $config; /** * Logger object * @var Logger */ protected $logger; /** * Command line arguments * @var array */ protected $arguments = []; /** * Default main method for Loginnsl * * @param string $task Task type * @param array $argv Array of arguments passed to script */ public function main(string $task, array $argv = []) { try { $this->arguments['task'] = $task; $this->arguments['params'] = $argv; // Setting up config $this->config = new IniAdapter(\APP_PATH . 'config/loginssl.ini'); (new Loader())->setDirectories( [ \APP_PATH . 'libs/', \APP_PATH . 'tasks/', \APP_PATH . 'models/', ] )->register(); // Setting up services // Create a DI $di = new Cli(); $adapter = new Stream($this->config->application->logpath, ['mode' => 'a']); $adapter->setFormatter(new LineFormatter("%date% - %message%", 'Y-m-d H:i:s')); $this->logger = new Logger('messages', ['main' => $adapter]); // Set logger $di->set('logger', $this->logger); // Set config to DI $di->set('config', $this->config); $this->setDI($di); $di->setShared('loginssl', $this); $this->handle($this->arguments); } catch (\Exception $ex) { self::error($ex->getMessage(), $ex->getTrace()); } } /** * Create DB connection and reconnect it if is exist in a dependency injection service */ public function reconnect() { if ($this->di->has('db') === false) { $this->di->set('db', new Mysql([ 'host' => $this->di->get('config')->db->host, 'username' => $this->di->get('config')->db->username, 'password' => $this->di->get('config')->db->password, 'dbname' => $this->di->get('config')->db->dbname, 'charset' => 'utf8', 'options' => [\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC] ]) ); } else { $this->di->get('db')->connect(); } } /** * A fatal, unrecoverable error occured during initialization. This function * exists out of the daemon effectively terminating all inner workings. * @param string $error */ public static function error($error, $backtrace = [], $exit = true) { \syslog(\LOG_ERR, \date('Y-m-d H:i:s ') . $error); \ZebraZ::l($error); if (!\is_array($backtrace) || !\count($backtrace)) { $backtrace = \debug_backtrace(); \array_shift($backtrace); } foreach ($backtrace as &$btentry) { $line = ' at '; if (\array_key_exists('class', $btentry)) { $line .= $btentry['class'] . '::' . $btentry['function']; } else if (\array_key_exists('function', $btentry)) { $line .= $btentry['function']; } if (\array_key_exists('file', $btentry)) { $line .= '(' . $btentry['file']; if (\array_key_exists('line', $btentry)) { $line .= ':' . $btentry['line']; } $line .= ')'; } \syslog(\LOG_ERR, \date('Y-m-d H:i:s ') . $line); \ZebraZ::l($line); } if ($exit) { exit(139); } } }
Simpan