!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/docker/api/   drwxr-xr-x
Free 13.23 GB of 57.97 GB (22.83%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     config.py (2.42 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import base64

import six

from .. import utils


class ConfigApiMixin(object):
    @utils.minimum_version('1.30')
    def create_config(self, name, data, labels=None):
        """
            Create a config

            Args:
                name (string): Name of the config
                data (bytes): Config data to be stored
                labels (dict): A mapping of labels to assign to the config

            Returns (dict): ID of the newly created config
        """
        if not isinstance(data, bytes):
            data = data.encode('utf-8')

        data = base64.b64encode(data)
        if six.PY3:
            data = data.decode('ascii')
        body = {
            'Data': data,
            'Name': name,
            'Labels': labels
        }

        url = self._url('/configs/create')
        return self._result(
            self._post_json(url, data=body), True
        )

    @utils.minimum_version('1.30')
    @utils.check_resource('id')
    def inspect_config(self, id):
        """
            Retrieve config metadata

            Args:
                id (string): Full ID of the config to inspect

            Returns (dict): A dictionary of metadata

            Raises:
                :py:class:`docker.errors.NotFound`
                    if no config with that ID exists
        """
        url = self._url('/configs/{0}', id)
        return self._result(self._get(url), True)

    @utils.minimum_version('1.30')
    @utils.check_resource('id')
    def remove_config(self, id):
        """
            Remove a config

            Args:
                id (string): Full ID of the config to remove

            Returns (boolean): True if successful

            Raises:
                :py:class:`docker.errors.NotFound`
                    if no config with that ID exists
        """
        url = self._url('/configs/{0}', id)
        res = self._delete(url)
        self._raise_for_status(res)
        return True

    @utils.minimum_version('1.30')
    def configs(self, filters=None):
        """
            List configs

            Args:
                filters (dict): A map of filters to process on the configs
                list. Available filters: ``names``

            Returns (list): A list of configs
        """
        url = self._url('/configs')
        params = {}
        if filters:
            params['filters'] = utils.convert_filters(filters)
        return self._result(self._get(url, params=params), True)

:: 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.0054 ]--