!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/codegen/   drwxrwxr-x
Free 83.37 GB of 96.73 GB (86.19%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     oop_set_and_get.php (3.81 KB)      -rw-rw-r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
    
class C1
    
{
        var 
$a1;

        
// Attributes must be prefixed using $this; otherwise, it's a local var
        // Moreover, __set and __get do not get called for declared attributes
        
function f1()
        {
            echo 
"<C1::f1>\n";
            
$a1 1;
            
$this->a1 2;
            
var_dump($a1);
            
var_dump($this->a1);
            echo 
"</C1::f1>\n";
        }

        
// Set and get only get called if the attribute is undeclared *and*
        // has not yet been added to the class
        
function f2()
        {
            echo 
"<C1::f2>\n";
            
$this->a2 3;                 // calls __set
            
var_dump($this->a2);    // does not call __get

            
var_dump($this->a3);    // calls __get
            
var_dump($this->a3);    // calls __get
            
$this->a3 4;                // calls __set
            
$this->a3 5;                // does not call __set 
            
var_dump($this->a3);    // does not call __get

            
echo "</C1::f2>\n";
        }

        
// Behaviour is similar for "variable" attributes
        
function f3()
        {
            echo 
"<C1::f3>\n";

            
$x "a4";

            
var_dump($this->$x);    // calls __get
            
$this->$x 6;                // calls __set
            
var_dump($this->$x);    // does not call __get

            
echo "</C1::f3>\n";
        }

        function 
__get($var)
        {
            echo 
"C1::__get($var)\n";
            return 
$this->$var;
        }

        function 
__set($var$value)
        {
            echo 
"C1::__set($var)\n";
            
$this->$var $value;
        }
    }

    
// __get without __set
    
class C2
    
{
        function 
f1()
        {
            echo 
"<C2::f1>\n";
            
var_dump($this->a1);
            
$this->a1 7;
            
var_dump($this->a1);
            echo 
"</C2::f1>\n";
        }

        function 
__get($var)
        {
            echo 
"C2::__get($var)\n";
            return 
$this->$var;
        }
    }
    
    
// __set without __get
    
class C3
    
{
        function 
f1()
        {
            echo 
"<C3::f1>\n";
            
var_dump($this->a1);
            
$this->a1 7;
            
var_dump($this->a1);
            echo 
"</C3::f1>\n";
        }

        function 
__set($var$value)
        {
            echo 
"C3::__set($var)\n";
            
$this->$var $value;
        }
    }

    
// neither __set nor __get
    
class C4
    
{
        function 
f1()
        {
            echo 
"<C4::f1>\n";
            
var_dump($this->a1);
            
$this->a1 7;
            
var_dump($this->a1);
            echo 
"</C4::f1>\n";
        }
    }

    
// __get is recursively called only for variables *other* than the argument
    // to __get
    
class C5
    
{
        function 
f1()
        {
            echo 
"<C5::f1>\n";
            
var_dump($this->a1);    
            
var_dump($this->a2);    
            echo 
"</C5::f1>\n";
        }

        function 
__get($var)
        {
            echo 
"C5::__get($var)\n";
            return 
$this->a2;
        }
    }
    
    
// __set is recursively called only for variables *other* than the argument
    // to __set (just like __get)
    
class C6
    
{
        function 
f1()
        {
            echo 
"<C6::f1>\n";
            
$this->a1 5;
            unset(
$this->a2);
            
$this->a2 5;
            echo 
"</C6::f1>\n";
        }

        function 
__set($var$value)
        {
            echo 
"C6::__set($var)\n";
            
$this->a2 $value;
        }
    }

    
// However, setting an undeclared attribute within __get *does* result in
    // a call to __set, and getting an undeclared attribute within __set *does*
    // result in a call to __get
    
class C7
    
{
        function 
f1()
        {
            echo 
"<C7::f1>\n";
            
var_dump($this->a1);
            unset(
$this->a2);
            echo 
"****\n";
            
var_dump($this->a2);
            echo 
"****\n";
            
$this->a3 5;
            echo 
"</C7::f1>\n";
        }

        function 
__get($var)
        {
            echo 
"C7::__get($var)\n";
            
$this->a2 1;
            return 
$this->$var;
        }

        function 
__set($var$value)
        {
            echo 
"C7::__set($var)\n";
            
var_dump($this->a3);
            
$this->$var $value;
        }
    }

    
// Even when an attribute is accessed in a function which is invoked by a
    // a call to __get for that same attribute, __get is not recursively called
    
class C8
    
{
        function 
f1()
        {
            echo 
"<C8::f1>\n";
            
var_dump($this->a1);
            echo 
"</C8::f1>\n";
        }

        function 
__get($var)
        {
            echo 
"C8::__get($var)\n";
            return 
$this->g($var);
        }

        function 
g($var)
        {
            echo 
"C8::g($var)\n";
            return 
$this->$var;
        }
    }

    
$c1 = new C1;

    
$c1->f1();
    
var_dump($a1);

    
$c1->f2();
    
$c1->f3();

    
$c2 = new C2(); $c2->f1();
    
$c3 = new C3(); $c3->f1();
    
$c4 = new C4(); $c4->f1();
    
$c5 = new C5(); $c5->f1();
    
$c6 = new C6(); $c6->f1();
    
$c7 = new C7(); $c7->f1();
    
$c8 = new C8(); $c8->f1();
?>

:: 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.0048 ]--