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/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/uaclient/__pycache__/snap.cpython-314.pyc
+
���g�	��^RIt^RIt^RIHtHtHt^RIHtHtH	t	H
t
HtHtH
t
HtRt.R$OtRtRtRtRt]	P*!4t]P.!]P0!]44t]!R	R
]3R]3R]3R
]3R]3.4tRRltRRltR%RRlltR&RRllt RRlt!RRlt"Rt#RRlt$R'RRllt%R R!lt&R"R#lt'R#)(�N)�List�
NamedTuple�Optional)�api�apt�event_logger�
exceptions�http�messages�system�utilz
/usr/bin/snapz
proxy.httpzproxy.httpsz/run/snapd.socketz/v2/snaps/{}�SnapPackage�name�version�revision�channel�	publisherc�$�V^8�dQhR\/#���return��bool)�formats"�//usr/lib/python3/dist-packages/uaclient/snap.py�__annotate__r's��9�9�D�9�c�2�R\P!49#)z(Returns whether or not snap is installed�snapd)r�get_installed_packages_names�rr�is_snapd_installedr"'s���c�6�6�8�8�8rc�$�V^8�dQhR\/#rr)rs"rrr,s��I�I�d�Irc��\;QJd$R\44F'gKR#	R#!R\444#)z3Returns whether or not snapd is installed as a snapc3�>"�TFqPR8Hx�K	R#5i)rN�r)�.0�snaps& r�	<genexpr>�/is_snapd_installed_as_a_snap.<locals>.<genexpr>.s���G�1F��	�	�W�$�1F�s�TF)�any�get_installed_snapsr!rr�is_snapd_installed_as_a_snapr-,s3���3�G�1D�1F�G�3�3�H�3�H�3�G�1D�1F�G�H�Hrc��V^8�dQhR\\,R\\,R\\\,,RR/#)r�
http_proxy�https_proxy�retry_sleepsrN)r�strr�float)rs"rrr1sA��"
�"
���
�"
��#��"
��4��;�'�"
�
�	"
rc��\4'g\PR4R#V'g	V'd4\P	\
PPRR74V'd,\P!RRRRPV4.VR7V'd.\P!RRRR	PV4.VR7R#R#)
a�
Configure snap to use http and https proxies.

:param http_proxy: http proxy to be used by snap. If None, it will
                   not be configured
:param https_proxy: https proxy to be used by snap. If None, it will
                    not be configured
:param retry_sleeps: Optional list of sleep lengths to apply between
    retries. Specifying a list of [0.5, 1] tells subp to retry twice
    on failure; sleeping half a second before the first retry and 1 second
    before the second retry.
z6Skipping configure snap proxy. snapd is not installed.Nr()�service�setrz
proxy.http={}�r1zproxy.https={})
r"�LOG�debug�event�infor�SETTING_SERVICE_PROXYrr�subp)r/r0r1s&&&r�configure_snap_proxyr>1s���"����	�	�J�K���[�
�
�
�8�1�1�8�8��8�H�I�����
�U�H�o�&<�&<�Z�&H�I�%�	
�
����
�U�H�&6�&=�&=�k�&J�K�%�	
�rc�`�V^8�dQhR\R\\\,,RR/#)r�
protocol_typer1rN)r2rrr3)rs"rrrVs-������&.�t�E�{�&;��	�rc��\4'g\PR4R#\P!RRRRPV4.VR7R#)ad
Unset snap configuration settings for http and https proxies.

:param protocol_type: String either http or https
:param retry_sleeps: Optional list of sleep lengths to apply between
    retries. Specifying a list of [0.5, 1] tells subp to retry twice
    on failure; sleeping half a second before the first retry and 1 second
    before the second retry.
z8Skipping unconfigure snap proxy. snapd is not installed.Nr(�unsetrzproxy.{}r7)r"r8r9rr=r)r@r1s&&r�unconfigure_snap_proxyrCVsC������	�	�L�M��
�K�K�	��(�J�$5�$5�m�$D�E�!�rc�F�V^8�dQhR\R\\,/#)r�keyr)r2r)rs"rrrks��
�
��
��#��
rc��\P!RRRV.4wrVP4# \PdR#i;i)z�
Gets the config value from snap.
:param protocol: can be any valid snap config option
:return: the value of the snap config option, or None if not set
r(�getrN)rr=�stripr	�ProcessExecutionError)rE�out�_s&  r�get_config_option_valuerLksD������f�e�X�s�;�<����y�y�{����+�+����s�+.�A�Ac�:�V^8�dQhR\\,/#r)rr)rs"rrrxs����T�+�.�rc���\P!.RO4wrVP4pVR,p.pVF4pVP4^,pVP	\V44K6	V#)r(:�NN)r(�listz--color�neverz	--unicoderQ)rr=�
splitlines�split�append�
get_snap_info)rJrK�apps�snaps�liner(s      rr,r,xsb��
�[�[�B��F�C��>�>��D���8�D��E����z�z�|�A���
���]�4�(�)���Lrc���\P\PP	RR74\
P!\
P!44\P!.RO\
PR7R# \Pd*p\PR\T44Rp?LdRp?ii;i \P d\P"!4hi;i)zstandard Ubuntur&z<Trying to install snapd. Ignoring apt-get update failure: %sNr7)zapt-get�installz--assume-yesr)r:r;r�APT_UPDATING_LISTrr�update_sources_list�get_system_sources_filer	�UbuntuProErrorr8r9r2rr=�APT_RETRIESrI�CannotInstallSnapdError)�es r�
install_snapdrb�s���	�J�J�x�)�)�0�0�6G�0�H�I�
����� ;� ;� =�>�3����;����	
��
�$�$�
��	�	�J���F�	
�	
��
���+�+�3��0�0�2�2�3�s#�)B	�(C
�	C�C�C�
+C5c�8�V^8�dQhR\P/#)r�progress)r�ProgressWrapper)rs"rrr�s��
�
��!4�!4�
rc�b�\P!\RRR.RR7R# \Pdvp\
P!R\T4P44'd<\PR4TPR\P4Rp?R#hRp?ii;i)	�waitrzseed.loadedT��capturezunknown command .*waitz9Detected version of snapd that does not have wait commandr;N)rr=�SNAP_CMDr	rI�re�searchr2�lowerr8�warning�emitr�SNAPD_DOES_NOT_HAVE_WAIT_CMD)rdras& r�run_snapd_wait_cmdrq�s{��	����X�v�x��?��N���+�+��
�9�9�.��A�����?�?��K�K�K�
�
�M�M�&�(�"G�"G�H�H����s� $�B.�A)B)�(B)�)B.c�R�V^8�dQhR\R\\,R\/#)rr(r�classic_confinement_support)r2rr)rs"rrr�s*����

��
�c�]��"&�rc��\RV.pV'dVR.,
pV'dVRPV4.,
p\P!VR\R7R#)rZz	--classicz--channel={}T)rir1N)rjrrr=�SNAP_INSTALL_RETRIES)r(rrs�cmds&&& r�install_snaprw�sO��
�Y��
%�C�"���}������%�%�g�.�/�/��
�K�K���)�rc�$�V^8�dQhR\/#)rr()r2)rs"rrr�s��;�;�s�;rc�D�\P!\RV.RR7R#)�refreshTrhN)rr=rj�r(s&r�refresh_snapr|�s��
�K�K��9�d�+�T�:rc�0�V^8�dQhR\R\/#)rr(r)r2r)rs"rrr�s�������rc
��\PV4p\P!\RV4pVP
^�8wd�VP
R8XdHVPPR/4PR4R8Xd\P!VR7hVPPR/4PR4p\P!VR7hTPPR/4p\TPRR	4TPR
R	4TPRR	4TPRR	4TPR
/4PRR	4R7# \d\P!4hi;i)�GETi��result�kindzsnap-not-foundr{�message)�errorr�rrrr�username)rrrrr)�SNAPD_SNAPS_APIrr
�unix_socket_request�SNAPD_SOCKET_PATH�code�	json_dictrGr	�SnapNotInstalledError�UnexpectedSnapdAPIError�ConnectionRefusedError�SnapdAPIConnectionRefusedr)r(�url�resp�	error_msg�	snap_infos&    rrUrU�sM��
�
 �
 ��
&�C�5��'�'�(9�5�#�F���9�9����	�	�S� ��N�N�&�&�x��4�8�8��@�#�$�!�6�6�D�A�A� �N�N�.�.�x��<�@�@��K�	� �8�8�y�I�I�����"�"�8�R�0�I��
�]�]�6�2�
&��
�
�i��,����z�2�.��
�
�i��,��-�-��R�0�4�4�Z��D����	"�5��2�2�4�4�5�s�CE+�+!F)g�?g�?g@)NNN)N)NF)(�loggingrk�typingrrr�uaclientrrrr	r
rrr
rjru�HTTP_PROXY_OPTION�HTTPS_PROXY_OPTIONr�r��get_event_loggerr:�	getLogger�replace_top_level_logger_name�__name__r8r2rr"r-r>rCrLr,rbrqrwr|rUr!rr�<module>r�s����	�-�-�	�	�	���&�� ��"��'�� ���%�%�'��
����:�:�8�D�E����	��
�	�C��	�S��	�C��	�c���	��9�
I�
"
�J�*
��3�$
��(;�r

Youez - 2016 - github.com/yon3zu
LinuXploit