OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python311
/
lib
/
python3.11
/
site-packages
/
loguru
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
01/09/2025 02:18:04 AM
rwxr-xr-x
📄
__init__.py
626 bytes
05/14/2024 03:18:46 PM
rw-r--r--
📄
__init__.pyi
14.1 KB
05/14/2024 03:18:46 PM
rw-r--r--
📁
__pycache__
-
05/14/2024 03:18:46 PM
rwxr-xr-x
📄
_asyncio_loop.py
597 bytes
05/14/2024 03:18:46 PM
rw-r--r--
📄
_better_exceptions.py
19.53 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_colorama.py
1.63 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_colorizer.py
14.26 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_contextvars.py
321 bytes
05/14/2024 03:18:46 PM
rw-r--r--
📄
_ctime_functions.py
1.5 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_datetime.py
3.67 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_defaults.py
2.86 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_error_interceptor.py
1.08 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_file_sink.py
14.19 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_filters.py
618 bytes
05/14/2024 03:18:46 PM
rw-r--r--
📄
_get_frame.py
458 bytes
05/14/2024 03:18:46 PM
rw-r--r--
📄
_handler.py
12.34 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_locks_machinery.py
1.28 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_logger.py
93.72 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_recattrs.py
2.79 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_simple_sinks.py
3.65 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
_string_parsers.py
4.6 KB
05/14/2024 03:18:46 PM
rw-r--r--
📄
py.typed
0 bytes
05/14/2024 03:18:46 PM
rw-r--r--
Editing: _recattrs.py
Close
import pickle from collections import namedtuple class RecordLevel: __slots__ = ("name", "no", "icon") def __init__(self, name, no, icon): self.name = name self.no = no self.icon = icon def __repr__(self): return "(name=%r, no=%r, icon=%r)" % (self.name, self.no, self.icon) def __format__(self, spec): return self.name.__format__(spec) class RecordFile: __slots__ = ("name", "path") def __init__(self, name, path): self.name = name self.path = path def __repr__(self): return "(name=%r, path=%r)" % (self.name, self.path) def __format__(self, spec): return self.name.__format__(spec) class RecordThread: __slots__ = ("id", "name") def __init__(self, id_, name): self.id = id_ self.name = name def __repr__(self): return "(id=%r, name=%r)" % (self.id, self.name) def __format__(self, spec): return self.id.__format__(spec) class RecordProcess: __slots__ = ("id", "name") def __init__(self, id_, name): self.id = id_ self.name = name def __repr__(self): return "(id=%r, name=%r)" % (self.id, self.name) def __format__(self, spec): return self.id.__format__(spec) class RecordException(namedtuple("RecordException", ("type", "value", "traceback"))): def __repr__(self): return "(type=%r, value=%r, traceback=%r)" % (self.type, self.value, self.traceback) def __reduce__(self): # The traceback is not picklable, therefore it needs to be removed. Additionally, there's a # possibility that the exception value is not picklable either. In such cases, we also need # to remove it. This is done for user convenience, aiming to prevent error logging caused by # custom exceptions from third-party libraries. If the serialization succeeds, we can reuse # the pickled value later for optimization (so that it's not pickled twice). It's important # to note that custom exceptions might not necessarily raise a PickleError, hence the # generic Exception catch. try: pickled_value = pickle.dumps(self.value) except Exception: return (RecordException, (self.type, None, None)) else: return (RecordException._from_pickled_value, (self.type, pickled_value, None)) @classmethod def _from_pickled_value(cls, type_, pickled_value, traceback_): try: # It's safe to use "pickle.loads()" in this case because the pickled value is generated # by the same code and is not coming from an untrusted source. value = pickle.loads(pickled_value) except Exception: return cls(type_, None, traceback_) else: return cls(type_, value, traceback_)