����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 18.191.201.27
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/pymacaroons/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pymacaroons//caveat.py
from base64 import standard_b64encode

from pymacaroons.utils import convert_to_string, convert_to_bytes


class Caveat(object):

    def __init__(self,
                 caveat_id=None,
                 verification_key_id=None,
                 location=None,
                 version=None):
        from pymacaroons.macaroon import MACAROON_V1
        self.caveat_id = caveat_id
        self.verification_key_id = verification_key_id
        self.location = location
        if version is None:
            version = MACAROON_V1
        self._version = version

    @property
    def caveat_id(self):
        from pymacaroons.macaroon import MACAROON_V1
        if self._version == MACAROON_V1:
            return convert_to_string(self._caveat_id)
        return self._caveat_id

    @property
    def caveat_id_bytes(self):
        return self._caveat_id

    @property
    def verification_key_id(self):
        return self._verification_key_id

    @property
    def location(self):
        return convert_to_string(self._location)

    @caveat_id.setter
    def caveat_id(self, value):
        self._caveat_id = convert_to_bytes(value)

    @verification_key_id.setter
    def verification_key_id(self, value):
        self._verification_key_id = convert_to_bytes(value)

    @location.setter
    def location(self, value):
        self._location = convert_to_bytes(value)

    def first_party(self):
        return self._verification_key_id is None

    def third_party(self):
        return self._verification_key_id is not None

    def to_dict(self):
        try:
            cid = convert_to_string(self.caveat_id)
        except UnicodeEncodeError:
            cid = convert_to_string(standard_b64encode(self.caveat_id_bytes))
        return {
            'cid': cid,
            'vid': (
                standard_b64encode(self.verification_key_id)
                if self.verification_key_id else None
            ),
            'cl': self.location
        }

Youez - 2016 - github.com/yon3zu
LinuXploit