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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/softwareproperties/__pycache__/SoftwareProperties.cpython-314.pyc
+
5|Ai#����^RIt^RIt^RIHtHt^RIt^RIt^RIt^RIt^RI	t	^RI
t
^RIt^RIt^RI
Ht^RIt^RIt^RIHt^RIHt^RIHt^RIHt^RIt^RIt^RIt^RIHt^R	IH t H!t!H"t"^R
I#H$t$^RI%H&t&^RI'H(t(!R
R])4t*]+R8Xd1]*!4t,]-!],P]44],P_^4R#R# ]d]PtL�i;i ]d^RItL�i;i ]d
^RIHtL�i;i)�N)�md5�sha256)�	maketrans)�NamedTemporaryFile)�escape)�ConfigParser)�gettext)�AptAuth)�SourcesList�SourceEntry�Deb822SourceEntry)�InvalidShortcutException)�shortcut_handler)�Gioc�a�]tRt^DtoRtRt]!]!^44wtt	t
]R]	R]
R/tR<RltRt
R	tR
tRtRtR
tRtRtRtRtRtRtRtRtRtRtRtRtRtRt Rt!Rt"Rt#Rt$R t%R!t&R"t'R#t(R$t)R%t*R&t+R't,R(t-R)t.R*t/R+t0R,t1R-t2R.t3R/t4R0t5R1t6R2t7R=R3lt8R=R4lt9R>R5lt:R6t;R7t<R8t=R9t>]?R?R:l4t@R;tAVtBR#)@�SoftwarePropertiesz /usr/share/app-install/channels/z$/etc/update-manager/release-upgrades�normal�lts�neverNc�b�VR,VnW0nVR8wd!\PP	RV4VR8XdRpW nWn\VR7Vn\PP4Vn
.VnRVn
VP4VP4VP!4.Vn\$P&!4Vn\+VR7Vn\.P0!4Vn\4P6!VP84R#)	z�Provides the core functionality to configure the used software
repositories, the corresponding authentication keys and
update automation z/etc/popularity-contest.conf�/�DirNz/usr/share/software-properties/)�deb822F)�rootdir)�
popconfiler�apt_pkg�config�set�options�datadirr�sourceslist�
aptsources�distro�
get_distro�seen_server�modified_sourceslist�reload_sourceslist�backup_sourceslist�backup_apt_conf�custom_mirrors�queue�Queue�myqueuer
�apt_keyr�Cancellable�cancellable�atexit�register�wait_for_threads)�selfr rrrs&&&&&�G/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py�__init__�SoftwareProperties.__init__Ws����<�<�D�O��L��#�~�
�n�n�����(��$��1�g��L��L�"�&�1�D���#�#�.�.�0�D�K��D�� %�D���������������D���;�;�=�D�L��7�+�D�L����(�D��
�O�O�D�)�)�*�c��\P!4FCpVP\P!4P8wgK3VP	4KE	R#)z8wait for all running threads (PPA key fetchers) to exit N)�	threading�	enumerate�ident�current_thread�join)r4�ts& r5r3�#SoftwareProperties.wait_for_threads�s9��
�
 �
 �
"��	
���I�,�,�.�4�4�	4�	����#r8c���/Vn\PP4FEp\P
P
\PV,4pW PV&KG	R#)z$Backup all apt configuration optionsN)�apt_conf_backup�softwareproperties�CONF_MAP�keysrr�find_i)r4�option�values&  r5r)�"SoftwareProperties.backup_apt_conf�sQ���D��$�-�-�2�2�4�����%�%�&8�&A�&A�&�&I�J��',���V�$�5r8c��VPP4FRp\PP	\
PV,\VPV,44KT	VP4R#)z$Restore the stored apt configurationN)	rBrErrrrCrD�str�write_config)r4rGs& r5�restore_apt_conf�#SoftwareProperties.restore_apt_conf�s\���&�&�+�+�-�������-�6�6�v�>��t�3�3�F�;�<�	>�.�	���r8c�f�\PP\PR,4^8�Edu\PP\PR,4^8Xd6\
PPR4'd\P#\PP\PR,4^8XdJ\PP\PR,4^8Xd\P#\PP\PR,4^8XdJ\PP\PR,4^8Xd\P#R#\PP\PR,4^8XdJ\PP\PR,4^8Xd\P#R#)z�Parse the apt cron configuration. Try to fit a predefined use case
and return it. Special case: if the user made a custom
configurtation, that we cannot represent it will return None �
autoupdate�
unattendedz/usr/bin/unattended-upgrade�autodownloadN)rrrFrCrD�os�path�exists�UPDATE_INST_SEC�UPDATE_DOWNLOAD�
UPDATE_NOTIFY�
UPDATE_MANUAL�r4s&r5�get_update_automation_level�.SoftwareProperties.get_update_automation_level�sj���~�~���/�8�8��F�G�!�K��>�>� � �!3�!<�!<�\�!J�K�q�P��w�w�~�~�;�<�<�%�5�5�5�
�^�^�
"�
"�#5�#>�#>�~�#N�
O�ST�
T�
�^�^�
"�
"�#5�#>�#>�|�#L�
M�QR�
R�%�5�5�5�
�^�^�
"�
"�#5�#>�#>�|�#L�
M�QR�
R�
�^�^�
"�
"�#5�#>�#>�~�#N�
O�ST�
T�%�3�3�3��	���	�	�1�:�:�<�H�	I�Q�	N�	���	�	�1�:�:�>�J�	K�q�	P�!�/�/�/�r8c�
�V\P8Xd\PP	\P
R,\
^44\PP	\P
R,\
^44EM�V\P8Xd\PP	\P
R,\
^44\PP	\P
R,\
^44EMLV\P8Xd~\PP	\P
R,\
^44\PP	\P
R,\
^44M�\PP	\P
R,\
^44\PP	\P
R,\
^44\PP	\P
R,\
^44VP4R#)z�Set the apt periodic configurtation to the selected
update automation level. To synchronize the cache update and the
actual upgrading function, the upgrade function, e.g. unattended,
will run every day, if enabled. rQrRrPN)
rCrVrrrrDrKrWrX�set_modified_config)r4�states&&r5�set_update_automation_level�.SoftwareProperties.set_update_automation_level�s���

�"�2�2�2������-�6�6�|�D�c�!�f�M������-�6�6�~�F��A��O�	�$�4�4�	4������-�6�6�~�F��A��O������-�6�6�|�D�c�!�f�M�	�$�2�2�	2������-�6�6�~�F��A��O������-�6�6�|�D�c�!�f�M������-�6�6�|�D�c�!�f�M������-�6�6�|�D�c�!�f�M������-�6�6�~�F��A��O����r8c��V\PP\PR,48XgQ\PP\PR,\
V44VP4R#R#)z8Set the interval in which we check for available updatesrPN)rrrFrCrDrrKr^)r4�dayss&&r5�set_update_interval�&SoftwareProperties.set_update_interval�s]���W�^�^�*�*�+=�+F�+F�|�+T�U�
U�
�.�.�
�
�/�8�8��F��D�	�
R�
�
"�
"�
$�Vr8c�j�\PP\PR,4#)z2Returns the interval of the apt periodic cron job rP)rrrFrCrDrZs&r5�get_update_interval�&SoftwareProperties.get_update_interval�s#���>�>� � �!3�!<�!<�\�!J�K�Kr8c��\PPVP4'g
VP#\4pVP
VP4VPRR4'dNVPRR4P4pVPP4Fwr4WB8XgK
Vu#	VP#)zm
return the release upgrade policy:
 RELEASE_UPGRADES_NORMAL,
 RELEASE_UPGRADES_LTS,
 RELEASE_UPGRADES_NEVER
�DEFAULT�Prompt)rSrTrU�RELEASE_UPGRADES_CONF�RELEASE_UPGRADES_NORMALr�read�
has_option�get�lower�release_upgrades_policy_map�items)r4�parser�type�k�vs&    r5�get_release_upgrades_policy�.SoftwareProperties.get_release_upgrades_policy�s����7�7�>�>�$�4�4�5�5�
�
)�
)�)�
�^�F�
�K�K��*�*�+�
����8�,�,�
�Z�Z�	�(�
+�
1�
1�
3�d��2�2�8�8�:�$�!��9��(�;��'�'�'r8c
���\PPVP4'gS\	VPR4;_uu_4pVPRVPV,,4RRR4R#\	VPR4;_uu_4p\RR7;_uu_4pVF{pVP4pVP4PR4'd,VPR	VPV,,4KcVPVR
,4K}	VP4\P!VPVP4\P!VPVP4RRR4RRR4R# +'giR#;i +'giL.;i +'giR#;i)zk
set the release upgrade policy:
 RELEASE_UPGRADES_NORMAL,
 RELEASE_UPGRADES_LTS,
 RELEASE_UPGRADES_NEVER
 �wz[DEFAULT]
Prompt=%s
NT�rzw+)�mode�promptz
Prompt=%s
�
)rSrTrUrl�open�writerrr�striprq�
startswith�flush�shutil�copymode�name�copy)r4�i�f�out�lines&&   r5�set_release_upgrades_policy�.SoftwareProperties.set_release_upgrades_policy�s:���7�7�>�>�$�4�4�5�5���*�*�3�/�/�1�	���(�$�*J�*J�1�*M�M�N�0�
�	
�d�(�(��	-�	-��4F�D�4Q�4Q�UX��$��z�z�|���:�:�<�"�"�8�,�,�

�)�)�M�D�$D�$D�Q�$G�G�
H�

�)�)�D��I�
��
�i�i�k��o�o�d�0�0�#�(�(�;��k�k�#�(�(�D�6�6�7�5R�	-��0�/�
��4Q�4Q��	-�	-��s1�*F/� G�5C(G	�G�/G	�G
�G�G'	c���\PPVP4'd�\	VP4;_uu_4pVP4P
R4pRRR4XFGpVP
R4wrEVR8Xd*VPR4P4R8XdR#KGKI	R# +'giL_;i \dKni;i)	z�Will return True if the user wants to participate in the popularity
contest. Otherwise it will return False. Special case: if no
popcon is installed it will return False rN�=�PARTICIPATE�"�yesTF)
rSrTrUrr�rn�splitr�rq�
ValueError)r4r��linesr��keyrHs&     r5�get_popcon_participation�+SoftwareProperties.get_popcon_participation�s���
�w�w�~�~�d�o�o�&�&�
�$�/�/�
"�
"�a��&�&�(�.�.��&�%�#��D�
�"�j�j��o����-�'�E�K�K��,<�,B�,B�,D��,M��-N�'���#�
"���
��
�s�
 C�;>C�C	�C&�%C&c
�\�VR8XdRpMRp\PPVP4'dW\	VPR4;_uu_4pVUu.uF"p\
P!RRV,V4NK$	ppRRR4M�\4p\	RR	4;_uu_4pVPVPR
44RRR4VP4p.pVPRV,4VPR\V4,4VPR
4\	VPR4;_uu_4pVPX4RRR4R#uupi +'giLO;i +'giL�;i +'giR#;i)z>Enable or disable the participation in the popularity contest Tr��nor|z^(PARTICIPATE=)(".+?")z\1"%s"Nz/dev/urandom�rbizMY_HOSTID="%s"
zPARTICIPATE="%s"
zUSE_HTTP="yes"
r{)rSrTrUrr��re�subr�updatern�	hexdigest�appendrK�
writelines)	r4�
is_helpfulrHrr�r��mr��ids	&&       r5�set_popcon_pariticipation�,SoftwareProperties.set_popcon_pariticipations;���T������	�w�w�~�~�d�o�o�&�&��$�/�/�3�
'�
'�:�!+�-�!+���V�V�5�y�5�7H�$�O�!+�
�-�(�
'�

�E��
�.�$�
'�
'�1�
�H�H�Q�V�V�D�\�"�(�
�[�[�]����
���)�B�.�/�
���+�c�%�j�8�9�
���)�*�	
�d�o�o�s�	#�	#�q�	���U��
$�	#��-�(�
'��(�
'��
$�	#�	#�s6�E4�(E/�E4�0!F�F�/E4�4F	�F	�F+	c�d�\VPP4^8dRVPnR#RVPn/p.pVP	VPP
4VP	VPP4VFkpVPV9d7VPF$pWP,PV4K&	KJ\VP4WP&Km	\VPP4^8�d-VPPWPP&VPPF�pVPV9g�VPV9gK'\\WP,4\VP4,4^8XdKl\\VP4VPP,4^8XdK�RVPnR#	R#)z�Return True if all distro componets are also available as
source code. Otherwise return Flase. Special case: If the
configuration cannot be represented return NoneFTN)�lenr#�source_code_sources�get_source_code�extend�main_sources�
child_sources�template�comps�addr�
cdrom_sources�cdrom_comps�source_template�
enabled_comps)r4�	templates�sources�source�comps&    r5�get_source_code_state�(SoftwareProperties.get_source_code_states���
�4�;�;�*�*�+�a�/�',����#��'+����#��	������t�{�{�/�/�0����t�{�{�0�0�1��F����)�+�"�L�L�D��o�o�.�2�2�4�8�)�.1����->�	�/�/�*���t�{�{�(�(�)�A�-�59�[�[�5L�5L�I�k�k�1�1�2��k�k�5�5�F����i�/����9�,��S��?�?�3�4�s�6�<�<�7H�H�I�Q�N���V�\�\�*�T�[�[�-F�-F�F�G�1�L�.3����+��
6�r8c��RVP3RVP3RVP'*3RVP'*33Fwr#\	RV:RV:24K	VP
'dMRVP
P3RVP
P33Fwr#\	RV:RV:24K	\	R4R	#)
z4Print the data of a source entry to the command linezURI:zComps:zEnabled:zValid:� z	MatchURI:zBaseURI:rN)�urir��disabled�invalid�printr��	match_uri�base_uri)r4r��labelrHs&&  r5�print_source_entry�%SoftwareProperties.print_source_entryEs���"�F�J�J�/�$�f�l�l�3�&�F�O�O�(;�<�$�&�.�.�&8�9�;���	�%��'�(�	;�
���� +�V�_�_�-F�-F�G� *�F�O�O�,D�,D�E�G�N�U��e�U�+�,�G�
�$�Kr8c��\R4VPFp\VP44K	\R4R#)zPrint the complete sources.listzSTART SOURCES.LIST:zEND SOURCES.LIST
N)r�r!rK�r4r�s& r5�massive_debug_output�'SoftwareProperties.massive_debug_outputRs2��	�
� ��"�"��
�f�j�j�l��#�	�
�r8c�|�WPnVPPV4pVP4V#)z change the main download server )r#�default_server�
change_server�set_modified_sourceslist)r4�server�ress&& r5�change_main_download_server�.SoftwareProperties.change_main_download_serverYs1��!'�K�K��
�+�+�
#�
#�F�
+�C��!�!�#��Jr8c�\�VPPV4VP4R#)z Enable a component of the distroN)r#�enable_componentr��r4r�s&&r5r��#SoftwareProperties.enable_component`s ���K�K� � ��&��!�!�#r8c�\�VPPV4VP4R#)z!Disable a component of the distroN)r#�disable_componentr�r�s&&r5r��$SoftwareProperties.disable_componentes ���K�K�!�!�$�'��!�!�#r8c�~�VPPPFpVPV8XgKVu#	R#�N)r#r��childrenr�)r4r�r�s&& r5�_find_template_from_string�-SoftwareProperties._find_template_from_stringjs-���K�K�/�/�8�8��	���$�	���9r8c��\V\4'dVPV4pVPPF1pVP
V8XgKVPPV4K3	VPPF1pVP
V8XgKVPPV4K3	VP4R#)�7Enable a child repo of the distribution main repositoryN)
�
isinstancerKr�r#r�r�r!�remover�r�)r4r�r�s&& r5�disable_child_source�'SoftwareProperties.disable_child_sourceos����(�C� � ��0�0��:�h��+�+�+�+���?�?�h�&����#�#�F�+�,��+�+�1�1���?�?�h�&����#�#�F�+�2�	�!�!�#r8c�(�\V\4'dVPV4pVPR8XdVPP
pMVPpVPP
W!PR7VP4R#)r�N)r��dist)	r�rKr�r�r#r��
add_sourcer�r�)r4r��	child_uris&& r5�enable_child_source�&SoftwareProperties.enable_child_source|sn���(�C� � ��0�0��:�h����D� ��K�K�.�.�	��%�%�	��K�K���y�}�}��=��!�!�#r8c�.�.pVPVPP4VPVPP4VPPFpVP
P
V4K 	VP4R#)z%Remove all distro source code sourcesN)r�r#r�r�r�r!r�r��r4r�r�s&  r5�disable_source_code_sources�.SoftwareProperties.disable_source_code_sources�sg���G��N�N�4�;�;�+�+�,��N�N�4�;�;�,�,�-��+�+�1�1��������'�2��!�!�#r8c�v�.pVPVPP4VPVPP4VPPFpVP
P
V4K 	VFnpVP
PRVPVPVPRVP
PV4^,VPVR7Kp	VPPF�pVP
PRVPPPVPPP VPRVP
PV4^,VPVR7K�	VP#4R#)z0Enable source code source for all distro sources�deb-srczAdded by software-properties)�parentN)r�r#r�r�r�r!r�r�r�r�r��index�filer�r�r�r�r�r�s&  r5�enable_source_code_sources�-SoftwareProperties.enable_source_code_sources�sQ���G��N�N�4�;�;�+�+�,��N�N�4�;�;�,�,�-��+�+�1�1��������'�2��������Y�#�Z�Z�#�[�[�#�\�\�;�!�-�-�3�3�F�;�A�=�#�[�[�$*�	�	,���+�+�+�+�������Y�!�[�[�8�8�A�A�!�[�[�8�8�=�=�#�\�\�;�!�-�-�3�3�F�;�A�=�#�[�[�$*�	�	,�,�	�!�!�#r8c��.VnVPPF�p\V\4'd#\	VP
VPR7pMF\V\4'd#\VP
VPR7pM\RV24hVPPV4K�	R#)z+Store a backup of the source.list in memory�r�r���sectionr��Unknown source: N)
�sourceslist_backupr!�listr�rr�r�r
�	TypeErrorr�)r4r��
source_bkps&  r5r(�%SoftwareProperties.backup_sourceslist�s��� �D���"�"�'�'���f�k�*�*�$�&�+�+�6�;�;�G�J�
�� 1�
2�
2�*�6�;�;�V�[�[�Q�J��.�v�h�7�8�8����&�&�z�2�(r8c��VP4VPPFp\V4V8XgKVu#	R#r�)r'r!r�rK)r4r�r�s&& r5�_find_source_from_string�+SoftwareProperties._find_source_from_string�s<��	�����"�"�'�'��	�V���	��
�(�r8c��\V\4'dVPV4pVP'*VnVP	4R#)z&Enable or disable the selected channelN)r�rKrr�r�r�s&&r5�toggle_source_use�$SoftwareProperties.toggle_source_use�s;���&�#����,�,�V�4�f� �/�/�)�F�O��!�!�#r8c��\VPP4F�wr4\V4V8XgKVPPV,Pp\V\4'd$\
W%4VPPV&M"\W%4VPPV&VP4R#	R#�TF)	r;r!r�rKr�r�r
rr�)r4�	old_entry�	new_entryr��entryr�s&&&   r5�replace_source_entry�'SoftwareProperties.replace_source_entry�s���#�D�$4�$4�$9�$9�:���	�U��y�	 ����$�$�U�+�0�0���e�.�/�/�+<�Y�+M�D���!�!�%�(�+6�y�+G�D���!�!�%�(��%�%�'��;�r8c�F�VP4VP4R#)zFRevert all settings to the state when software-properties
was launchedN)rM�revert_sourceslistrZs&r5�revert�SoftwareProperties.revert�s��	�������r8c���.VPnVPF�p\V\4'd#\	VP
VPR7pMF\V\4'd#\VP
VPR7pM\RV24hVPPPV4K�	VP4VP4R#)z6Restore the source list from the startup of the dialogr�r�r�N)r!r�r�r�rr�r�r
r�r��save_sourceslistr')r4r��source_resets&  r5r�%SoftwareProperties.revert_sourceslist�s����D�����)�)���f�k�*�*�&�F�K�K�V�[�[�I�L�
�� 1�
2�
2�,�V�[�[�v�{�{�S�L��.�v�h�7�8�8������$�$�\�2�*�	�������r8c���RVnVP'd-VPP'dVP4VP	4VP4R#)zCThe sources list was changed and now needs to be saved and reloadedTN)r&r�
massive_debugr�rr'rZs&r5r��+SoftwareProperties.set_modified_sourceslist�sF�� $�D���|�|�|����2�2�2��!�!�#��������r8c�&�VP4R#)z+Write the changed apt configuration to fileN)rLrZs&r5r^�&SoftwareProperties.set_modified_config�s�����r8c�N�VPR8XEduVP'd�VPPRR4P4R,\	VP4^P8�dRMR,pR\V4:RVP:2p\	VP4^8�d$VPFpVR	V,,
pK	VPR9dVR	\R
4,,
pVRVP,,
pV#RVP:RVP:R2pVPFpVR	V,,
pK	VPR9dVR	\R
4,,
pV#R
VPP,pVPR9dVR\R4,,
pVP'dVR	VP,,
pVPPR8Xd�VPF�pVPPV4'dMVPPF0pVPV8XgKVRVP,,
pK2	KpVRV,,
pK�	V#)z5Render a nice output to show the source in a treeviewNrr�:N�PNu[…]�z<b>z</b> z %sz
(Source Code)z
%sz</b>z	<b>%s</b>z (%s)zSource CodeF)r�zrpm-src)r��comment�replacer�r�rr�r�ru�_r��description�child�
has_component�
componentsr�)r4r�r�contents�cr�s&&    r5�
render_source� SoftwareProperties.render_source�s��
���$���>�>�>����&�&�t�S�1�7�7�9�#�>�!�&�.�.�1�B�6�7�B�@�
�*0���&�+�+�F�H��6�<�<� �1�$����A����	�)�H�&��{�{�4�4��E�A�o�$6�6�6�������+�+�H���'�*0���V�[�[�A�H��\�\���E�A�I�%��"��{�{�4�4��E�A�o�$6�6�6��������!<�!<�<���;�;�0�0���!�M�"2�2�2�H��>�>�>��u�v�~�~�-�-�H��?�?� � �E�)������?�?�0�0��6�6�$�_�_�7�7���6�6�T�>�$�����(>�>�H�8����
�-�H�%��r8c��^p^p^p^p\RR4pVP'dA^pVPPpVPPVP8Xd^pM?VP
:RVP:RVP:2pVP'd^pVPPR4'd^pW#WEVPV43#)z&extract attributes to sort the sources�
0123456789�
9876543210r��src)rr�r �distributionr#r�r�r�rru�find�	translate)r4r��cur_sys�has_template�has_comment�	is_source�revert_numbers�descs&&      r5�get_comparable�!SoftwareProperties.get_comparable(s����g��l��k��i� ��|�<�n�	���������*�*���?�?�'�'�4�;�;�6��G��%�z�z�6�;�;����E�$�
�^�^�^��k�	���	�	�%�	 �	 ��)��[��n�n�^�,�.�.r8c��.pVPPF�pVP'dKW PP9gK3W PP
9gKOW PP9gKkW PP9gK�W PP9gK�VPV4K�	V#)z>Return a list of sources that are not part of the distribution)
r!r�r�r#r�r�r��disabled_sourcesr�r�)r4�isv_sourcesr�s&  r5�get_isv_sources�"SoftwareProperties.get_isv_sources=s����K��"�"�'�'���~�~�~��+�+�2�2�2��+�+�3�3�3��+�+�3�3�3��+�+�6�6�6����8�8�8����v�&�(��r8c�.�VPP#)z-Return the list of CDROM based distro sources)r#r�rZs&r5�get_cdrom_sources�$SoftwareProperties.get_cdrom_sourcesJs���;�;�$�$�$r8c�L�VPVPP9R3#)z�Return a tuple: the first value describes if a component is enabled
in the Internet repositories. The second value describes if the
first value is inconsistent.F)r�r#�download_compsr�s&&r5�get_comp_download_state�*SoftwareProperties.get_comp_download_stateNs"��

�I�I����3�3�3�U�;�;r8c��.pVPPF1pVPV8XgKVPVP4K3	\V4^8�d7\VPP\V4,4^8XdR#\V4^8�d7\VPP\V4,4^8wdR#R#)z�Return a tuple: the first value describes if a component is enabled
in one of the child source that matcth the given template.
The second value describes if the first value is inconsistent.r)FT)FF)r#r�r�r�r�r�r�r)r4r�r�r!s&&  r5�get_comp_child_state�'SoftwareProperties.get_comp_child_stateUs���
�E����*�*���>�>�X�%��L�L����%�+��5�z�A�~��D�K�K�%�%��E�
�2�3�q�8���	�U��a���D�K�K�%�%��E�
�2�3�q�8����r8c��VPP4.VnVPP	VP4VP4R#r�)r!�refresh�sourceslist_visibler#�get_sourcesr�rZs&r5r'�%SoftwareProperties.reload_sourceslistjs@���������D���K�K���D�,�,�-���� r8c�.�VPR,VPR,VPR,.pVF*p\PPV4'gK*M�	\	R4\PPX4p\PP
V4'g'\P!V4PRR7\V^,R4;_uu_4pVPR4R	R	R	4R
p\PP
V4'dr\P!V4\P,pV\P,'g*\	RV,4\P!VR4VEF'p.p\PPV4'gK-\VR
4;_uu_4pVP!4pR	R	R	4\"P$P'R4p\VR4;_uu_4pVFKp	VP)4F#p
V	P+RV
,4^8�gK"K8	VPV	4KM	VP)4F,pVPRV:RVP-V4:R24K.	R	R	R	4EK*	R	# +'giEL�;i +'giL�;i +'giEKg;i)z+Write the current apt configuration to filez/etc/apt/apt.conf.d/10periodicz#/etc/apt/apt.conf.d/20auto-upgradesz+/etc/apt/apt.conf.d/15adept-periodic-updatezNo config found, creating oneT)�parentsr{rNz/etc/cron.daily/aptz file '%s' not executable, fixingi�r|z
APT::PeriodiczAPT::Periodic::%szAPT::Periodic::z "z";
)rrSrT�isfiler��dirnamerU�pathlib�Path�mkdirr�r��stat�ST_MODE�S_IXUSR�chmod�	readlinesrr�subtreer�r-rF)r4�	conffilesr�rN�ac�perm�periodic�content�cnfr�r�r�s&           r5rL�SoftwareProperties.write_configps�����>�>����C�C����K�K�M�I�
��	������	�	�
���+�,�������"�g�
�W�W�^�^�G�
$�
$����W��#�#�D�#�1��	�!��c�"�"�a�	�����#�
�B�	�w�w�~�~�b���
�W�W�R�[����
&�d��T�\�\�!�!�
�0�2�5�6�
����U�����g�	������	!�	!�
�(�C�
 �
 �A��K�K�M�'�!��n�n�$�$�_�5���(�C�
 �
 �A��d��x�x�z�����.�#�6�7�1�<��"��g�g�d�m���8�8�:�a�
�G�G�Q��
�
�1�
�F�G��!�
 ��#�"�"�� !�
 ��
!�
 �
 �s+�9K�.K/�:3L�2AL�K,	�/K?�Lc�p�VPPR4VPP4R#)zJBackup the existing sources.list files and write the current
configurationz.saveN)r!�backup�saverZs&r5r�#SoftwareProperties.save_sourceslist�s*��	�����G�$������r8c	�X�\V4p\PPVP4'd�\
P
!RVP,4F�p\
V4;_uu_4pVF�pVP4PR4'dK*V\V48XgK<\PP\PPV44^,uuuRRR4u#	RRR4K�	R# +'giK�;i)zg
helper that checks if a given line is in the source list
return the channel name or None if not found
z	%s/*.list�#N)rrSrTrU�CHANNEL_PATH�globr�r�r��splitext�basename)r4�srcline�srcentry�filenamer�r�s&&    r5�_get_channel_from_line�)SoftwareProperties._get_channel_from_line�s���
�7�#�H�	�w�w�~�~�d�'�'�(�(��i�i��d�.?�.?� ?�@�(�
�(�^�^�q��d��z�z�|�&�&�s�+�+���;�t�,�,��W�W�%�%�b�g�g�&6�&6�x�&@�A�!�D�D��^���^�A��
�^�^�s�8:D�7AD�D�D)c��VP4PpVPV4pV'd(VP:RV:R2pVP	V4R#R#)zw
helper that adds the gpg key of the channel to the apt
keyring *if* the channel is in /usr/share/app-install/channels
rz.keyTF)rr�rlre�add_key)r4�shortcutri�channel�keyps&&   r5�&check_and_add_key_for_channel_shortcut�9SoftwareProperties.check_and_add_key_for_channel_shortcut�sM��
�"�"�$�)�)�G��)�)�'�2�G�� �-�-�w�
7�d�
�l�l�4��
�r8c��R#)z(abstract interface to keep the UI alive N�rZs&r5�update_interface�#SoftwareProperties.update_interface�s�r8c��VPR4'gV#VP4^,pVPR^4^,pRV:RVPP:RV:2pV# \dRpL3i;i)z�
short cut - this:
  apt-add-repository http://packages.medibuntu.org free non-free
same as
  apt-add-repository 'deb http://packages.medibuntu.org/ '$(lsb_release -cs)' free non-free'
�httpr��mainzdeb )r�r��
IndexErrorr#�codename)r4r��repo�areass&&  r5�expand_http_line�#SoftwareProperties.expand_http_line�su���?�?�6�"�"�
�k��:�:�<��?�D���
�
�3�q�!�!�$���#�D�K�K�$8�$8�%�A�D��K�������s�A/�/
A?�>A?c�|�\VP44pTPY24# \dR#i;i)z"
Add a source for the given line.
F)rr�r�add_source_from_shortcut)r4r��enable_source_coderps&&& r5�add_source_from_line�'SoftwareProperties.add_source_from_line�s>���#�D�J�J�L�1���(�(��F�F��$��
��s�,�;�;c
���VP4PpVPpVPV4pV'dRMRpWSR,,p\W44p\Wd4pVP'gVP'dR#VPV4'gVP
4VPPVPVPVPVPVPVPVPR7VPPVVPVPVPVPVPVPR7VP!4VP"'dMVP"P$'d1^RIp	V	P)4p
V
P%VPR7R#)	z�
Add a source with the given shortcut and add the signing key if the
site is a known channel or the shortcut implementer adds it.
r�z	# deb-src:�NNF)rr��
architecturesN)�sources_listT)rr��sourceparts_filer�r�rsror!r�rur�r�r�rr�r�r�rr��apt�Cache)r4rpr��deb_liner��debsrc_entry_type�debsrc_line�
new_deb_entry�new_debsrc_entryr��caches&&&        r5r��+SoftwareProperties.add_source_from_shortcut�s����#�#�%�*�*�H��$�$�D��$�$�X�.�H�%7�	�[��#�r�l�2�K���/�M�"�;�5������ 0� 8� 8� 8�
��6�6�x�@�@�����������+�+�&�*�*�&�+�+�&�,�,�!.�!6�!6�+�0�0�'4�'B�'B�
�D�	�����*�)�-�-�)�.�.�)�/�/�!1�!9�!9�.�3�3�'7�'E�'E�
�G�	�!�!�#��|�|�|����+�+�+���	�	���
���"2�"7�"7��8�r8c��V'd�\V\4'd&VPV4pVPVR4R#VebVPVR4\P!V4pRVnRVnVPVR4RVnVPVR4R#\V\4'dVPV4pVfR#VP\PPR48wd�VPPR4'd<VPPP\RVPR74M:VPPP\!RVPR74VPP#V4VP'4R# \$dLi;i)	zRemove the given sourceTNFr�zDir::Etc::sourcelistz.sourcesr)r�)r�rKr�
remove_sourcer�rur�r�rr�	find_file�endswithr!r�r�r
rr�r�r�)r4r��remove_source_codes&&&r5r�� SoftwareProperties.remove_source	sy���	�F�C�	 �	 ��.�.�v�6�����6�4�(�
������6�5�)����6�"�����������6�5�)�������6�5�)���&�#����,�,�V�4�f�
�~��
�{�{�g�n�n�.�.�/E�F�F�	���	�	�j�	)�	)������$�$�%6�r����%L�M������$�$�[��&�+�+�%F�G��
�����f�%�	�!�!�#��
��
��s�G
�
G�Gc��\PPV4'gR#VPP	V4pV# R#;i)z7Add a gnupg key to the list of trusted software vendorsF)rSrTrUr.r�)r4rTr�s&& r5ro�SoftwareProperties.add_key4s@��
�7�7�>�>�$������l�l���t�$���
����s�A�Ac	���\P!4;_uu_4pVP4PR4'd?VR,\	VPR44P
4,R,pMn\V^,4R
9d?VR,\	VPR44P
4,R,pM\RV24RRR4R#\VR	4;_uu_4pVPV4VP4RRR4VPXP4uuRRR4# +'giL5;i +'giR#;i)z<Add a gnupg key from a utf-8 data string (e.g. copy-n-paste)z$-----BEGIN PGP PUBLIC KEY BLOCK-----rzutf-8z.ascz.gpgzNot an OpenPGP certificate: NFr{)����)�tempfile�TemporaryDirectoryr�r�r�encoder��ordr�r�r�r�ror�)r4�keydata�tmpdir�tmpfile�tmps&&   r5�add_key_from_data�$SoftwareProperties.add_key_from_data>s��	�	$�	$�	&�	&�&��=�=�?�%�%�&L�M�M��s�l�V�G�N�N�7�,C�%D�%N�%N�%P�P�SY�Y�G�
����_� 2�
2��s�l�V�G�N�N�7�,C�%D�%N�%N�%P�P�SY�Y�G��0��	�:�;��
'�	&��'�3�
�
�3��I�I�g���I�I�K� ��|�|�C�H�H�%�
'�	&� �
��
'�	&�	&�s*�CE&�0E&�"E	�&"E&�E#
�E&�&E7	c�N�VPPV4R# R#;i)z<Remove a gnupg key from the list of trusted software vendorsTF)r.�rm)r4�keyids&&r5�
remove_key�SoftwareProperties.remove_keyMs$��������������s��$c�N�\V\P4'gQhVPpV'dVPpVP
pM?\P!V4pVPV4pVPpVP
pVP:RV:RV:R2#)z!Return the PackageKit package id �;)	r�r�Package�current_ver�ver_str�arch�DepCache�get_candidate_verr�)r4�	apt_cache�pkg�cur_ver�verr��depcache�	candidates&&&     r5�get_package_id�!SoftwareProperties.get_package_idUs|���c�7�?�?�+�+�+�+��o�o�G���o�o���|�|���#�#�I�.���.�.�s�3�	������~�~���(�(�C��.�.r8c�F�\P!V4pVPV4p.pVPP	R4F>pVF5wrxp	VPV4R8wgKVP
W,4K7	K@	V# \\3d.u#i;i)zEGet the package dependencies, which can be filtered out by a pattern �Depends���)	rr�r��depends_list_strrpr-r��KeyErrorr�)
r��package�patternr�r��dependencies�dep_list�dep_name�dep_ver�dep_ops
&&&       r5�get_dependencies�#SoftwareProperties.get_dependenciescs������	�*�H��*�*�7�3�I��L��!�2�2�6�6�y�A�H�-5�)��6��=�=��)�R�/� �'�'�	�(;�<�.6�B����
�i� ���	��s�9B
�)B
�
B �B )rBr.r0r*r r#r&r-rrrr%r!r�rH)NNrF)F)Tr�)C�__name__�
__module__�__qualname__�__firstlineno__rerlr��rangerm�RELEASE_UPGRADES_LTS�RELEASE_UPGRADES_NEVERrrr6r3r)rMr[r`rdrgrxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r(rrrrrr�r^r&r5r:r=rArDr'rLrrlrsrwr�r�r�r�ror�r�r��staticmethodr��__static_attributes__�__classdictcell__)�
__classdict__s@r5rrDse����2�,�A���5��8�n�	�����h��e��g�!��'+�R�-���.�(%�L�(�&�0� �2%�N� ��$�
$�
�
$�$�$�$�<
3��$������(�T.�*�%�<��*!�/H�b�� �0��"	G�$�L)$�V�
&��/����r8r�__main__)0rr��hashlibrrr�rSrfr�r:r1r�rO�stringr�ImportErrorrKrRr+r,r�xml.sax.saxutilsr�configparserrr	rr"�aptsources.distrorCr
�aptsources.sourceslistrrr
�"softwareproperties.shortcuthandlerr�softwareproperties.shortcutsr�
gi.repositoryr�objectrr��spr�rxr�rvr8r5�<module>r�s���4���	�	��
��
��������(�#�(�'�!�����P�P�G�9��n��n�b�z����"���&�&�(�)�� � ��#���]���m�m�)���������(�'�(�s4�C�C%�C6�C"�!C"�%C3�2C3�6
D�D

Youez - 2016 - github.com/yon3zu
LinuXploit