Windows NT DGPENSV2LPKMN 10.0 build 14393 (Windows Server 2016) AMD64
Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/7.3.25
: 172.16.0.66 | : 172.16.0.254
Cant Read [ /etc/named.conf ]
7.3.25
SYSTEM
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
BLACK DEFEND!
README
+ Create Folder
+ Create File
[ A ]
[ C ]
[ D ]
C: /
xampp7 /
phpMyAdmin /
libraries /
classes /
[ HOME SHELL ]
Name
Size
Permission
Action
Charsets
[ DIR ]
drwxrwxrwx
Config
[ DIR ]
drwxrwxrwx
Controllers
[ DIR ]
drwxrwxrwx
Database
[ DIR ]
drwxrwxrwx
Dbi
[ DIR ]
drwxrwxrwx
Di
[ DIR ]
drwxrwxrwx
Display
[ DIR ]
drwxrwxrwx
Engines
[ DIR ]
drwxrwxrwx
Gis
[ DIR ]
drwxrwxrwx
Navigation
[ DIR ]
drwxrwxrwx
Plugins
[ DIR ]
drwxrwxrwx
Properties
[ DIR ]
drwxrwxrwx
Rte
[ DIR ]
drwxrwxrwx
Server
[ DIR ]
drwxrwxrwx
Setup
[ DIR ]
drwxrwxrwx
Twig
[ DIR ]
drwxrwxrwx
Utils
[ DIR ]
drwxrwxrwx
Advisor.php
19.56
KB
-rw-rw-rw-
Bookmark.php
10.74
KB
-rw-rw-rw-
BrowseForeigners.php
11.15
KB
-rw-rw-rw-
CentralColumns.php
44.19
KB
-rw-rw-rw-
Charsets.php
6.14
KB
-rw-rw-rw-
CheckUserPrivileges.php
12.59
KB
-rw-rw-rw-
Config.php
57.38
KB
-rw-rw-rw-
Console.php
3.69
KB
-rw-rw-rw-
Core.php
38.31
KB
-rw-rw-rw-
CreateAddField.php
17.91
KB
-rw-rw-rw-
DatabaseInterface.php
104.47
KB
-rw-rw-rw-
Encoding.php
8.68
KB
-rw-rw-rw-
Error.php
13.34
KB
-rw-rw-rw-
ErrorHandler.php
17.17
KB
-rw-rw-rw-
ErrorReport.php
8.92
KB
-rw-rw-rw-
Export.php
42.76
KB
-rw-rw-rw-
File.php
21.29
KB
-rw-rw-rw-
FileListing.php
2.83
KB
-rw-rw-rw-
Font.php
5.54
KB
-rw-rw-rw-
Footer.php
10.6
KB
-rw-rw-rw-
Header.php
21.87
KB
-rw-rw-rw-
Import.php
56.56
KB
-rw-rw-rw-
Index.php
24.5
KB
-rw-rw-rw-
IndexColumn.php
4.44
KB
-rw-rw-rw-
InsertEdit.php
129.31
KB
-rw-rw-rw-
InternalRelations.php
17.42
KB
-rw-rw-rw-
IpAllowDeny.php
9.57
KB
-rw-rw-rw-
Language.php
4.31
KB
-rw-rw-rw-
LanguageManager.php
23.71
KB
-rw-rw-rw-
Linter.php
5.21
KB
-rw-rw-rw-
ListAbstract.php
2.51
KB
-rw-rw-rw-
ListDatabase.php
4.34
KB
-rw-rw-rw-
Logging.php
2.6
KB
-rw-rw-rw-
Menu.php
22.36
KB
-rw-rw-rw-
Message.php
19.32
KB
-rw-rw-rw-
Mime.php
916
B
-rw-rw-rw-
MultSubmits.php
23.64
KB
-rw-rw-rw-
Normalization.php
40.41
KB
-rw-rw-rw-
OpenDocument.php
8.52
KB
-rw-rw-rw-
Operations.php
81.25
KB
-rw-rw-rw-
OutputBuffering.php
3.71
KB
-rw-rw-rw-
ParseAnalyze.php
2.55
KB
-rw-rw-rw-
Partition.php
7.27
KB
-rw-rw-rw-
Pdf.php
4.37
KB
-rw-rw-rw-
Plugins.php
22.95
KB
-rw-rw-rw-
RecentFavoriteTable.php
12.04
KB
-rw-rw-rw-
Relation.php
79.64
KB
-rw-rw-rw-
RelationCleanup.php
15
KB
-rw-rw-rw-
Replication.php
5.75
KB
-rw-rw-rw-
ReplicationGui.php
21.23
KB
-rw-rw-rw-
Response.php
16.14
KB
-rw-rw-rw-
Sanitize.php
14.51
KB
-rw-rw-rw-
SavedSearches.php
11.94
KB
-rw-rw-rw-
Scripts.php
3.65
KB
-rw-rw-rw-
Session.php
7.62
KB
-rw-rw-rw-
Sql.php
82.09
KB
-rw-rw-rw-
SqlQueryForm.php
17.63
KB
-rw-rw-rw-
StorageEngine.php
13.75
KB
-rw-rw-rw-
SubPartition.php
3.55
KB
-rw-rw-rw-
SysInfo.php
1.61
KB
-rw-rw-rw-
SysInfoBase.php
822
B
-rw-rw-rw-
SysInfoLinux.php
2.16
KB
-rw-rw-rw-
SysInfoSunOS.php
1.89
KB
-rw-rw-rw-
SysInfoWINNT.php
3.27
KB
-rw-rw-rw-
SystemDatabase.php
3.97
KB
-rw-rw-rw-
Table.php
94.87
KB
-rw-rw-rw-
TablePartitionDefinition.php
6.64
KB
-rw-rw-rw-
Template.php
4.02
KB
-rw-rw-rw-
Theme.php
8.62
KB
-rw-rw-rw-
ThemeManager.php
10.42
KB
-rw-rw-rw-
Tracker.php
30.13
KB
-rw-rw-rw-
Tracking.php
40.26
KB
-rw-rw-rw-
Transformations.php
16.27
KB
-rw-rw-rw-
TwoFactor.php
7.14
KB
-rw-rw-rw-
Types.php
24.93
KB
-rw-rw-rw-
Url.php
8.32
KB
-rw-rw-rw-
UserPassword.php
9
KB
-rw-rw-rw-
UserPreferences.php
8.62
KB
-rw-rw-rw-
UserPreferencesHeader.php
4.13
KB
-rw-rw-rw-
Util.php
168.02
KB
-rw-rw-rw-
VersionInformation.php
6.92
KB
-rw-rw-rw-
ZipExtension.php
10.25
KB
-rw-rw-rw-
Delete
Unzip
Zip
${this.title}
Close
Code Editor : ReplicationGui.php
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Functions for the replication GUI * * @package PhpMyAdmin */ declare(strict_types=1); namespace PhpMyAdmin; /** * Functions for the replication GUI * * @package PhpMyAdmin */ class ReplicationGui { /** * @var Replication */ private $replication; /** * @var Template */ private $template; /** * ReplicationGui constructor. * * @param Replication $replication Replication instance * @param Template $template Template instance */ public function __construct(Replication $replication, Template $template) { $this->replication = $replication; $this->template = $template; } /** * returns HTML for error message * * @return string HTML code */ public function getHtmlForErrorMessage() { $html = ''; if (isset($_SESSION['replication']['sr_action_status']) && isset($_SESSION['replication']['sr_action_info']) ) { if ($_SESSION['replication']['sr_action_status'] == 'error') { $error_message = $_SESSION['replication']['sr_action_info']; $html .= Message::error($error_message)->getDisplay(); $_SESSION['replication']['sr_action_status'] = 'unknown'; } elseif ($_SESSION['replication']['sr_action_status'] == 'success') { $success_message = $_SESSION['replication']['sr_action_info']; $html .= Message::success($success_message)->getDisplay(); $_SESSION['replication']['sr_action_status'] = 'unknown'; } } return $html; } /** * returns HTML for master replication * * @return string HTML code */ public function getHtmlForMasterReplication() { if (! isset($_POST['repl_clear_scr'])) { $masterStatusTable = $this->getHtmlForReplicationStatusTable('master', true, false); $slaves = $GLOBALS['dbi']->fetchResult('SHOW SLAVE HOSTS', null, null); $urlParams = $GLOBALS['url_params']; $urlParams['mr_adduser'] = true; $urlParams['repl_clear_scr'] = true; } if (isset($_POST['mr_adduser'])) { $masterAddSlaveUser = $this->getHtmlForReplicationMasterAddSlaveUser(); } return $this->template->render('server/replication/master_replication', [ 'clear_screen' => isset($_POST['repl_clear_scr']), 'master_status_table' => $masterStatusTable ?? '', 'slaves' => $slaves ?? [], 'url_params' => $urlParams ?? [], 'master_add_user' => isset($_POST['mr_adduser']), 'master_add_slave_user' => $masterAddSlaveUser ?? '', ]); } /** * returns HTML for master replication configuration * * @return string HTML code */ public function getHtmlForMasterConfiguration() { $databaseMultibox = $this->getHtmlForReplicationDbMultibox(); return $this->template->render('server/replication/master_configuration', [ 'database_multibox' => $databaseMultibox, ]); } /** * returns HTML for slave replication configuration * * @param bool $serverSlaveStatus Whether it is Master or Slave * @param array $serverSlaveReplication Slave replication * * @return string HTML code */ public function getHtmlForSlaveConfiguration( $serverSlaveStatus, array $serverSlaveReplication ) { $serverSlaveMultiReplication = $GLOBALS['dbi']->fetchResult( 'SHOW ALL SLAVES STATUS' ); if ($serverSlaveStatus) { $urlParams = $GLOBALS['url_params']; $urlParams['sr_take_action'] = true; $urlParams['sr_slave_server_control'] = true; if ($serverSlaveReplication[0]['Slave_IO_Running'] == 'No') { $urlParams['sr_slave_action'] = 'start'; } else { $urlParams['sr_slave_action'] = 'stop'; } $urlParams['sr_slave_control_parm'] = 'IO_THREAD'; $slaveControlIoLink = Url::getCommon($urlParams, ''); if ($serverSlaveReplication[0]['Slave_SQL_Running'] == 'No') { $urlParams['sr_slave_action'] = 'start'; } else { $urlParams['sr_slave_action'] = 'stop'; } $urlParams['sr_slave_control_parm'] = 'SQL_THREAD'; $slaveControlSqlLink = Url::getCommon($urlParams, ''); if ($serverSlaveReplication[0]['Slave_IO_Running'] == 'No' || $serverSlaveReplication[0]['Slave_SQL_Running'] == 'No' ) { $urlParams['sr_slave_action'] = 'start'; } else { $urlParams['sr_slave_action'] = 'stop'; } $urlParams['sr_slave_control_parm'] = null; $slaveControlFullLink = Url::getCommon($urlParams, ''); $urlParams['sr_slave_action'] = 'reset'; $slaveControlResetLink = Url::getCommon($urlParams, ''); $urlParams = $GLOBALS['url_params']; $urlParams['sr_take_action'] = true; $urlParams['sr_slave_skip_error'] = true; $slaveSkipErrorLink = Url::getCommon($urlParams, ''); $urlParams = $GLOBALS['url_params']; $urlParams['sl_configure'] = true; $urlParams['repl_clear_scr'] = true; $reconfigureMasterLink = Url::getCommon($urlParams, ''); $slaveStatusTable = $this->getHtmlForReplicationStatusTable('slave', true, false); $slaveIoRunning = $serverSlaveReplication[0]['Slave_IO_Running'] !== 'No'; $slaveSqlRunning = $serverSlaveReplication[0]['Slave_SQL_Running'] !== 'No'; } return $this->template->render('server/replication/slave_configuration', [ 'server_slave_multi_replication' => $serverSlaveMultiReplication, 'url_params' => $GLOBALS['url_params'], 'master_connection' => $_POST['master_connection'] ?? '', 'server_slave_status' => $serverSlaveStatus, 'slave_status_table' => $slaveStatusTable ?? '', 'slave_sql_running' => $slaveSqlRunning ?? false, 'slave_io_running' => $slaveIoRunning ?? false, 'slave_control_full_link' => $slaveControlFullLink ?? '', 'slave_control_reset_link' => $slaveControlResetLink ?? '', 'slave_control_sql_link' => $slaveControlSqlLink ?? '', 'slave_control_io_link' => $slaveControlIoLink ?? '', 'slave_skip_error_link' => $slaveSkipErrorLink ?? '', 'reconfigure_master_link' => $reconfigureMasterLink ?? '', 'has_slave_configure' => isset($_POST['sl_configure']), ]); } /** * returns HTML code for selecting databases * * @return string HTML code */ public function getHtmlForReplicationDbMultibox() { $databases = []; foreach ($GLOBALS['dblist']->databases as $database) { if (! $GLOBALS['dbi']->isSystemSchema($database)) { $databases[] = $database; } } return $this->template->render('server/replication/database_multibox', [ 'databases' => $databases, ]); } /** * returns HTML for changing master * * @param string $submitName submit button name * * @return string HTML code */ public function getHtmlForReplicationChangeMaster($submitName) { list( $usernameLength, $hostnameLength ) = $this->getUsernameHostnameLength(); return $this->template->render('server/replication/change_master', [ 'server_id' => time(), 'username_length' => $usernameLength, 'hostname_length' => $hostnameLength, 'submit_name' => $submitName, ]); } /** * This function returns html code for table with replication status. * * @param string $type either master or slave * @param boolean $isHidden if true, then default style is set to hidden, * default value false * @param boolean $hasTitle if true, then title is displayed, default true * * @return string HTML code */ public function getHtmlForReplicationStatusTable( $type, $isHidden = false, $hasTitle = true ): string { global $master_variables, $slave_variables; global $master_variables_alerts, $slave_variables_alerts; global $master_variables_oks, $slave_variables_oks; global $server_master_replication, $server_slave_replication; $replicationVariables = $master_variables; $variablesAlerts = $master_variables_alerts; $variablesOks = $master_variables_oks; $serverReplication = $server_master_replication; if ($type === 'slave') { $replicationVariables = $slave_variables; $variablesAlerts = $slave_variables_alerts; $variablesOks = $slave_variables_oks; $serverReplication = $server_slave_replication; } $variables = []; foreach ($replicationVariables as $variable) { $serverReplicationVariable = is_array($serverReplication) && isset($serverReplication[0]) ? $serverReplication[0][$variable] : ''; $variables[$variable] = [ 'name' => $variable, 'status' => '', 'value' => $serverReplicationVariable, ]; if (isset($variablesAlerts[$variable]) && $variablesAlerts[$variable] === $serverReplicationVariable ) { $variables[$variable]['status'] = 'attention'; } elseif (isset($variablesOks[$variable]) && $variablesOks[$variable] === $serverReplicationVariable ) { $variables[$variable]['status'] = 'allfine'; } $variablesWrap = [ 'Replicate_Do_DB', 'Replicate_Ignore_DB', 'Replicate_Do_Table', 'Replicate_Ignore_Table', 'Replicate_Wild_Do_Table', 'Replicate_Wild_Ignore_Table', ]; if (in_array($variable, $variablesWrap)) { $variables[$variable]['value'] = str_replace( ',', ', ', $serverReplicationVariable ); } } return $this->template->render('server/replication/status_table', [ 'type' => $type, 'is_hidden' => $isHidden, 'has_title' => $hasTitle, 'variables' => $variables, ]); } /** * get the correct username and hostname lengths for this MySQL server * * @return array username length, hostname length */ public function getUsernameHostnameLength() { $fields_info = $GLOBALS['dbi']->getColumns('mysql', 'user'); $username_length = 16; $hostname_length = 41; foreach ($fields_info as $val) { if ($val['Field'] == 'User') { strtok($val['Type'], '()'); $v = strtok('()'); if (Util::isInteger($v)) { $username_length = (int) $v; } } elseif ($val['Field'] == 'Host') { strtok($val['Type'], '()'); $v = strtok('()'); if (Util::isInteger($v)) { $hostname_length = (int) $v; } } } return [ $username_length, $hostname_length, ]; } /** * returns html code to add a replication slave user to the master * * @return string HTML code */ public function getHtmlForReplicationMasterAddSlaveUser() { list( $usernameLength, $hostnameLength ) = $this->getUsernameHostnameLength(); if (isset($_POST['username']) && strlen($_POST['username']) === 0) { $GLOBALS['pred_username'] = 'any'; } $username = ''; if (! empty($_POST['username'])) { $username = $GLOBALS['new_username'] ?? $_POST['username']; } $currentUser = $GLOBALS['dbi']->fetchValue('SELECT USER();'); if (! empty($currentUser)) { $userHost = str_replace( "'", '', mb_substr( $currentUser, mb_strrpos($currentUser, '@') + 1 ) ); if ($userHost !== 'localhost' && $userHost !== '127.0.0.1') { $thisHost = $userHost; } } // when we start editing a user, $GLOBALS['pred_hostname'] is not defined if (! isset($GLOBALS['pred_hostname']) && isset($_POST['hostname'])) { switch (mb_strtolower($_POST['hostname'])) { case 'localhost': case '127.0.0.1': $GLOBALS['pred_hostname'] = 'localhost'; break; case '%': $GLOBALS['pred_hostname'] = 'any'; break; default: $GLOBALS['pred_hostname'] = 'userdefined'; break; } } return $this->template->render('server/replication/master_add_slave_user', [ 'username_length' => $usernameLength, 'hostname_length' => $hostnameLength, 'has_username' => isset($_POST['username']), 'username' => $username, 'hostname' => $_POST['hostname'] ?? '', 'predefined_username' => $GLOBALS['pred_username'] ?? '', 'predefined_hostname' => $GLOBALS['pred_hostname'] ?? '', 'this_host' => $thisHost ?? null, ]); } /** * handle control requests * * @return void */ public function handleControlRequest() { if (isset($_POST['sr_take_action'])) { $refresh = false; $result = false; $messageSuccess = null; $messageError = null; if (isset($_POST['slave_changemaster']) && ! $GLOBALS['cfg']['AllowArbitraryServer']) { $_SESSION['replication']['sr_action_status'] = 'error'; $_SESSION['replication']['sr_action_info'] = __('Connection to server is disabled, please enable $cfg[\'AllowArbitraryServer\'] in phpMyAdmin configuration.'); } elseif (isset($_POST['slave_changemaster'])) { $result = $this->handleRequestForSlaveChangeMaster(); } elseif (isset($_POST['sr_slave_server_control'])) { $result = $this->handleRequestForSlaveServerControl(); $refresh = true; switch ($_POST['sr_slave_action']) { case 'start': $messageSuccess = __('Replication started successfully.'); $messageError = __('Error starting replication.'); break; case 'stop': $messageSuccess = __('Replication stopped successfully.'); $messageError = __('Error stopping replication.'); break; case 'reset': $messageSuccess = __('Replication resetting successfully.'); $messageError = __('Error resetting replication.'); break; default: $messageSuccess = __('Success.'); $messageError = __('Error.'); break; } } elseif (isset($_POST['sr_slave_skip_error'])) { $result = $this->handleRequestForSlaveSkipError(); } if ($refresh) { $response = Response::getInstance(); if ($response->isAjax()) { $response->setRequestStatus($result); $response->addJSON( 'message', $result ? Message::success($messageSuccess) : Message::error($messageError) ); } else { Core::sendHeaderLocation( './server_replication.php' . Url::getCommonRaw($GLOBALS['url_params']) ); } } unset($refresh); } } /** * handle control requests for Slave Change Master * * @return boolean */ public function handleRequestForSlaveChangeMaster() { $sr = []; $_SESSION['replication']['m_username'] = $sr['username'] = $GLOBALS['dbi']->escapeString($_POST['username']); $_SESSION['replication']['m_password'] = $sr['pma_pw'] = $GLOBALS['dbi']->escapeString($_POST['pma_pw']); $_SESSION['replication']['m_hostname'] = $sr['hostname'] = $GLOBALS['dbi']->escapeString($_POST['hostname']); $_SESSION['replication']['m_port'] = $sr['port'] = $GLOBALS['dbi']->escapeString($_POST['text_port']); $_SESSION['replication']['m_correct'] = ''; $_SESSION['replication']['sr_action_status'] = 'error'; $_SESSION['replication']['sr_action_info'] = __('Unknown error'); // Attempt to connect to the new master server $link_to_master = $this->replication->connectToMaster( $sr['username'], $sr['pma_pw'], $sr['hostname'], $sr['port'] ); if (! $link_to_master) { $_SESSION['replication']['sr_action_status'] = 'error'; $_SESSION['replication']['sr_action_info'] = sprintf( __('Unable to connect to master %s.'), htmlspecialchars($sr['hostname']) ); } else { // Read the current master position $position = $this->replication->slaveBinLogMaster($link_to_master); if (empty($position)) { $_SESSION['replication']['sr_action_status'] = 'error'; $_SESSION['replication']['sr_action_info'] = __( 'Unable to read master log position. ' . 'Possible privilege problem on master.' ); } else { $_SESSION['replication']['m_correct'] = true; if (! $this->replication->slaveChangeMaster( $sr['username'], $sr['pma_pw'], $sr['hostname'], $sr['port'], $position, true, false ) ) { $_SESSION['replication']['sr_action_status'] = 'error'; $_SESSION['replication']['sr_action_info'] = __('Unable to change master!'); } else { $_SESSION['replication']['sr_action_status'] = 'success'; $_SESSION['replication']['sr_action_info'] = sprintf( __('Master server changed successfully to %s.'), htmlspecialchars($sr['hostname']) ); } } } return $_SESSION['replication']['sr_action_status'] === 'success'; } /** * handle control requests for Slave Server Control * * @return boolean */ public function handleRequestForSlaveServerControl() { if (empty($_POST['sr_slave_control_parm'])) { $_POST['sr_slave_control_parm'] = null; } if ($_POST['sr_slave_action'] == 'reset') { $qStop = $this->replication->slaveControl("STOP", null, DatabaseInterface::CONNECT_USER); $qReset = $GLOBALS['dbi']->tryQuery("RESET SLAVE;"); $qStart = $this->replication->slaveControl("START", null, DatabaseInterface::CONNECT_USER); $result = ($qStop !== false && $qStop !== -1 && $qReset !== false && $qReset !== -1 && $qStart !== false && $qStart !== -1); } else { $qControl = $this->replication->slaveControl( $_POST['sr_slave_action'], $_POST['sr_slave_control_parm'], DatabaseInterface::CONNECT_USER ); $result = ($qControl !== false && $qControl !== -1); } return $result; } /** * handle control requests for Slave Skip Error * * @return boolean */ public function handleRequestForSlaveSkipError() { $count = 1; if (isset($_POST['sr_skip_errors_count'])) { $count = $_POST['sr_skip_errors_count'] * 1; } $qStop = $this->replication->slaveControl("STOP", null, DatabaseInterface::CONNECT_USER); $qSkip = $GLOBALS['dbi']->tryQuery( "SET GLOBAL SQL_SLAVE_SKIP_COUNTER = " . $count . ";" ); $qStart = $this->replication->slaveControl("START", null, DatabaseInterface::CONNECT_USER); $result = ($qStop !== false && $qStop !== -1 && $qSkip !== false && $qSkip !== -1 && $qStart !== false && $qStart !== -1); return $result; } }
Close