!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/smm.picotech.app/public_html/vendor/psy/psysh/src/VersionUpdater/   drwxr-xr-x
Free 28.62 GB of 117.98 GB (24.26%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     GitHubChecker.php (2.03 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?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.
 */

namespace Psy\VersionUpdater;

use 
Psy\Shell;

class 
GitHubChecker implements Checker
{
    const 
URL 'https://api.github.com/repos/bobthecow/psysh/releases/latest';

    private 
$latest;

    public function 
isLatest(): bool
    
{
        
// version_compare doesn't handle semver completely;
        // strip pre-release and build metadata before comparing
        
$version \preg_replace('/[+-]\w+/'''Shell::VERSION);

        return 
\version_compare($version$this->getLatest(), '>=');
    }

    public function 
getLatest(): string
    
{
        if (!isset(
$this->latest)) {
            
$this->setLatest($this->getVersionFromTag());
        }

        return 
$this->latest;
    }

    
/**
     * @param string $version
     */
    
public function setLatest(string $version)
    {
        
$this->latest $version;
    }

    
/**
     * @return string|null
     */
    
private function getVersionFromTag()
    {
        
$contents $this->fetchLatestRelease();
        if (!
$contents || !isset($contents->tag_name)) {
            throw new 
\InvalidArgumentException('Unable to check for updates');
        }
        
$this->setLatest($contents->tag_name);

        return 
$this->getLatest();
    }

    
/**
     * Set to public to make testing easier.
     *
     * @return mixed
     */
    
public function fetchLatestRelease()
    {
        
$context \stream_context_create([
            
'http' => [
                
'user_agent' => 'PsySH/'.Shell::VERSION,
                
'timeout'    => 1.0,
            ],
        ]);

        
\set_error_handler(function () {
            
// Just ignore all errors with this. The checker will throw an exception
            // if it doesn't work :)
        
});

        
$result = @\file_get_contents(self::URLfalse$context);

        
\restore_error_handler();

        return 
\json_decode($result);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0038 ]--