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

/usr/lib/python3/dist-packages/virtualenv/run/   drwxr-xr-x
Free 13.03 GB of 57.97 GB (22.48%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     app_data.py (2.4 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import logging
import os
from argparse import Action, ArgumentError
from tempfile import mkdtemp

from appdirs import user_data_dir

from virtualenv.util.lock import ReentrantFileLock
from virtualenv.util.path import safe_delete


class AppData(object):
    def __init__(self, folder):
        self.folder = ReentrantFileLock(folder)
        self.transient = False

    def __repr__(self):
        return "{}".format(self.folder.path)

    def clean(self):
        logging.debug("clean app data folder %s", self.folder.path)
        safe_delete(self.folder.path)

    def close(self):
        """"""


class TempAppData(AppData):
    def __init__(self):
        super(TempAppData, self).__init__(folder=mkdtemp())
        self.transient = True
        logging.debug("created temporary app data folder %s", self.folder.path)

    def close(self):
        logging.debug("remove temporary app data folder %s", self.folder.path)
        safe_delete(self.folder.path)


class AppDataAction(Action):
    def __call__(self, parser, namespace, values, option_string=None):
        folder = self._check_folder(values)
        if folder is None:
            raise ArgumentError("app data path {} is not valid".format(values))
        setattr(namespace, self.dest, AppData(folder))

    @staticmethod
    def _check_folder(folder):
        folder = os.path.abspath(folder)
        if not os.path.exists(folder):
            try:
                os.makedirs(folder)
                logging.debug("created app data folder %s", folder)
            except OSError as exception:
                logging.info("could not create app data folder %s due to %r", folder, exception)
                return None
        write_enabled = os.access(folder, os.W_OK)
        if write_enabled:
            return folder
        logging.debug("app data folder %s has no write access", folder)
        return None

    @staticmethod
    def default():
        for folder in AppDataAction._app_data_candidates():
            folder = AppDataAction._check_folder(folder)
            if folder is not None:
                return AppData(folder)
        return None

    @staticmethod
    def _app_data_candidates():
        key = str("VIRTUALENV_OVERRIDE_APP_DATA")
        if key in os.environ:
            yield os.environ[key]
        else:
            yield user_data_dir(appname="virtualenv", appauthor="pypa")


__all__ = (
    "AppData",
    "TempAppData",
    "AppDataAction",
)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

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