!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/src/weevely/core/   drwxr-xr-x
Free 13.11 GB of 57.97 GB (22.61%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     loggers.py (1.7 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import logging
import logging.handlers
import os

from weevely import core


log = None
logfile = None


class WeevelyFormatter(logging.Formatter):
    FORMATS = {
        # logging.DEBUG :"[D][%(module)s.%(funcName)s:%(lineno)d] %(message)s",
        logging.DEBUG: "[D][%(module)s] %(message)s",
        logging.INFO: "%(message)s",
        logging.WARNING: "[-][%(module)s] %(message)s",
        logging.ERROR: "[!][%(module)s] %(message)s",
        logging.CRITICAL: "[!][%(module)s] %(message)s",
        "DEFAULT": "[%(levelname)s] %(message)s",
    }

    def format(self, record):
        self._fmt = self.FORMATS.get(record.levelno, self.FORMATS["DEFAULT"])
        return logging.Formatter.format(self, record)


if not os.path.isdir(core.config.base_path):
    os.makedirs(core.config.base_path)

"""Initialize the handler to dump log to files"""
log_path = os.path.join(core.config.base_path, "weevely.log")
file_handler = logging.handlers.RotatingFileHandler(
    log_path, mode="a", maxBytes=5 * 1024 * 1024, backupCount=2, encoding=None, delay=0
)
file_handler.setFormatter(WeevelyFormatter())

"""Initialize the normal handler"""
stream_handler = logging.StreamHandler()
stream_handler.setFormatter(WeevelyFormatter())

"""Initialize the standard logger"""
log = logging.getLogger("log")
log.addHandler(file_handler)
log.addHandler(stream_handler)
# We can set the a different level for to the two handlers,
# but the global has to be set to the lowest. Fair enough.
log.setLevel(logging.DEBUG)
file_handler.setLevel(logging.DEBUG)
stream_handler.setLevel(logging.INFO)

"""Initialize the debug logger, that dumps just to logfile"""
dlog = logging.getLogger("dlog")
dlog.addHandler(file_handler)
dlog.setLevel(logging.INFO)

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