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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/usr/lib/python3/dist-packages/uaclient/api/u/pro/attach/magic/revoke/   drwxr-xr-x
Free 28.58 GB of 117.98 GB (24.23%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     v1.py (2.58 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
from uaclient.api import exceptions
from uaclient.api.api import APIEndpoint
from uaclient.api.data_types import AdditionalInfo
from uaclient.config import UAConfig
from uaclient.contract import UAContractClient
from uaclient.data_types import DataObject, Field, StringDataValue


class MagicAttachRevokeOptions(DataObject):
    fields = [
        Field(
            "magic_token",
            StringDataValue,
            doc="The Token provided by the initiate endpoint.",
        ),
    ]

    def __init__(self, magic_token):
        self.magic_token = magic_token


class MagicAttachRevokeResult(DataObject, AdditionalInfo):
    pass


def revoke(options: MagicAttachRevokeOptions) -> MagicAttachRevokeResult:
    return _revoke(options, UAConfig())


def _revoke(
    options: MagicAttachRevokeOptions, cfg: UAConfig
) -> MagicAttachRevokeResult:
    """
    This endpoint revokes a Magic Attach Token.
    """
    contract = UAContractClient(cfg)
    contract.revoke_magic_attach_token(options.magic_token)

    return MagicAttachRevokeResult()


endpoint = APIEndpoint(
    version="v1",
    name="MagicAttachRevoke",
    fn=_revoke,
    options_cls=MagicAttachRevokeOptions,
)

_doc = {
    "introduced_in": "27.11",
    "requires_network": True,
    "example_python": """
from uaclient.api.u.pro.attach.magic.revoke.v1 import MagicAttachRevokeOptions, revoke

options = MagicAttachWaitOptions(magic_token="<magic_token>")
result = revoke(options)
""",  # noqa: E501
    "result_class": MagicAttachRevokeResult,
    "exceptions": [
        (
            exceptions.ConnectivityError,
            (
                "Raised if it is not possible to connect to the contracts"
                " service."
            ),
        ),
        (
            exceptions.ContractAPIError,
            (
                "Raised if there is an unexpected error in the contracts"
                " service interaction."
            ),
        ),
        (
            exceptions.MagicAttachTokenAlreadyActivated,
            (
                "Raised when trying to revoke a Token which was already"
                " activated through the UI."
            ),
        ),
        (
            exceptions.MagicAttachTokenError,
            "Raised when an invalid/expired Token is sent.",
        ),
        (
            exceptions.MagicAttachUnavailable,
            (
                "Raised if the Magic Attach service is busy or unavailable at"
                " the moment."
            ),
        ),
    ],
    "example_cli": "pro api u.pro.attach.magic.revoke.v1 --args magic_token=<token>",  # noqa: E501
    "example_json": """
{}
""",
}

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