!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_tdfonline/php/convenciones/Toba/SniffsDudosos/   drwxr-xr-x
Free 14.67 GB of 61.93 GB (23.68%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     IncludingFileSniff.php (5.06 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * PEAR_Sniffs_Files_IncludingFileSniff.
 *
 * PHP version 5
 *
 * @category  PHP
 * @package   PHP_CodeSniffer
 * @author    Greg Sherwood <gsherwood@squiz.net>
 * @author    Marc McIntyre <mmcintyre@squiz.net>
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
 * @version   CVS: $Id: IncludingFileSniff.php,v 1.5 2007/10/22 23:11:56 squiz Exp $
 * @link      http://pear.php.net/package/PHP_CodeSniffer
 */

/**
 * PEAR_Sniffs_Files_IncludingFileSniff.
 *
 * Checks that the include_once is used in conditional situations, and
 * require_once is used elsewhere. Also checks that brackets do not surround
 * the file being included.
 *
 * @category  PHP
 * @package   PHP_CodeSniffer
 * @author    Greg Sherwood <gsherwood@squiz.net>
 * @author    Marc McIntyre <mmcintyre@squiz.net>
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
 * @version   Release: 1.1.0
 * @link      http://pear.php.net/package/PHP_CodeSniffer
 */
class Toba_Sniffs_Files_IncludingFileSniff implements PHP_CodeSniffer_Sniff
{

    
/**
     * Conditions that should use include_once
     *
     * @var array(int)
     */
    
private static $_conditions = array(
                                   
T_IF,
                                   
T_ELSE,
                                   
T_ELSEIF,
                                   
T_SWITCH,
                                  );


    
/**
     * Returns an array of tokens this test wants to listen for.
     *
     * @return array
     */
    
public function register()
    {
        return array(
                
T_INCLUDE_ONCE,
                
T_REQUIRE_ONCE,
                
T_REQUIRE,
                
T_INCLUDE,
               );

    }
//end register()


    /**
     * Processes this test, when one of its tokens is encountered.
     *
     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
     * @param int                  $stackPtr  The position of the current token in the
     *                                        stack passed in $tokens.
     *
     * @return void
     */
    
public function process(PHP_CodeSniffer_File $phpcsFile$stackPtr)
    {
        
$tokens $phpcsFile->getTokens();

        
$nextToken $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr 1), nulltrue);
        
/*if ($tokens[$nextToken]['code'] === T_OPEN_PARENTHESIS) {
            $error  = '"'.$tokens[$stackPtr]['content'].'"';
            $error .= ' is a statement, not a function; ';
            $error .= 'no parentheses are required';
            $phpcsFile->addError($error, $stackPtr);
        }*/

        
$inCondition = (count($tokens[$stackPtr]['conditions']) !== 0) ? true false;

        
// Check to see if this including statement is within the parenthesis of a condition.
        // If that's the case then we need to process it as being within a condition, as they
        // are checking the return value.
        
if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
            foreach (
$tokens[$stackPtr]['nested_parenthesis'] as $left => $right) {
                if (isset(
$tokens[$left]['parenthesis_owner']) === true) {
                    
$inCondition true;
                }
            }
        }

        
// Check to see if they are assigning the return value of this including call.
        // If they are then they are probably checking it, so its conditional.
        
$previous $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr 1), nulltrue);
        if (
in_array($tokens[$previous]['code'], PHP_CodeSniffer_Tokens::$assignmentTokens) === true) {
            
// The have assigned the return value to it, so its conditional.
            
$inCondition true;
        }

        
$tokenCode $tokens[$stackPtr]['code'];
        if (
$inCondition === true) {
            
// We are inside a conditional statement. We need an include_once.
            
if ($tokenCode === T_REQUIRE_ONCE) {
                
$error  '[Includes] File is being conditionally included; ';
                
$error .= 'use "include_once" instead';
                
$phpcsFile->addError($error$stackPtr);
            } else if (
$tokenCode === T_REQUIRE) {
                
$error  '[Includes] File is being conditionally included; ';
                
$error .= 'use "include" instead';
                
$phpcsFile->addError($error$stackPtr);
            }
        } else {
            
// We are unconditionally including, we need a require_once.
            
if ($tokenCode === T_INCLUDE_ONCE) {
                
$error  '[Includes] File is being unconditionally included; ';
                
$error .= 'use "require_once" instead';
                
$phpcsFile->addError($error$stackPtr);
            } else if (
$tokenCode === T_INCLUDE) {
                
$error  '[Includes] File is being unconditionally included; ';
                
$error .= 'use "require" instead';
                
$phpcsFile->addError($error$stackPtr);
            }
        }
//end if

    
}//end process()


}//end class

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.6089 ]--