0x1949 Team - FAZEMRX - MANAGER
Edit File: attach.cpython-310.pyc
o �(�f� � @ sh d dl Z d dlZd dlmZmZmZmZmZmZ d dl m Z d dlmZm Z d dlmZmZ d dlmZ d dlmZmZmZ d dlmZ d d lmZmZ d d lmZmZ d dlm Z d dl!m"Z" e�#� Z$d d� Z%ej&ej'e�(d�dd� ���Z)edej*ej+e)dej,deedej-dd�edej.ddd�edej/e �0d�d�edej1j2d d!�d"d d#gd d$�gd%�gd&�Z3dS )'� N)�actions�contract�event_logger� exceptions�messages�secret_manager)� _initiate)�MagicAttachRevokeOptions�_revoke)�MagicAttachWaitOptions�_wait)�cli_util)�ProArgument�ProArgumentGroup� ProCommand)�HelpCategory)�AttachActionsConfigFile�IncorrectTypeError)�*create_enable_entitlements_not_found_error�get_valid_entitlement_names)�CanEnableFailure)� safe_loadc K s� | j dkr tjd| j d��t�tj� t|d�}t�dtjj |j d� � t |jd�}zt||d�}W n! tj yT } zt�tj� t|jd�}t||d� |�d }~ww t�dtj � |jS ) N�json�--format)�param�value��cfg� )� user_code)�magic_token)�optionsr )�formatr �MagicAttachInvalidParam�event�infor �CLI_MAGIC_ATTACH_INITr �CLI_MAGIC_ATTACH_SIGN_INr r �tokenr �MagicAttachTokenError�CLI_MAGIC_ATTACH_FAILEDr r �CLI_MAGIC_ATTACH_PROCESSING�contract_token)�argsr �kwargs� initiate_resp�wait_options� wait_resp�e�revoke_options� r4 �5/usr/lib/python3/dist-packages/uaclient/cli/attach.py� _magic_attach# s8 � ������ r6 z pro attachc K s� | j r | jr t�� �| j s| jst| |d�}d }n6| j r(| j }tj�|� d }n'z t� t | j��}W n tyH } z tj| jj |jd��d }~ww |j }|j}| joU|d u }z tj|||d� W n tjyl t�� �w d}|d ur�| jr�t||�\} } | D ]5}t�||�\}} |s�d}| d ur�t| t�r�| jd ur�t�| jj� tj| jj| jj |d� qt�|� q| r�t| |d�}tj|jtj d� tj|j|j!d� d}t"�#|�}|�$� t%�&|� |S ) Nr )�config_name�error)r( �allow_enabler � )� error_msg� error_code�service)� file_type)r; r<