!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/lampp/phpmyadmin/vendor/phpmyadmin/motranslator/src/   drwxr-xr-x
Free 14.38 GB of 61.93 GB (23.21%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

declare(strict_types=1);

namespace 
PhpMyAdmin\MoTranslator;

use 
PhpMyAdmin\MoTranslator\Cache\CacheInterface;

use function 
is_readable;
use function 
strcmp;

final class 
MoParser
{
    
/**
     * None error.
     */
    
public const ERROR_NONE 0;
    
/**
     * File does not exist.
     */
    
public const ERROR_DOES_NOT_EXIST 1;
    
/**
     * File has bad magic number.
     */
    
public const ERROR_BAD_MAGIC 2;
    
/**
     * Error while reading file, probably too short.
     */
    
public const ERROR_READING 3;

    
/**
     * Big endian mo file magic bytes.
     */
    
public const MAGIC_BE "\x95\x04\x12\xde";
    
/**
     * Little endian mo file magic bytes.
     */
    
public const MAGIC_LE "\xde\x12\x04\x95";

    
/**
     * Parse error code (0 if no error).
     *
     * @var int
     */
    
public $error self::ERROR_NONE;

    
/** @var string|null */
    
private $filename;

    public function 
__construct(?string $filename)
    {
        
$this->filename $filename;
    }

    
/**
     * Parses .mo file and stores results to `$cache`
     */
    
public function parseIntoCache(CacheInterface $cache): void
    
{
        if (
$this->filename === null) {
            return;
        }

        if (! 
is_readable($this->filename)) {
            
$this->error self::ERROR_DOES_NOT_EXIST;

            return;
        }

        
$stream = new StringReader($this->filename);

        try {
            
$magic $stream->read(04);
            if (
strcmp($magicself::MAGIC_LE) === 0) {
                
$unpack 'V';
            } elseif (
strcmp($magicself::MAGIC_BE) === 0) {
                
$unpack 'N';
            } else {
                
$this->error self::ERROR_BAD_MAGIC;

                return;
            }

            
/* Parse header */
            
$total $stream->readint($unpack8);
            
$originals $stream->readint($unpack12);
            
$translations $stream->readint($unpack16);

            
/* get original and translations tables */
            
$totalTimesTwo = (int) ($total 2);// Fix for issue #36 on ARM
            
$tableOriginals $stream->readintarray($unpack$originals$totalTimesTwo);
            
$tableTranslations $stream->readintarray($unpack$translations$totalTimesTwo);

            
/* read all strings to the cache */
            
for ($i 0$i $total; ++$i) {
                
$iTimesTwo $i 2;
                
$iPlusOne $iTimesTwo 1;
                
$iPlusTwo $iTimesTwo 2;
                
$original $stream->read($tableOriginals[$iPlusTwo], $tableOriginals[$iPlusOne]);
                
$translation $stream->read($tableTranslations[$iPlusTwo], $tableTranslations[$iPlusOne]);
                
$cache->set($original$translation);
            }
        } catch (
ReaderException $e) {
            
$this->error self::ERROR_READING;

            return;
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.7896 ]--