403Webshell
Server IP : 172.67.158.161  /  Your IP : 3.135.200.4
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/giankuin/khowordpress.com/wp-content/plugins/duplicator-pro/lib/dup_archive/classes/headers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/giankuin/khowordpress.com/wp-content/plugins/duplicator-pro/lib/dup_archive/classes/headers/class.duparchive.header.glob.php
<?php
if (!defined("ABSPATH") && !defined("DUPXABSPATH"))
    die("");
require_once(dirname(__FILE__).'/../util/class.duparchive.util.php');
require_once(dirname(__FILE__).'/class.duparchive.header.u.php');

if(!class_exists('DupArchiveGlobHeader')) {
// Format
// #C#{$originalSize}#{$storedSize}!
class DupArchiveGlobHeader //extends HeaderBase
{
    //	public $marker;
    public $originalSize;
    public $storedSize;
    public $hash;

    const MaxHeaderSize = 255;

    public function __construct()
    {

    }

    public static function readFromArchive($archiveHandle, $skipGlob)
    {
        $instance = new DupArchiveGlobHeader();

        DupArchiveUtil::log('Reading glob starting at ' . ftell($archiveHandle));

        $startElement = fread($archiveHandle, 3);

        //if ($marker != '?G#') {
        if ($startElement !== '<G>') {
            throw new Exception("Invalid glob header marker found {$startElement}. location:" . ftell($archiveHandle));
        }

        $instance->originalSize           = DupArchiveHeaderU::readStandardHeaderField($archiveHandle, 'OS');
        $instance->storedSize             = DupArchiveHeaderU::readStandardHeaderField($archiveHandle, 'SS');
        $instance->hash                   = DupArchiveHeaderU::readStandardHeaderField($archiveHandle, 'HA');

        // Skip the </G>
        fread($archiveHandle, 4);
        
        if ($skipGlob) {
            DupProSnapLibIOU::fseek($archiveHandle, $instance->storedSize, SEEK_CUR);
        }

        return $instance;
    }

    public function writeToArchive($archiveHandle)
    {
        // <G><OS>x</OS>x<SS>x</SS><HA>x</HA></G>

        $headerString = '<G><OS>'.$this->originalSize.'</OS><SS>'.$this->storedSize.'</SS><HA>'.$this->hash.'</HA></G>';

        //DupProSnapLibIOU::fwrite($archiveHandle, $headerString);
        $bytes_written = @fwrite($archiveHandle, $headerString);

        if ($bytes_written === false) {
            throw new Exception('Error writing to file.');
        } else {
            return $bytes_written;
        }
    }
}
}

Youez - 2016 - github.com/yon3zu
LinuXploit