Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
Apache/2.4.59 (Debian)
: 10.2.73.233 | : 3.141.25.100
Cant Read [ /etc/named.conf ]
5.6.40-64+0~20230107.71+debian10~1.gbp673146
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
ifk /
web /
prado4.3.2 /
Util /
[ HOME SHELL ]
Name
Size
Permission
Action
Behaviors
[ DIR ]
drwxr-xr-x
Cron
[ DIR ]
drwxr-xr-x
IBaseBehavior.php
957
B
-rw-r--r--
IBehavior.php
957
B
-rw-r--r--
IClassBehavior.php
1.43
KB
-rw-r--r--
IDbModule.php
959
B
-rw-r--r--
IDynamicMethods.php
618
B
-rw-r--r--
IInstanceCheck.php
1.35
KB
-rw-r--r--
IPluginModule.php
531
B
-rw-r--r--
TBehavior.php
2.41
KB
-rw-r--r--
TBehaviorsModule.php
7.83
KB
-rw-r--r--
TBrowserLogRoute.php
4.75
KB
-rw-r--r--
TCallChain.php
6.08
KB
-rw-r--r--
TClassBehavior.php
852
B
-rw-r--r--
TClassBehaviorEventParameter.p...
1.81
KB
-rw-r--r--
TDataFieldAccessor.php
3.38
KB
-rw-r--r--
TDbLogRoute.php
6.08
KB
-rw-r--r--
TDbParameterModule.php
22.81
KB
-rw-r--r--
TDbPluginModule.php
2.88
KB
-rw-r--r--
TEmailLogRoute.php
3.66
KB
-rw-r--r--
TFileLogRoute.php
4.09
KB
-rw-r--r--
TFirePhpLogRoute.php
2.96
KB
-rw-r--r--
TFirebugLogRoute.php
3.81
KB
-rw-r--r--
TJsonRpcClient.php
2.47
KB
-rw-r--r--
TLogRoute.php
4.82
KB
-rw-r--r--
TLogRouter.php
5.18
KB
-rw-r--r--
TLogger.php
8.32
KB
-rw-r--r--
TParameterModule.php
5.45
KB
-rw-r--r--
TPluginModule.php
4.84
KB
-rw-r--r--
TRpcClient.php
3.91
KB
-rw-r--r--
TRpcClientRequestException.php
590
B
-rw-r--r--
TRpcClientResponseException.ph...
725
B
-rw-r--r--
TRpcClientTypesEnumerable.php
458
B
-rw-r--r--
TSimpleDateFormatter.php
8.86
KB
-rw-r--r--
TUtf8Converter.php
1.34
KB
-rw-r--r--
TVarDumper.php
3.43
KB
-rw-r--r--
TXmlRpcClient.php
2.2
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : TDbLogRoute.php
<?php /** * TLogRouter, TLogRoute, TFileLogRoute, TEmailLogRoute class file * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado * @license https://github.com/pradosoft/prado/blob/master/LICENSE */ namespace Prado\Util; use Exception; use Prado\Data\TDataSourceConfig; use Prado\Data\TDbConnection; use Prado\Exceptions\TConfigurationException; use Prado\TPropertyValue; /** * TDbLogRoute class * * TDbLogRoute stores log messages in a database table. * To specify the database table, set {@link setConnectionID ConnectionID} to be * the ID of a {@link TDataSourceConfig} module and {@link setLogTableName LogTableName}. * If they are not setting, an SQLite3 database named 'sqlite3.log' will be created and used * under the runtime directory. * * By default, the database table name is 'pradolog'. It has the following structure: * <code> * CREATE TABLE pradolog * ( * log_id INTEGER NOT NULL PRIMARY KEY, * level INTEGER, * category VARCHAR(128), * logtime VARCHAR(20), * message VARCHAR(255) * ); * </code> * * @author Qiang Xue <qiang.xue@gmail.com> * @since 3.1.2 */ class TDbLogRoute extends TLogRoute { /** * @var string the ID of TDataSourceConfig module */ private $_connID = ''; /** * @var TDbConnection the DB connection instance */ private $_db; /** * @var string name of the DB log table */ private $_logTable = 'pradolog'; /** * @var bool whether the log DB table should be created automatically */ private $_autoCreate = true; /** * Destructor. * Disconnect the db connection. */ public function __destruct() { if ($this->_db !== null) { $this->_db->setActive(false); } parent::__destruct(); } /** * Initializes this module. * This method is required by the IModule interface. * It initializes the database for logging purpose. * @param \Prado\Xml\TXmlElement $config configuration for this module, can be null * @throws TConfigurationException if the DB table does not exist. */ public function init($config) { $db = $this->getDbConnection(); $db->setActive(true); $sql = 'SELECT * FROM ' . $this->_logTable . ' WHERE 0=1'; try { $db->createCommand($sql)->query()->close(); } catch (Exception $e) { // DB table not exists if ($this->_autoCreate) { $this->createDbTable(); } else { throw new TConfigurationException('db_logtable_inexistent', $this->_logTable); } } parent::init($config); } /** * Stores log messages into database. * @param array $logs list of log messages */ protected function processLogs($logs) { $sql = 'INSERT INTO ' . $this->_logTable . '(level, category, logtime, message) VALUES (:level, :category, :logtime, :message)'; $command = $this->getDbConnection()->createCommand($sql); foreach ($logs as $log) { $command->bindValue(':message', $log[0]); $command->bindValue(':level', $log[1]); $command->bindValue(':category', $log[2]); $command->bindValue(':logtime', $log[3]); $command->execute(); } } /** * Creates the DB table for storing log messages. * @todo create sequence for PostgreSQL */ protected function createDbTable() { $db = $this->getDbConnection(); $driver = $db->getDriverName(); $autoidAttributes = ''; if ($driver === 'mysql') { $autoidAttributes = 'AUTO_INCREMENT'; } $sql = 'CREATE TABLE ' . $this->_logTable . ' ( log_id INTEGER NOT NULL PRIMARY KEY ' . $autoidAttributes . ', level INTEGER, category VARCHAR(128), logtime VARCHAR(20), message VARCHAR(255))'; $db->createCommand($sql)->execute(); } /** * Creates the DB connection. * @throws TConfigurationException if module ID is invalid or empty * @return \Prado\Data\TDbConnection the created DB connection */ protected function createDbConnection() { if ($this->_connID !== '') { $config = $this->getApplication()->getModule($this->_connID); if ($config instanceof TDataSourceConfig) { return $config->getDbConnection(); } else { throw new TConfigurationException('dblogroute_connectionid_invalid', $this->_connID); } } else { $db = new TDbConnection(); // default to SQLite3 database $dbFile = $this->getApplication()->getRuntimePath() . DIRECTORY_SEPARATOR . 'sqlite3.log'; $db->setConnectionString('sqlite:' . $dbFile); return $db; } } /** * @return \Prado\Data\TDbConnection the DB connection instance */ public function getDbConnection() { if ($this->_db === null) { $this->_db = $this->createDbConnection(); } return $this->_db; } /** * @return string the ID of a {@link TDataSourceConfig} module. Defaults to empty string, meaning not set. */ public function getConnectionID() { return $this->_connID; } /** * Sets the ID of a TDataSourceConfig module. * The datasource module will be used to establish the DB connection for this log route. * @param string $value ID of the {@link TDataSourceConfig} module */ public function setConnectionID($value) { $this->_connID = $value; } /** * @return string the name of the DB table to store log content. Defaults to 'pradolog'. * @see setAutoCreateLogTable */ public function getLogTableName() { return $this->_logTable; } /** * Sets the name of the DB table to store log content. * Note, if {@link setAutoCreateLogTable AutoCreateLogTable} is false * and you want to create the DB table manually by yourself, * you need to make sure the DB table is of the following structure: * (key CHAR(128) PRIMARY KEY, value BLOB, expire INT) * @param string $value the name of the DB table to store log content * @see setAutoCreateLogTable */ public function setLogTableName($value) { $this->_logTable = $value; } /** * @return bool whether the log DB table should be automatically created if not exists. Defaults to true. * @see setAutoCreateLogTable */ public function getAutoCreateLogTable() { return $this->_autoCreate; } /** * @param bool $value whether the log DB table should be automatically created if not exists. * @see setLogTableName */ public function setAutoCreateLogTable($value) { $this->_autoCreate = TPropertyValue::ensureBoolean($value); } }
Close