!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/lib/python3/dist-packages/macaroonbakery/httpbakery/   drwxr-xr-x
Free 13.12 GB of 57.97 GB (22.63%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     _keyring.py (2.25 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# Copyright 2017 Canonical Ltd.
# Licensed under the LGPLv3, see LICENCE file for details.
import macaroonbakery.bakery as bakery
import requests
from ._error import BAKERY_PROTOCOL_HEADER

from six.moves.urllib.parse import urlparse


class ThirdPartyLocator(bakery.ThirdPartyLocator):
    ''' Implements macaroonbakery.ThirdPartyLocator by first looking in the
    backing cache and, if that fails, making an HTTP request to find the
    information associated with the given discharge location.
    '''

    def __init__(self, allow_insecure=False):
        '''
        @param url: the url to retrieve public_key
        @param allow_insecure: By default it refuses to use insecure URLs.
        '''
        self._allow_insecure = allow_insecure
        self._cache = {}

    def third_party_info(self, loc):
        u = urlparse(loc)
        if u.scheme != 'https' and not self._allow_insecure:
            raise bakery.ThirdPartyInfoNotFound(
                'untrusted discharge URL {}'.format(loc))
        loc = loc.rstrip('/')
        info = self._cache.get(loc)
        if info is not None:
            return info
        url_endpoint = '/discharge/info'
        headers = {
            BAKERY_PROTOCOL_HEADER: str(bakery.LATEST_VERSION)
        }
        resp = requests.get(url=loc + url_endpoint, headers=headers)
        status_code = resp.status_code
        if status_code == 404:
            url_endpoint = '/publickey'
            resp = requests.get(url=loc + url_endpoint, headers=headers)
            status_code = resp.status_code
        if status_code != 200:
            raise bakery.ThirdPartyInfoNotFound(
                'unable to get info from {}'.format(url_endpoint))
        json_resp = resp.json()
        if json_resp is None:
            raise bakery.ThirdPartyInfoNotFound(
                'no response from /discharge/info')
        pk = json_resp.get('PublicKey')
        if pk is None:
            raise bakery.ThirdPartyInfoNotFound(
                'no public key found in /discharge/info')
        idm_pk = bakery.PublicKey.deserialize(pk)
        version = json_resp.get('Version', bakery.VERSION_1)
        self._cache[loc] = bakery.ThirdPartyInfo(
            version=version,
            public_key=idm_pk
        )
        return self._cache.get(loc)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0188 ]--