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__/livepatch.cpython-314.pyc
+
��gh3��z�^RIt^RIt^RIt^RIt^RIt^RIHt^RIHtH	t	H
t
^RIHtH
t
HtHtHt^RIHtHtHtHtHtHt^RIHt^RIHtRtR	tR
tRt]P@!4t!]PD!]PF!]$44t%]PL!RR
]PN44t(!RR]4t)!RR]4t*!RR]4t+!RR]4t,RRlt-RRlt.!RR]P^4t0RRlt1RRlt2R R!lt3]!RR"7R#R$l4t4R-R%R&llt5R.R'R(llt6R)R*lt7R+R,lt8R#)/�N)�	lru_cache)�List�Optional�Tuple)�event_logger�
exceptions�messages�system�util)�
BoolDataValue�
DataObject�Field�IncorrectTypeError�StringDataValue�	data_list)�state_files)�
serviceclientz
http-proxyzhttps-proxyz/snap/bin/canonical-livepatchz/v1/api/kernels/supportedc�\�]tRt^ t]!4t]!4t]!4t]!4t]!4t	Rt
R#)�LivepatchSupport�N)�__name__�
__module__�__qualname__�__firstlineno__�object�	SUPPORTED�KERNEL_UPGRADE_REQUIRED�
KERNEL_EOL�UNSUPPORTED�UNKNOWN�__static_attributes__r��4/usr/lib/python3/dist-packages/uaclient/livepatch.pyrr s&����I�$�h����J��(�K��h�Gr"rc�ba�]tRt^)to]!R]RRR7]!R]RRR7.tV3RlRltR	t	Vt
R
#)�LivepatchPatchFixStatus�nameF�Name��required�dict_key�patched�Patchedc�F<�V^8�dQhRS[S[,RS[S[,/#)�r&r+)r�str�bool)�format�
__classdict__s"�r#�__annotate__�$LivepatchPatchFixStatus.__annotate__/s'������s�m���$��r"c��WnW nR#�N�r&r+)�selfr&r+s&&&r#�__init__� LivepatchPatchFixStatus.__init__/s��
�	��r"r7N)rrrrrrr�fieldsr9r!�__classdictcell__�r2s@r#r%r%)s2����
�f�o���G�
�i����K��F�
�r"r%c	�a�]tRt^8to]!R]RRR7]!R]!]4RRR7]!R]RRR7.tV3R	lR
lt	Rt
VtR#)
�LivepatchPatchStatus�stateF�Stater(�fixes�Fixes�version�Versionc�l<�V^8�dQhRS[S[,RS[S[S[,,RS[S[,/#)r.r@rBrD)rr/rr%)r1r2s"�r#r3�!LivepatchPatchStatus.__annotate__Ds<�������}����4�5�6���#��	r"c�*�WnW nW0nR#r6)r@rBrD)r8r@rBrDs&&&&r#r9�LivepatchPatchStatus.__init__Ds���
��
��r")rBr@rDN)rrrrrrrr%r;r9r!r<r=s@r#r?r?8sN����
�g����I�
���-�.���		
�	�i��5�9�M�	�F��r"r?c	�xa�]tRt^Oto]!R]RRR7]!R]RRR7]!R]RRR7.tV3R	lR
ltRt	Vt
R#)
�LivepatchStatusStatus�kernelF�Kernelr(�	livepatch�	Livepatch�	supported�	Supportedc�\<�V^8�dQhRS[S[,RS[S[,RS[S[,/#)r.rLrNrP)rr/r?)r1r2s"�r#r3�"LivepatchStatusStatus.__annotate__`s7���#�#���
�#��0�1�#��C�=�	#r"c�*�WnW nW0nR#r6�rLrNrP)r8rLrNrPs&&&&r#r9�LivepatchStatusStatus.__init__`s����"��"�r"rUN)rrrrrrr?r;r9r!r<r=s@r#rKrKOsN����
�h��%�(�K�
�� �� �		
�	���� �		
��F� #�#r"rKc�Xa�]tRt^kto]!R]!]4RRR7.tV3RlRltRt	Vt
R#)	�LivepatchStatus�statusF�Statusr(c�@<�V^8�dQhRS[S[S[,,/#)r.rY)rrrK)r1r2s"�r#r3�LivepatchStatus.__annotate__us �������3�4�5�r"c��WnR#r6�rY)r8rYs&&r#r9�LivepatchStatus.__init__us	���r"r^N)rrrrrrrKr;r9r!r<r=s@r#rXrXks0����
���+�,���		
��F��r"rXc�:�V^8�dQhR\\,/#�r.�return)rrK)r1s"r#r3r3|s��-!�-!��.�/�-!r"c�0�\4'g\PR4R#\P!\
RRRR.4wr\P!T4p\PT4pTP e\#TP 4^8d\PR4R#TP ^,# \PdUpRTP9d&\PTP4Rp?R#\PRTR7ThRp?ii;i \Pd$p\PR	TTR7Rp?R#Rp?ii;i \d\PR
T4R#i;i)z$canonical-livepatch is not installedNrYz	--verbosez--format�jsonzMachine is not enabledz;canonical-livepatch returned error when checking status:
%s)�exc_infozPJSONDecodeError while parsing livepatch status, returning None. output was: "%s"z<canonical-livepatch status returned unexpected structure: %sz!canonical-livepatch has no status)�is_livepatch_installed�LOG�debugr
�subp�
LIVEPATCH_CMDr�ProcessExecutionError�stderr�warningrd�loads�JSONDecodeErrorrX�	from_dictrrY�len)�out�_�e�status_json�status_roots     r#rYrY|s]��!�#�#��	�	�8�9������
�H�k�:�v�F�
���	��j�j��o���%�/�/��<�����!�S��);�);�%<�q�%@��	�	�5�6�����a� � ��I�+�+�
�$�q�x�x�/��K�K����!�����J��	�	
����
���������
���		�	
����������J��	
���sG�!C	�D5�"E0�	D2�0D-�D-�-D2�5E-�
E(�(E-�0!F�Fc�\�V^8�dQhR\\,R\\,/#)r.�
status_strrb)rr/r)r1s"r#r3r3�s&��
�
���
�
�
���
r"c���VR8Xd\P#VR8Xd\P#VR8Xd\P#VR8Xd\P#VR8Xd\P
#R#)rPzkernel-upgrade-requiredzkernel-end-of-life�unsupported�unknownN)rrrrrr )rxs&r#�(_convert_str_to_livepatch_support_statusr|�sm���[� ��)�)�)��.�.��7�7�7��)�)��*�*�*��]�"��+�+�+��Y���'�'�'�r"c�6a�]tRt^�toRtV3RlRltRtVtR#)�UALivepatchClient�
livepatch_urlc
�r<�V^8�dQhRS[RS[RS[RS[RS[S[P,RS[S[,/#�r.rD�flavor�arch�codename�
build_daterb�r/r�datetimer)r1r2s"�r#r3�UALivepatchClient.__annotate__�s`���)K�)K��)K��)K��	)K�
�)K��X�.�.�/�
)K�
�"�	#�)Kr"c�x�RTRTRTRTRVeVP4MR/pVP4pVP\VVR7pTP^�8wd7\
P
R	4\
P
TP4R#TPPR
4p
T
e\T
\4'd)T
'd\P#\P#\!T
4# \d6p	\
P
R4\
P
T	4Rp	?	R#Rp	?	ii;i)zkernel-version�flavour�architecturer�z
build-dateNr{)�query_params�headersz4error while checking livepatch supported kernels APIz0livepatch supported kernels API was unsuccessfulrQ)�	isoformatr��request_url�"LIVEPATCH_API_V1_KERNELS_SUPPORTED�	Exceptionrgrm�code�body�	json_dict�get�
isinstancer0rrrr|)r8rDr�r�r�r�r�r��responsert�api_supported_vals&&&&&&     r#�is_kernel_supported�%UALivepatchClient.is_kernel_supported�s��
�g��v��D����*4�*@�
�$�$�&�i�

���,�,�.��		��'�'�2�)��(��H��=�=�C���K�K�J�K��K�K��
�
�&��$�.�.�2�2�;�?���$�
�3D�d�(K�(K� �'�1�1�1�#�/�/�/�7�8I�J�J��#�	��K�K�N�O��K�K��N���	�s�C9�9D9�*D4�4D9rN)rrrr�cfg_url_base_attrr�r!r<r=s@r#r~r~�s����'��)K�)Kr"r~c�:�V^8�dQhR\\,/#ra)rr)r1s"r#r3r3�s��I�I�(�+;�"<�Ir"c��\4pTfR#\TP4# \PdR#i;ir6)rYrrkr|rP)�	lp_statuss r#�_on_supported_kernel_clir��sD����H�	����3�I�4G�4G�H�H���+�+����s�
'�A�Ac
��V^8�dQhR\R\R\R\R\\\\,3,/#)r.rDr�r�r�rb)r/rr0r)r1s"r#r3r3�sB����
����%(��47��
�4��$��� �r"c�(�\PP4pVe�\PP\PP4\P!^R7,
p\VPV8�VPV8HVPV8HVPV8HVPV8H.4'd2VPf\ P#R4RVP3#R# \dRpL�i;i)zGCheck local cache of kernel support

:return: (is_cache_valid, result)
N)�daysz-livepatch kernel support cache has None valueT)FN)r�livepatch_support_cache�readr�r��now�timezone�utc�	timedelta�all�	cached_atrDr�r�r�rPrgrm)rDr�r�r��
cache_data�one_week_agos&&&&  r#�_on_supported_kernel_cacher��s���� �8�8�=�=�?�
����(�(�,�,����!�!�
����A�&�'����$�$�|�3��"�"�g�-��!�!�V�+����4�'��#�#�x�/�
�
�
��#�#�+����K�L��*�.�.�/�/����'���
��s�D�
D�Dc
��V^8�dQhR\R\R\R\R\\P,R\\,/#r�r�)r1s"r#r3r3sU��"�"�
�"��"��"��	"�
��*�*�+�"����
"r"c��\4PVVVVVR7pRpV\P8XdRpMV\P8XdRp\
PP\
P!VVVVV\PP\PP4R74Vf\PR4V#))rDr�r�r�r�NTF)rDr�r�r�rPr�z3livepatch kernel support API response was ambiguous)r~r�rrrrr��write�LivepatchSupportCacheDatar�r�r�r�rgrm)rDr�r�r�r�rP�cache_supporteds&&&&&  r#�_on_supported_kernel_apir�s���"�#�7�7���
���8��I��O��$�.�.�.���	�&�2�2�	2����'�'�-�-��-�-�����%��'�'�+�+�H�,=�,=�,A�,A�B�
	
�	������I�J��r")�maxsizec�$�V^8�dQhR\/#ra)r)r1s"r#r3r3;s��8�8�-�8r"c�n�\4pVe\PR4V#\P!4pVP
eVPeVPf&\PR4\P#\P!VP4p\P!4PpRP!VPVPR7p\#WAP
W#4wrVV'dZ\PR4Vf\P#V'd\P$#V'g\P&#\PR4\)VVP
VVVP*4pVf\P#V#)z�
Checks CLI, local cache, and API in that order for kernel support
If all checks fail to return an authoritative answer, we return None
zusing livepatch cli for supportzHunable to determine enough kernel information to check livepatch supportz{major}.{minor})�major�minorzusing livepatch support cachezusing livepatch support api)r�rgrhr
�get_kernel_infor�r�r�rmrr r�standardize_arch_name�uname_machine_arch�get_release_info�seriesr1r�rrr�r�)�cli_says�kernel_infor�r��lp_api_kernel_ver�is_cache_valid�
cache_says�api_sayss        r#�on_supported_kernelr�:sq��(�)�H����	�	�3�4����(�(�*�K����"����$����$����
&�	
� �'�'�'��%�%�k�&D�&D�E�D��&�&�(�/�/�H�)�0�0����{�'8�'8�1���
"<��-�-�t�"��N���	�	�1�2���#�+�+�+��#�-�-�-��#�/�/�/��I�I�+�,�'�����������H����'�'�'��Or"c�`�V^8�dQhR\R\\\,,RR/#)r.�
protocol_type�retry_sleepsrbN)r/rr�float)r1s"r#r3r3vs-������&.�t�E�{�&;��	�r"c��\4'gR#\P!\RRP	V4.VR7R#)ai
Unset livepatch 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.
N�configz	{}-proxy=�r�)rfr
rirjr1)r�r�s&&r#�unconfigure_livepatch_proxyr�vs4��"�#�#��
�K�K�	��+�"4�"4�]�"C�D�!�r"c��V^8�dQhR\\,R\\,R\\\,,RR/#)r.�
http_proxy�https_proxyr�rbN)rr/rr�)r1s"r#r3r3�sA��"
�"
���
�"
��#��"
��4��;�'�"
�
�	"
r"c��^RIHpV'g	V'd>\P\P
P
VPR74V'd/\P!\RRP
V4.VR7V'd1\P!\RRP
V4.VR7R#R#)a~
Configure livepatch to use http and https proxies.

:param http_proxy: http proxy to be used by livepatch. If None, it will
                   not be configured
:param https_proxy: https proxy to be used by livepatch. If None, it will
                    not be configured
:@param retry_sleeps: Optional list of sleep lengths to apply between
                           snap calls
)�LivepatchEntitlement)�servicer�z
http-proxy={}r�zhttps-proxy={}N)�uaclient.entitlementsr��event�infor	�SETTING_SERVICE_PROXYr1�titler
rirj)r�r�r�r�s&&& r#�configure_livepatch_proxyr��s���;��[�
�
�
��*�*�1�1�,�2�2�
2�
�	
�����
�H�o�&<�&<�Z�&H�I�%�	
�
����
�H�&6�&=�&=�k�&J�K�%�	
�r"c�F�V^8�dQhR\R\\,/#)r.�keyrb)r/r)r1s"r#r3r3�s��,�,��,��#��,r"c�R�\P!\R.4wr\P!RPV4V\P4pV'dVP^4MRpV'd\P!RRV4pV'dVP4#R#)z�
Gets the config value from livepatch.
:param key: can be any valid livepatch config option
:return: the value of the livepatch config option, or None if not set
r�z
^{}: (.*)$Nz\"(.*)\"z\g<1>)
r
rirj�re�searchr1�	MULTILINE�group�sub�strip)r�rrrs�match�values&    r#�get_config_option_valuer��ss���[�[�-��2�
3�F�C��I�I�l�)�)�#�.��R�\�\�B�E�#�E�K�K��N��E�����{�H�e�4��!�5�;�;�=�+�t�+r"c�$�V^8�dQhR\/#ra)r0)r1s"r#r3r3�s��3�3��3r"c�:�\P!\4RJ#r6)r
�whichrjrr"r#rfrf�s���<�<�
�&�d�2�2r"r6)NNN)9r��enumrd�loggingr��	functoolsr�typingrrr�uaclientrrr	r
r�uaclient.data_typesrr
rrrr�uaclient.filesr�
uaclient.httpr�HTTP_PROXY_OPTION�HTTPS_PROXY_OPTIONrjr��get_event_loggerr��	getLogger�replace_top_level_logger_namerrg�unique�Enumrr%r?rKrXrYr|�UAServiceClientr~r�r�r�r�r�r�r�rfrr"r#�<module>r�s(������	��(�(�E�E���'�'� ��"��/�
�%@�"��%�%�'��
����:�:�8�D�E������t�y�y��
���j���:��.#�J�#�8�j��"-!�`
� ,K�
�5�5�,K�^I��>"�J�4��8��8�v�("
�J,�3r"

Youez - 2016 - github.com/yon3zu
LinuXploit