404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.118.24.176: ~ $
<?php

/*
 * This file is part of Psy Shell.
 *
 * (c) 2012-2023 Justin Hileman
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Symfony\Component\Finder\Finder;

$polyfillsBootstraps = \array_map(
    function (SplFileInfo $fileInfo) {
        return $fileInfo->getPathname();
    },
    \iterator_to_array(
        Finder::create()
            ->files()
            ->in(__DIR__.'/vendor/symfony/polyfill-*')
            ->name('bootstrap*.php'),
        false
    )
 );

$polyfillsStubs = [];

try {
    $polyfillsStubs = \array_map(
        function (SplFileInfo $fileInfo) {
            return $fileInfo->getPathname();
        },
        \iterator_to_array(
            Finder::create()
                ->files()
                ->in(__DIR__.'/vendor/symfony/polyfill-*/Resources/stubs')
                ->name('*.php'),
            false
        )
    );
} catch (Throwable $e) {
    // There may not be any stubs?
}

return [
    'exclude-namespaces' => [
        'Psy',
        'Symfony\Polyfill',
    ],

    'exclude-constants' => [
        // Symfony global constants
        '/^SYMFONY\_[\p{L}_]+$/',
    ],

    'exclude-files' => \array_merge($polyfillsBootstraps, $polyfillsStubs),

    'patchers' => [
        // https://github.com/humbug/php-scoper/issues/294
        // https://github.com/humbug/php-scoper/issues/286
        static function (string $filePath, string $prefix, string $contents): string {
            if (!\in_array($filePath, ['src/Formatter/DocblockFormatter.php', 'src/Output/ShellOutput.php'], true)) {
                return $contents;
            }

            return \str_replace(
                '\'Symfony\\\\Component\\\\Console\\\\Formatter\\\\OutputFormatter\'',
                \sprintf(
                    '\'%s\\%s\'',
                    $prefix,
                    'Symfony\\Component\\Console\\Formatter\\OutputFormatter'
                ),
                $contents
            );
        },
        // Symfony patches
        static function (string $filePath, string $prefix, string $contents): string {
            if ('vendor/symfony/debug/DebugClassLoader.php' !== $filePath) {
                return $contents;
            }

            return \preg_replace(
                '/case \'(Symfony\\\\.+\\\\)\':/',
                \sprintf(
                    'case \'%s\\\\\\\$1\':',
                    $prefix
                ),
                $contents
            );
        },
        // https://github.com/humbug/php-scoper/issues/286
        static function (string $filePath, string $prefix, string $contents): string {
            if ('vendor/symfony/var-dumper/Cloner/AbstractCloner.php' !== $filePath) {
                return $contents;
            }

            return \preg_replace(
                '/\'(Symfony\\\\.+?)\'/',
                \sprintf(
                    '\'%s\\\\\\\$1\'',
                    $prefix
                ),
                $contents
            );
        },
        // https://github.com/humbug/php-scoper/issues/286
        static function (string $filePath, string $prefix, string $contents): string {
            if ('vendor/symfony/debug/Exception/FlattenException.php' !== $filePath) {
                return $contents;
            }

            return \preg_replace(
                '/\'(Symfony\\\\.+?)\'/',
                \sprintf(
                    '\'%s\\\\\\\$1\'',
                    $prefix
                ),
                $contents
            );
        },
        // PHP-Parser patches
        static function (string $filePath, string $prefix, string $contents): string {
            if ('vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php' !== $filePath) {
                return $contents;
            }

            return \str_replace(
                '\'PhpParser\\\\Node\\\\\'',
                \sprintf(
                    '\'%s\\\\PhpParser\\\\Node\\\\\'',
                    $prefix
                ),
                $contents
            );
        },
        static function (string $filePath, string $prefix, string $contents): string {
            if ('vendor/nikic/php-parser/lib/PhpParser/Unserializer/XML.php' !== $filePath) {
                return $contents;
            }

            $contents = \preg_replace(
                '/\'(PhpParser\\\\.+(?:\\\\)?)\'/',
                \sprintf(
                    '\'%s\\\\\\\$1\'',
                    $prefix
                ),
                $contents
            );

            $contents = \preg_replace(
                '/\'(PhpParser\\\\\\\\\p{L}+)(?:\\\\\\\\)?\'/u',
                \sprintf(
                    '\'%s\\\\\\\$1\'',
                    $prefix
                ),
                $contents
            );

            return $contents;
        },
        static function (string $filePath, string $prefix, string $contents): string {
            if ('vendor/nikic/php-parser/lib/PhpParser/Lexer.php' !== $filePath) {
                return $contents;
            }

            return \str_replace(
                '\'PhpParser\\\\Parser\\\\Tokens::\'',
                \sprintf(
                    '\'%s\\\\PhpParser\\\\Parser\\\\Tokens::\'',
                    $prefix
                ),
                $contents
            );
        },
    ],
];

Filemanager

Name Type Size Permission Actions
.git Folder 0755
.github Folder 0755
.phan Folder 0755
bin Folder 0755
src Folder 0755
test Folder 0755
vendor-bin Folder 0755
.editorconfig File 234 B 0644
.gitattributes File 451 B 0644
.gitignore File 195 B 0644
.styleci.yml File 425 B 0644
LICENSE File 1.08 KB 0644
Makefile File 3.26 KB 0644
README.md File 2.35 KB 0644
box.json.dist File 310 B 0644
codecov.yml File 169 B 0644
composer.json File 1.72 KB 0644
phpstan.neon.dist File 897 B 0644
phpunit.xml.dist File 389 B 0644
scoper.inc.php File 5.42 KB 0644