!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: nginx/1.23.4. PHP/5.6.40-65+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux foro-restaurado-2 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/home/scripts/pba/phc-read-only/test/subjects/parsing/   drwxrwxr-x
Free 83.33 GB of 96.73 GB (86.15%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

    
# note that this test will not work on cygwin, because of incorrect PHP
    # behaviour, specifically that PHP includes using \\ on cygwin (even though
    # it opens files using /

// the following not being included
//- files that arent found
//- files that dont parse
//- files with return statements arent
//- files with return statements in their classes are ok                       
//- include_once the second time.

// the following issuing errors
//- the parse failing                                                          
//- class redefinition being spotted
//- method redefinition being spotted
//- the file not being found for require

// warnings on
//- files which arent included
//- the file not being found


    # there should be no require, include, include_once or require_once
    # statements in this file once its passed through phc with
    # --compile-time-includes

    
function fail($file$line$reason)
    {
        print 
"Failure: '$reason' on $file:$line\n";
    }


    
# checks variables are overwritten

    
$a1 "old value";
    
$a2 "my old value";

    echo 
"about to include included_var_overwrite.php\n";
    
$result = include_once "included_var_overwrite.php";
    
var_dump ($result);

    
var_dump($a1);
    
var_dump($a2);

    if (
$a1 == "old value" or $a2 == "my old value")
    {
        
fail(__FILE____LINE__"var overwrite");
    }




    
# checks classes are added

    
echo "about to include included_classes_and_functions.php\n";
    
$result = include_once "included_classes_and_functions.php";
    
var_dump ($result);

    
$b = new B();
    
var_dump($b);
    
$b $b->b();
    
var_dump($b);
    if(!
$b)
    {
        
fail(__FILE____LINE__"included class");
    }
    
$b b();
    
var_dump($b);
    if(!
$b)
    {
        
fail(__FILE____LINE__"included function");
    }
        



    
# include a file with return statements in the classes
    # if this fails, the grep will remove it

    
echo "about to include included_classes_with_return_values.php\n";
    
$result = include_once "included_classes_with_return_values.php";
    
var_dump ($result);

    
$c = new C();
    
var_dump($c);
    
$c $c->cc();
    
var_dump($c);
    if (
$c != 7)
    {
        
fail(__FILE____LINE__"class with return value");
    }



    
# files with directory levels

    
echo "about to include include_dir/../../bugs/././../horrible/invocation_priorities.php\n";
    
$result = include_once "include_dir/../../bugs/./../horrible/invocation_priorities.php";
    
var_dump ($result);

    
var_dump($f);
    
var_dump($a);
    
var_dump($x);
    if(!
$x)
    {
        
fail(__FILE____LINE__"directory levels");
    }


    
# files from the current working directory, with ./

    
$x "zzz";
    
$y "zzz";
    
$xx "zzz";
    echo 
"about to include ./test/subjects/horrible/obfuscated_foreach.php\n";
    
$result = include_once "./test/subjects/horrible/obfuscated_foreach.php";
    
var_dump ($result);

    
var_dump($x);
    
var_dump($y);
    
var_dump($xx);
    if(!
$xx)
    {
        
fail(__FILE____LINE__"current working directory");
    }



    
# files from the current working directory
    
    
echo "about to include test/subjects/horrible/obfuscated_foreach.php\n";
    
$result = include_once "test/subjects/horrible/obfuscated_foreach.php";
    
var_dump ($result);

    
var_dump($x);
    
var_dump($y);
    
var_dump($xx);
    if(!
$xx)
    {
        
fail(__FILE____LINE__"current working directory");
    }


    
# including files with correct __FILE__
    # Note: this test taken out. We dont want to process file, merely include it
    # in the tree    


    # calling files with include
    
    
echo "about to include included_recursive1.php\n";
    
$result = require_once "included_recursive1.php";
    
var_dump ($result);
    
    
var_dump($f);
    if(
$f !== 26)
    {
        
fail(__FILE____LINE__"recursive include");
    }


    
# including within a function

    
function g()
    {
        
$a1 "old string";
        
$a2 "old string";
    
        echo 
"about to include included_var_overwrite.php\n";    
        
$result = require "included_var_overwrite.php";
        
var_dump ($result);

        
var_dump($a1);
        
var_dump($a2);

        if (
$a1 == "old value" or $a2 == "my old value")
        {
            
fail(__FILE____LINE__"var overwrite within function");
        }
    }
    
g();

    
# including within a class

    
class H
    
{
        function 
H()
        {
            echo 
"H\n";
        }

        function 
g()
        {
            
$a1 "old string";
            
$a2 "old string";

            echo 
"about to include included_var_overwrite.php\n";
            
$result = include_once "included_var_overwrite.php";
            
var_dump ($result);

            if (
$a1 == "old value" or $a2 == "my old value")
            {
                
fail(__FILE____LINE__"var overwrite within class");
            }
        }
    }
    
$h = new H();
    
var_dump($h);
    
$h $h->g();
    
var_dump($h);


    
# the included file using varaibles from this file
    
$i1 "some value";
    
$i2 "another value";

    echo 
"about to include included_use_existing_vars.php\n";
    
$result = include_once "included_use_existing_vars.php";
    
var_dump ($result);
    
    
# the included file using functions from this file

    
echo "about to include included_use_vars_in_function.php\n";
    
$result = include_once "included_use_vars_in_function.php";
    
var_dump ($result);

    
$j j(1,2);
    
var_dump($j);

    
# the included file using classes from this file
    
    
echo "about to include included_use_vars_in_classes.php\n";
    
$result = include_once "included_use_vars_in_classes.php";
    
var_dump ($result);

    
$k = new K();
    
var_dump($k);
    
$k $k->kk();
    
var_dump($k);


?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by HackingTool | HackingTool | Generation time: 0.0044 ]--