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

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/lib/python3.6/site-packages/tracer/tests/   drwxr-xr-x
Free 303.04 GB of 429.69 GB (70.52%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test_hooks.py (1.01 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
from .__meta__ import *
from tracer.hooks import HooksObserver, match

called = None

@match("app1")
def hook_dummy():
    global called
    called = "dummy"

@match(["app2", "app3"])
def hook_dummy_list():
    global called
    called = "dummy_list"

@match("foo")
def hook_dummy_append1():
    global called
    called.append("foo")

@match("bar")
def hook_dummy_append2():
    global called
    called.append("bar")


class TestHooks(unittest.TestCase):

    def setUp(self):
        self.observer = HooksObserver()
        global called
        called = None

    def test_hook(self):
        self.observer("app1")
        self.assertEqual(called, "dummy")

        self.observer("app2")
        self.assertEqual(called, "dummy_list")

        self.observer("app3")
        self.assertEqual(called, "dummy_list")

    def test_hooks_list(self):
        global called
        called = []
        self.observer("foo")
        self.observer("bar")
        self.assertListEqual(called, ["foo", "bar"])

    def test_undefined_hook(self):
        global called
        self.observer("undefined")
        self.assertIsNone(called)



if __name__ == '__main__':
    unittest.main()

:: 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 KaizenLouie | C99Shell Github | Generation time: 0.0047 ]--