403Webshell
Server IP : 54.94.228.101  /  Your IP : 172.28.1.13
Web Server : Apache
System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/vinumday2_0/vendor/nesbot/carbon/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/vinumday2_0/vendor/nesbot/carbon/build.php
<?php

chdir(__DIR__);
$currentBranch = 'master';
if (preg_match('/On branch ([^\n]+)\n/', shell_exec('git status'), $match)) {
    $currentBranch = $match[1];
}
shell_exec('git fetch --all --tags --prune');
$remotes = explode("\n", trim(shell_exec('git remote')));
$tagsCommand = count($remotes)
    ? 'git ls-remote --tags '.(in_array('upstream', $remotes) ? 'upstream' : (in_array('origin', $remotes) ? 'origin' : $remotes[0]))
    : 'git tag';
$tags = array_map(function ($ref) {
    $ref = explode('refs/tags/', $ref);

    return isset($ref[1]) ? $ref[1] : $ref[0];
}, array_filter(explode("\n", trim(shell_exec($tagsCommand))), function ($ref) {
    return substr($ref, -3) !== '^{}';
}));
usort($tags, 'version_compare');

$tag = isset($argv[1]) && !in_array($argv[1], array('last', 'latest')) ? $argv[1] : end($tags);

if (strtolower($tag) !== 'all') {
    if (!in_array($tag, $tags)) {
        echo "Tag must be one of remote tags available:\n";
        foreach ($tags as $_tag) {
            echo "  - $_tag\n";
        }
        echo "\"$tag\" does not match.\n";

        exit(1);
    }

    $tags = array($tag);
}

foreach ($tags as $tag) {
    $archive = "Carbon-$tag.zip";
    if (isset($argv[2]) && $argv[2] === 'missing' && file_exists($archive)) {
        continue;
    }

    $branch = "build-$tag";
    shell_exec('git stash');
    shell_exec("git branch -d $branch");
    shell_exec("git checkout tags/$tag -b $branch");
    shell_exec('composer config platform.php 5.3.9');
    shell_exec('composer update --no-interaction --no-dev --optimize-autoloader');
    $zip = new ZipArchive();

    $zip->open($archive, ZipArchive::CREATE | ZipArchive::OVERWRITE);

    foreach (array('src', 'vendor', 'Carbon') as $directory) {
        if (is_dir($directory)) {
            $directory = realpath($directory);
            $base = dirname($directory);

            $files = new RecursiveIteratorIterator(
                new RecursiveDirectoryIterator($directory),
                RecursiveIteratorIterator::LEAVES_ONLY
            );

            foreach ($files as $name => $file) {
                if (!$file->isDir()) {
                    $filePath = $file->getRealPath();

                    $zip->addFile($filePath, substr($filePath, strlen($base) + 1));
                }
            }
        }
    }

    $autoload = 'autoload.php';
    file_put_contents($autoload, "<?php\n\n/**\n * @version $tag\n */\n\nrequire __DIR__.'/vendor/autoload.php';\n");
    $zip->addFile($autoload, $autoload);
    $zip->close();
    unlink($autoload);

    shell_exec('git checkout .');
    shell_exec("git checkout $currentBranch");
    shell_exec("git branch -d $branch");
    shell_exec('git stash pop');
    shell_exec('composer update --no-interaction');
}

exit(0);

Youez - 2016 - github.com/yon3zu
LinuXploit