!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

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

Safe-mode: OFF (not secure)

/var/www/html/pmb/master/weevely3-master/tests/   drwxr-xr-x
Free 12.99 GB of 57.97 GB (22.4%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     test_shell_sh.py (2.4 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
from tests.base_test import BaseTest
from weevely.core.weexceptions import ArgparseError
from weevely.core.vectors import PhpCode
from weevely.core.vectors import Os
from weevely.core import modules
from weevely.core.sessions import SessionURL
from weevely.core import messages
import logging
import os

class SystemInfo(BaseTest):

    def setUp(self):
        self.session = SessionURL(self.url, self.password, volatile = True)
        modules.load_modules(self.session)

        self.run_argv = modules.loaded['shell_sh'].run_argv

    def _spoil_vectors_but(self, vector_safe_name):
        # Spoil all the module sessions but the safe one
        for i in range(0, len(modules.loaded['shell_sh'].vectors)):
            name = modules.loaded['shell_sh'].vectors[i].name
            payload = modules.loaded['shell_sh'].vectors[i].arguments[0]

            if name != vector_safe_name:
                modules.loaded['shell_sh'].vectors[i] = PhpCode('\'"%s' % payload, name)

    def test_run_unless(self):

        vector_safe_name = 'proc_open'

        self._spoil_vectors_but(vector_safe_name)

        # Check correctness of execution
        self.assertEqual(self.run_argv(["echo -n 1"]), "1");

        # Check stored vector
        self.assertEqual(self.session['shell_sh']['stored_args']['vector'], vector_safe_name)

    def test_param_vector(self):

        vector_safe_name = 'proc_open'

        # Check correctness of execution
        self.assertEqual(self.run_argv(["-vector", vector_safe_name, "echo -n 1"]), "1");

        # Check stored vector
        self.assertEqual(self.session['shell_sh']['stored_args']['vector'], vector_safe_name)

    def test_vector_one_os(self):

        bogus_vector = 'bogus_win'

        # Add a bogus Os.WIN vector
        modules.loaded['shell_sh'].vectors.append(PhpCode("echo(1);", name=bogus_vector, target=Os.WIN))

        # Check if called forced the bogusv vector name, returns Null
        self.assertRaises(ArgparseError, self.run_argv, ["-vector", bogus_vector, "echo 1"]);

    def test_vector_all_os(self):

        bogus_vector = 'bogus_win'

        # Add a bogus Os.WIN vector
        modules.loaded['shell_sh'].vectors.append(PhpCode("echo(1);", name=bogus_vector, target=Os.WIN))

        # Spoil all vectors but bogus_win
        self._spoil_vectors_but(bogus_vector)

        # Check if looping all vectors still returns None
        self.assertIsNone(self.run_argv(["echo 1"]), None);

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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