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

Software: nginx/1.23.4. PHP/5.6.40-65+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux foro-restaurado-2 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023
aarch64
 

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

Safe-mode: OFF (not secure)

/usr/lib/python3/dist-packages/twisted/logger/   drwxr-xr-x
Free 83.26 GB of 96.73 GB (86.08%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     _file.py (2.28 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# -*- test-case-name: twisted.logger.test.test_file -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

"""
File log observer.
"""

from typing import IO, Any, Callable, Optional

from zope.interface import implementer

from twisted.python.compat import ioType
from ._format import formatEventAsClassicLogText, formatTime, timeFormatRFC3339
from ._interfaces import ILogObserver, LogEvent


@implementer(ILogObserver)
class FileLogObserver:
    """
    Log observer that writes to a file-like object.
    """

    def __init__(
        self, outFile: IO[Any], formatEvent: Callable[[LogEvent], Optional[str]]
    ) -> None:
        """
        @param outFile: A file-like object.  Ideally one should be passed which
            accepts text data.  Otherwise, UTF-8 L{bytes} will be used.
        @param formatEvent: A callable that formats an event.
        """
        if ioType(outFile) is not str:
            self._encoding: Optional[str] = "utf-8"
        else:
            self._encoding = None

        self._outFile = outFile
        self.formatEvent = formatEvent

    def __call__(self, event: LogEvent) -> None:
        """
        Write event to file.

        @param event: An event.
        """
        text = self.formatEvent(event)

        if text:
            if self._encoding is None:
                self._outFile.write(text)
            else:
                self._outFile.write(text.encode(self._encoding))
            self._outFile.flush()


def textFileLogObserver(
    outFile: IO[Any], timeFormat: Optional[str] = timeFormatRFC3339
) -> FileLogObserver:
    """
    Create a L{FileLogObserver} that emits text to a specified (writable)
    file-like object.

    @param outFile: A file-like object.  Ideally one should be passed which
        accepts text data.  Otherwise, UTF-8 L{bytes} will be used.
    @param timeFormat: The format to use when adding timestamp prefixes to
        logged events.  If L{None}, or for events with no C{"log_timestamp"}
        key, the default timestamp prefix of C{"-"} is used.

    @return: A file log observer.
    """

    def formatEvent(event: LogEvent) -> Optional[str]:
        return formatEventAsClassicLogText(
            event, formatTime=lambda e: formatTime(e, timeFormat)
        )

    return FileLogObserver(outFile, formatEvent)

:: 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 HackingTool | HackingTool | Generation time: 0.004 ]--