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 :  /usr/lib/python3/dist-packages/uaclient/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/uaclient/__pycache__/config.cpython-314.pyc
+
���g�K��f�^RIt^RIt^RIt^RIHtHt^RIHtHtH	t	^RI
HtHtH
t
HtHtHtHtHt^RIHtHtHtHtHtHtHtHtHt^RIHtHt^RI H!t!]PD!]PF!]$44t%RR	R
R/t&Rt'Rt(Rt)]PT!4t+!R
R4t,RRlt-RRlt.RRlt/R#)�N)�	lru_cache�wraps)�Any�Dict�Optional)�apt�event_logger�
exceptions�http�messages�snap�system�util)	�APT_NEWS_URL�BASE_CONTRACT_URL�BASE_LIVEPATCH_URL�BASE_SECURITY_URL�BASE_VULNERABILITY_DATA_URL�CONFIG_DEFAULTS�CONFIG_FIELD_ENVVAR_ALLOWLIST�DEFAULT_CONFIG_FILE�DEFAULT_DATA_DIR)�state_files�user_config_file)�	safe_load�availableResources�name�resourceEntitlements�type�_unsetc�Fa�]tRt^KtoRKtRLtRMtRNV3RlRllt]V3RlRl4t	]V3RlRl4t
]V3RlR	l4t]V3R
lRl4t]PV3RlR
l4t]V3RlRl4t]PV3RlRl4t]V3RlRl4t]PV3RlRl4t]V3RlRl4t]PV3RlRl4t]V3RlRl4t]PV3RlRl4t]]!RR7V3RlR l44t]PV3R!lR"l4t]]!RR7V3R#lR$l44t]PV3R%lR&l4t]V3R'lR(l4t]PV3R)lR*l4t]V3R+lR,l4t]PV3R-lR.l4t]V3R/lR0l4t]PV3R1lR2l4t]V3R3lR4l4t]PV3R5lR6l4t]V3R7lR8l4t]PV3R9lR:l4t]V3R;lR<l4t]PV3R=lR>l4t]V3R?lR@l4t]PV3RAlRBl4t]RC4t]RD4t]V3RElRFl4t]RG4tRHt RIt!RJt"Vt#R#)O�UAConfigNc�<�V^8�dQhRS[S[S[S[3,,RS[S[P
,RS[S[,RR/#)��cfg�user_config�series�returnN)rr�strrr�UserConfigData)�format�
__classdict__s"��1/usr/lib/python3/dist-packages/uaclient/config.py�__annotate__�UAConfig.__annotate__VsP���!�!�
�d�3��8�n�
%�!��.�=�=�>�!���
�	!�

�!�c��V'dRVnWnRVnM1\4Vn\	VP4wVnVnV'dW nM$\P
P4VnRVP9dT\PP/VP
P4CVPR,CRR7VnW0nR# \dQp\PRTR7\PR4\P!4TnRp?L�Rp?ii;i)�NzError loading user config)�exc_infozUsing default config values�	ua_configT)� optional_type_errors_become_null)�cfg_pathr%�invalid_keys�get_config_path�parse_configr&r�read�	Exception�LOG�warningr*�	from_dict�to_dictr')�selfr%r&r'�es&&&& r-�__init__�UAConfig.__init__Vs��� �D�M��H� $�D��+�-�D�M�*6�t�}�}�*E�'�D�H�d�'��*��
E�#3�#?�#?�#D�#D�#F�� ��$�(�(�"�/�>�>�H�H�G�4�#�#�+�+�-�G����+�1F�G�15� I� �D��
����
E����7�!��D����9�:�#3�#B�#B�#D�� � ��
E�s�#C.�.E	�9AE�E	c� <�V^8�dQhRS[/#�r$r(�r))r+r,s"�r-r.r/z����?�?�c�?r0c�B�VPPR\4#)�contract_url)r%�getr�r@s&r-rI�UAConfig.contract_urly����x�x�|�|�N�,=�>�>r0c� <�V^8�dQhRS[/#rErF)r+r,s"�r-r.r/~rGr0c�B�VPPR\4#)�security_url)r%rJrrKs&r-rP�UAConfig.security_url}rMr0c� <�V^8�dQhRS[/#rErF)r+r,s"�r-r.r/�s���A�A�s�Ar0c�B�VPPR\4#)�
livepatch_url)r%rJrrKs&r-rT�UAConfig.livepatch_url�s���x�x�|�|�O�-?�@�@r0c�0<�V^8�dQhRS[S[,/#rE�rr))r+r,s"�r-r.r/�s���+�+�H�S�M�+r0c�.�VPP#�N)r&�
http_proxyrKs&r-rZ�UAConfig.http_proxy�s�����*�*�*r0c� <�V^8�dQhRS[/#�r$�valuerF)r+r,s"�r-r.r/�s���=�=��=r0c�x�WPn\PPVP4R#rY)r&rZr�write�r@r^s&&r-rZr[�s(��&+���#��$�$�*�*�4�+;�+;�<r0c�0<�V^8�dQhRS[S[,/#rErW)r+r,s"�r-r.r/�s���,�,�X�c�]�,r0c�.�VPP#rY)r&�https_proxyrKs&r-rd�UAConfig.https_proxy�s�����+�+�+r0c� <�V^8�dQhRS[/#r]rF)r+r,s"�r-r.r/�s���=�=��=r0c�x�WPn\PPVP4R#rY)r&rdrr`ras&&r-rdre�s(��',���$��$�$�*�*�4�+;�+;�<r0c�0<�V^8�dQhRS[S[,/#rErW)r+r,s"�r-r.r/�s���3�3�H�S�M�3r0c�.�VPP#rY)r&�ua_apt_https_proxyrKs&r-rj�UAConfig.ua_apt_https_proxy�s�����2�2�2r0c� <�V^8�dQhRS[/#r]rF)r+r,s"�r-r.r/�s���=�=��=r0c�x�WPn\PPVP4R#rY)r&rjrr`ras&&r-rjrk�s(��.3���+��$�$�*�*�4�+;�+;�<r0c�0<�V^8�dQhRS[S[,/#rErW)r+r,s"�r-r.r/�s���2�2�8�C�=�2r0c�.�VPP#rY)r&�ua_apt_http_proxyrKs&r-rp�UAConfig.ua_apt_http_proxy�s�����1�1�1r0c� <�V^8�dQhRS[/#r]rF)r+r,s"�r-r.r/�s���=�=�s�=r0c�x�WPn\PPVP4R#rY)r&rprr`ras&&r-rprq�s(��-2���*��$�$�*�*�4�+;�+;�<r0c� <�V^8�dQhRS[/#rErF)r+r,s"�r-r.r/�s�����s�r0c�F�VPPpVf\#V#rY)r&�vulnerability_data_url_prefixr�r@�vals& r-rv�&UAConfig.vulnerability_data_url_prefix�s#�����<�<���;�.�.��
r0c� <�V^8�dQhRS[/#r]rF)r+r,s"�r-r.r/�s���=�=�3�=r0c�x�WPn\PPVP4R#rY)r&rvrr`ras&&r-rvry�s(��9>���6��$�$�*�*�4�+;�+;�<r0)�maxsizec�0<�V^8�dQhRS[S[,/#rErW)r+r,s"�r-r.r/�s���
�
�x��}�
r0c���VPPpV'dV#VPPpV'd7\P	\
PPRRR74V#R#)�apt_http_proxy�global_apt_http_proxy��old�newN)r&r�r�event�infor�WARNING_DEPRECATED_FIELDr+�r@�
global_val�old_apt_vals&  r-r��UAConfig.global_apt_http_proxy�sh���%�%�;�;�
�����&�&�5�5����J�J��1�1�8�8�(�.E�9��
�
��r0c� <�V^8�dQhRS[/#r]rF)r+r,s"�r-r.r/�s���=�=�3�=r0c���WPnRVPn\PPP4\PPVP4R#rY)r&r�rr"�fget�cache_clearrr`ras&&r-r�r��sN��16���.�*.����'��&�&�+�+�7�7�9��$�$�*�*�4�+;�+;�<r0c�0<�V^8�dQhRS[S[,/#rErW)r+r,s"�r-r.r/�s���
�
���
�
r0c���VPPpV'dV#VPPpV'd7\P	\
PPRRR74V#R#)�apt_https_proxy�global_apt_https_proxyr�N)r&r�r�r�r�rr�r+r�s&  r-r��UAConfig.global_apt_https_proxy�sh���%�%�<�<�
�����&�&�6�6����J�J��1�1�8�8�)�/G�9��
�
��r0c� <�V^8�dQhRS[/#r]rF)r+r,s"�r-r.r/�s���=�=�C�=r0c���WPnRVPn\PPP4\PPVP4R#rY)r&r�r�r"r�r�rr`ras&&r-r�r��sN��27���/�+/����(��'�'�,�,�8�8�:��$�$�*�*�4�+;�+;�<r0c� <�V^8�dQhRS[/#rE��int)r+r,s"�r-r.r/�s������r0c�>�VPPpVfR#V#)Ni`T)r&�update_messaging_timerrws& r-r��UAConfig.update_messaging_timer�s �����5�5���;���
r0c� <�V^8�dQhRS[/#r]r�)r+r,s"�r-r.r/�s���=�=�C�=r0c�x�WPn\PPVP4R#rY)r&r�rr`ras&&r-r�r��s(��27���/��$�$�*�*�4�+;�+;�<r0c� <�V^8�dQhRS[/#rEr�)r+r,s"�r-r.r/�s������r0c�>�VPPpVfR#V#)Ni@8)r&�metering_timerrws& r-r��UAConfig.metering_timer�s �����-�-���;���
r0c� <�V^8�dQhRS[/#r]r�)r+r,s"�r-r.r/�s���=�=�C�=r0c�x�WPn\PPVP4R#rY)r&r�rr`ras&&r-r�r��s(��*/���'��$�$�*�*�4�+;�+;�<r0c� <�V^8�dQhRS[/#rE��bool)r+r,s"�r-r.r/�s�����d�r0c�>�VPPpVfR#V#)NF)r&�poll_for_pro_licenserws& r-r��UAConfig.poll_for_pro_license�s"��
���3�3���;���
r0c� <�V^8�dQhRS[/#r]r�)r+r,s"�r-r.r/s���=�=�$�=r0c�x�WPn\PPVP4R#rY)r&r�rr`ras&&r-r�r�s(��05���-��$�$�*�*�4�+;�+;�<r0c� <�V^8�dQhRS[/#rEr�)r+r,s"�r-r.r/
s�����3�r0c�>�VPPpVfR#V#)NiX)r&�polling_error_retry_delayrws& r-r��"UAConfig.polling_error_retry_delays"�����8�8���;���
r0c� <�V^8�dQhRS[/#r]r�)r+r,s"�r-r.r/s���=�=�s�=r0c�x�WPn\PPVP4R#rY)r&r�rr`ras&&r-r�r�s(��5:���2��$�$�*�*�4�+;�+;�<r0c� <�V^8�dQhRS[/#rEr�)r+r,s"�r-r.r/s�����$�r0c�>�VPPpVfR#V#)NT)r&�apt_newsrws& r-r��UAConfig.apt_newss �����'�'���;���
r0c� <�V^8�dQhRS[/#r]r�)r+r,s"�r-r.r/"s���=�=�d�=r0c�x�WPn\PPVP4R#rY)r&r�rr`ras&&r-r�r�!s(��$)���!��$�$�*�*�4�+;�+;�<r0c� <�V^8�dQhRS[/#rErF)r+r,s"�r-r.r/'s�����c�r0c�F�VPPpVf\#V#rY)r&�apt_news_urlrrws& r-r��UAConfig.apt_news_url&s#�����+�+���;����
r0c� <�V^8�dQhRS[/#r]rF)r+r,s"�r-r.r/.s���=�=�#�=r0c�x�WPn\PPVP4R#rY)r&r�rr`ras&&r-r�r�-s(��(-���%��$�$�*�*�4�+;�+;�<r0c�4<�V^8�dQhRS[P/#rE�r�LXDGuestAttachEnum)r+r,s"�r-r.r/3s�����"2�"E�"E�r0c�n�VPPpVf\PP#V#rY)r&�lxd_guest_attachrr��OFFrws& r-r��UAConfig.lxd_guest_attach2s/�����/�/���;�#�6�6�:�:�:��
r0c�4<�V^8�dQhRS[P/#r]r�)r+r,s"�r-r.r/:s���=�=�&6�&I�&I�=r0c��Vf\PPpWPn\PPVP4R#rY)rr�r�r&r�r`ras&&r-r�r�9s>���=�$�7�7�;�;�E�,1���)��$�$�*�*�4�+;�+;�<r0c�B�VPPR\4#)�data_dir)r%rJrrKs&r-r��UAConfig.data_dir@s���x�x�|�|�J�(8�9�9r0c��VPPRR4p\\VP	44# \
d\Pu#i;i)�	log_level�DEBUG)r%rJ�getattr�logging�upper�AttributeErrorr�)r@r�s& r-r��UAConfig.log_levelDsH���H�H�L�L��g�6�	�	!��7�I�O�O�$5�6�6���	!��=�=� �	!�s�<�A�Ac� <�V^8�dQhRS[/#rErF)r+r,s"�r-r.r/Ms���E�E�#�Er0c�P�VPPR\R,4#)�log_file)r%rJrrKs&r-r��UAConfig.log_fileLs���x�x�|�|�J��
�(C�D�Dr0c��VPPR4pV'd/\V\4'dV#\PRV4/#)z>Return a dictionary of any features provided in uaclient.conf.�featureszDUnexpected uaclient.conf features value. Expected dict, but found %s)r%rJ�
isinstance�dictr<r=)r@r�s& r-r��UAConfig.featuresPsF���8�8�<�<�
�+����(�D�)�)������3���
�	r0c��
�RF^p\W4pVf\PRV4K*\V\4'd
V^8gKI\
P!WR7h	VP'gVP'd:VP'gVP'd\
P!4h\P!RVP\P4\P!RVP\P4\P!RVP\P4\P!RVP\P4\P!RVP \P"4\P!RVP$\P&4VP'gVP'dF\(P*!VPVP\(P,P.4MhVP'gVP'dE\(P*!VPVP\(P,P04.p\2P4!4'd�\2P6!VP VP$4VP 'g+\2P8!\2P:4'g=VP$'g<\2P8!\2P<4'dVP?R4^RI H!p^RI"H#pV!V4PHp\J;QJdR	V4F'gKR
M	RM
!R	V44pV'd�VPMVP VP$4VP 'g"VP9VP:4'g4VP$'g3VP9VP<4'dVP?R4\OV4^8�d;R
PQV4p\S\TPVPYVR74^RI-H.p	VP^\`PbPd8wd4V	!V4Pf'g\S\TPh4R#\jPlPo\jPp!VP^R74R#)r�Nz1No config set for %s, default value will be used.��keyr^r�httpsr
)�	livepatch)�_enabled_servicesc3�J"�TFqPR8XgKVx�K	R#5i)r�N)r)�.0�ents& r-�	<genexpr>�*UAConfig.process_config.<locals>.<genexpr>�s��� 
�+�C�x�x�;�/F�C�C�+�s�#�
#TFr�z, )�services)�_is_attached)�guest_attach)r�r�)9r�r<�debugr�r�r
�InvalidPosIntConfigValuer�r�rprj�InvalidProxyCombinationConfigr�validate_proxy�PROXY_VALIDATION_APT_HTTP_URL�PROXY_VALIDATION_APT_HTTPS_URLrZ�PROXY_VALIDATION_SNAP_HTTP_URLrd�PROXY_VALIDATION_SNAP_HTTPS_URLr�setup_apt_proxy�
AptProxyScope�GLOBAL�UACLIENTr
�is_snapd_installed�configure_snap_proxy�get_config_option_value�HTTP_PROXY_OPTION�HTTPS_PROXY_OPTION�append�uaclientr��-uaclient.api.u.pro.status.enabled_services.v1r��enabled_services�any�configure_livepatch_proxy�len�join�printr�!PROXY_DETECTED_BUT_NOT_CONFIGUREDr+�(uaclient.api.u.pro.status.is_attached.v1r�r�rr�r��is_attached�-WARNING_LXD_GUEST_ATTACH_SET_BUT_NOT_ATTACHEDr�lxd_pro_config_filer`�LXDProConfig)
r@�propr^�services_with_proxiesr�r�r��livepatch_enabledr�r�s
&         r-�process_config�UAConfig.process_config_s���
�D��D�'�E��}��	�	�G��� ��s�+�+�u�q�y� �9�9����
�
�&�&�&�$�*E�*E�*E��"�"�"�d�&=�&=�&=��:�:�<�<������&�&��.�.�	
�
	
�����'�'��/�/�	
�
	
����D�*�*�D�,N�,N�	
�	
�����#�#��/�/�	
�
	
����D�O�O�T�%H�%H�	
�	
����T�%�%�t�'K�'K�	
��%�%�%��)D�)D�)D�����*�*��+�+��!�!�(�(�
�
�
#�
#�
#�t�'>�'>�'>�����&�&��'�'��!�!�*�*�
�!#���"�"�$�$��%�%�d�o�o�t�7G�7G�H��O�O�O��0�0��1G�1G�H�H��$�$�$��0�0��1H�1H�I�I�%�,�,�V�4�&�	
�-�T�2�C�C���C� 
�+� 
�C�C�C� 
�+� 
�
����/�/�����!1�!1�
��O�O�O��5�5��/�/����$�$�$��5�5��0�0���&�,�,�[�9��$�%��)��y�y�!6�7�H���:�:�A�A�%�B��
�	J�
�!�!�%5�%H�%H�%L�%L�L� ��&�2�2�2��(�H�H�I��+�+�1�1��(�(�d�6K�6K�L�
r0c�T�VPe3\VP4Fp\PRV4K	RVP9dW\PR4\PR4\PR4\PR4R#R#)Nz&Ignoring invalid uaclient.conf key: %sr4z)legacy "ua_config" found in uaclient.confzPlease do the following:z�  1. run `sudo pro config set field=value` for each field/value pair present under "ua_config" in /etc/ubuntu-advantage/uaclient.confzQ  2. Delete "ua_config" and all sub-fields in /etc/ubuntu-advantage/uaclient.conf)r7�sortedr<r=r%)r@�invalid_keys& r-�warn_about_invalid_keys� UAConfig.warn_about_invalid_keys�s������(�%�d�&7�&7�8�����<�k�� 9��$�(�(�"�
�K�K�C�D��K�K�2�3��K�K�7�
�

�K�K�7�
�#r0)r%r6r7r'r&)rprj)r�r�)rr�)NNN)$�__name__�
__module__�__qualname__�__firstlineno__�ua_scoped_proxy_options�global_scoped_proxy_options�&deprecated_global_scoped_proxy_optionsrB�propertyrIrPrTrZ�setterrdrjrprvrr�r�r�r�r�r�r�r�r�r�r�r�r�rr�__static_attributes__�__classdictcell__)r,s@r-r"r"Ksc����I��#��.�*�
!�!�F�?��?��?��?��A��A��+��+����=��=��,��,����=��=��3��3����=��=��2��2����=��=�����#�)�)�=�*�=���t��
���
��!�!�=�"�=���t��
���
��"�"�=�#�=������"�"�=�#�=��������=��=������ � �=�!�=������%�%�=�&�=������_�_�=��=��������=��=��������=��=��:��:��!��!��E��E�����t�l�r0r"c�$�V^8�dQhR\/#rErF)r+s"r-r.r.�s�����r0c�`�\PPR4pV'dV#\#)z4Get config path to be used when loading config dict.�UA_CONFIG_FILE)�os�environrJr)�config_files r-r8r8�s$���*�*�.�.�!1�2�K�����r0c��\P!\4pV'g\4p\P	RV4\
PPV4'd/VP\\P!V444/p\
PP4F�wr4VP4pVPR4'gK.VR,pVPR4'd�VR,pVP!R4'd]\
PPV4'd!\\P!V44pM\"P$!VR7hRV9d	Wd/VR&K�WAR,V&K�V\&9gK�WBV&K�	VPV4R	V9d*\
PP)VR	,4VR	&RFCp\*P,!W,4'dK'\"P.!W1V,R
7h	\1VP344P5\64pVFpVP9V4K	W3#)arParse known Pro config file

Attempt to find configuration in cwd and fallback to DEFAULT_CONFIG_FILE.
Any missing configuration keys will be set to CONFIG_DEFAULTS.

Values are overridden by any environment variable with prefix 'UA_'.

@param config_path: Fullpath to pro configfile. If unspecified, use
    DEFAULT_CONFIG_FILE.

@return: Dict of configuration values.
z%Using client configuration file at %s�ua_:�NN�	features_:�	NN�yaml)�filepathr�r�r�)rIrP)�copyrr8r<r�r!�path�exists�updaterr�	load_filer"�items�lower�
startswith�endswithr
�InvalidFeatureYamlConfigValuer�
expanduserr�is_service_url�InvalidURLConfigValue�set�keys�
difference�VALID_UA_CONFIG_KEYS�pop)	�config_pathr%�env_keysr�r^�
field_name�feature_field_namer7rs	&        r-r9r9�s����)�)�O�
$�C��%�'���I�I�5�{�C�	�w�w�~�~�k�"�"��
�
�9�V�-�-�k�:�;�<��H��j�j�&�&�(�
���i�i�k���>�>�%� � ��R��J��$�$�[�1�1�%/��^�"��>�>�&�)�)��w�w�~�~�e�,�,� )�&�*:�*:�5�*A� B��(�F�F�%*����S�(�'9�&A�C�
�O�:?�
�O�$6�7��5�5�',��$�5)�6�J�J�x���S���'�'�,�,�S��_�=��J��/���"�"�3�8�,�,��2�2�s�c�(�K�K�0��s�x�x�z�?�-�-�.B�C�L�#�������$���r0c�$�V^8�dQhR\/#)r$�override_keyrF)r+s"r-r.r.3s�����r0c�a�V3RlpV#)a�Decorator used to override function return by config settings.

To identify if we should override the function return, we check
if the config object has the expected override key, we use it
has, we will use the key value as the function return. Otherwise
we will call the function normally.

@param override_key: key to be looked for in the settings_override
 entry in the config dict. If that key is present, we will return
 its value as the function return.
c�4<a�\S4VV3Rl4pV#)c�<�\4wrVPR/4PS\4pV\8wdSR8XdVR3#V#S!4#)�settings_overrides�
cloud_typeN)r9rJ�UNSET_SETTINGS_OVERRIDE_KEY)r%�_�value_override�frBs   ��r-�new_f�>apply_config_settings_override.<locals>.wrapper.<locals>.new_fAsY���!�^�F�C� �W�W�%9�2�>�B�B��9��N��!<�<��<�/�*�D�1�1�%�%��3�Jr0)r)rKrLrBsf �r-�wrapper�/apply_config_settings_override.<locals>.wrapper@s ���	�q��	�
�	��r0�)rBrNsf r-�apply_config_settings_overriderQ3s����"�Nr0)rZrdrr�rprjr�r�r�r�r�r�rvr�)
rIr�r�r�r�rPrvrFr4rTrY)0r+r�r!�	functoolsrr�typingrrrr�rr	r
rrr
rr�uaclient.defaultsrrrrrrrrr�uaclient.filesrr�
uaclient.yamlr�	getLogger�replace_top_level_logger_namerr<�MERGE_ID_KEY_MAPrH�UA_CONFIGURABLE_KEYSr;�get_event_loggerr�r"r8r9rQrPr0r-�<module>r\s�����	�&�&�&�	�	�	�
�
�
�9�#�
����:�:�8�D�E���&��F���'����$��	�%�%�'��]�]�@
�<�~r0

Youez - 2016 - github.com/yon3zu
LinuXploit