shell bypass 403

GrazzMean-Shell Shell

Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 13.59.123.182
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : tarfile.cpython-313.pyc
�

*}g������SrSrSrSrSSKJr SSKrSSKrSSK	r	SSK
r
SSKrSSKrSSK
r
SSKrSSKrSSKrSSKr\\\4r/SQrSrS	r\S
-rSrSrS
rS
rSrSr Sr!Sr"Sr#Sr$Sr%Sr&Sr'Sr(Sr)Sr*Sr+Sr,Sr-Sr.Sr/Sr0Sr1\1r2\ \!\"\#\&\'\(\$\%\)\*\+4r3\ \!\(\+4r4\)\*\+4r5Sr61S kr7\8\8\8\9\9\9S!.r:\RvS":XaS#r<O\Rz"5r<S$r>S%r?S&r@S'\24S(jrAS)rBS\S4S*jrCS+rD"S,S-\E5rF"S.S/\F5rG"S0S1\F5rH"S2S3\F5rI"S4S5\F5rJ"S6S7\F5rK"S8S9\K5rL"S:S;\K5rM"S<S=\K5rN"S>S?\K5rO"S@SA\K5rP"SBSC5rQ"SDSE5rR"SFSG\S5rT"SHSI\S5rU"SJSK\	R�5rW"SLSM\F5rX"SNSO\X5rY"SPSQ\X5rZ"SRSS\X5r["STSU\X5r\"SVSW\X5r]SeSXjr^SYr_SZr`S[ra\_\`\aS\.rb\S"5rc\R�"S]5re"S^S_\S5rf"S`Sa\S5rgSbrh\gR
rScri\jSd:Xa\i"5 gg!\a SrGNf=f!\a SrGN$f=f)fz,Read from and write to tar format archives.
z0.9.0u"Lars Gustäbel (lars@gustaebel.de)u4Gustavo Niemeyer, Niels Gustäbel, Richard Townsend.�)�openN)�TarFile�TarInfo�
is_tarfile�TarError�	ReadError�CompressionError�StreamError�ExtractError�HeaderError�ENCODING�USTAR_FORMAT�
GNU_FORMAT�
PAX_FORMAT�DEFAULT_FORMATr�fully_trusted_filter�data_filter�
tar_filter�FilterError�AbsoluteLinkError�OutsideDestinationError�SpecialFileError�AbsolutePathError�LinkOutsideDestinationError�i�sustar  sustar00�d��0�1�2�3�4�5�6�7�L�K�S�x�g�X��)�path�linkpath�size�mtime�uid�gid�uname�gname>r/r6r5r0)�atime�ctimer2r3r4r1�nt�utf-8c�v�Uc[S5eURX#5nUSUU[U5-
[--$)z8Convert a string to a null-terminated bytes object.
    Nzmetadata cannot contain None)�
ValueError�encode�len�NUL)�s�length�encoding�errorss    �./opt/alt/python313/lib64/python3.13/tarfile.py�stnrE�sA��	�y��7�8�8�	����"�A��W�f�:��#�a�&��C�/�/�/�c�\�URS5nUS:waUSUnURX5$)z8Convert a null-terminated bytes object to a string.
    r���N)�find�decode)r@rBrC�ps    rD�ntsrL�s2��	
���u�
�A��B�w�
�b�q�E���8�8�H�%�%rFc�J�USS;aOSn[[U5S-
5HnUS-nXUS--
nM USS:XaS[U5S-
-U-
*nU$[USS5n[UR	5=(d S	S5nU$![
a [
S
5ef=f)z/Convert a number field to a python number.
    r)��r-�rO��ascii�strict�0�invalid header)�ranger>rL�int�stripr<�InvalidHeaderError)r@�n�is   rD�ntir\�s���
	��t�~��
���s�1�v��z�"�A�
�!�G�A�
�1�q�5��M�A�#�
�Q�4�5�=��#�a�&�1�*�%��)�*�A�
�H�	7��A�w��)�A��A�G�G�I�$��a�(�A�
�H���	7�$�%5�6�6�	7�s�0B�B"rPc��Un[U5nSUs=::aSUS-
-:a O O[SUS-
U4-S5[-nU$U[:XauSUS-
-*Us=::aSUS-
-:a[O OXUS:�a
[	S/5nO[	S/5nSU-U-n[US-
5HnUR
SUS-5 US-nM U$[S	5e)
z/Convert a python number to a number field.
    rrPr-z%0*orRrQrNrOzoverflow in number field)rW�bytesr?r�	bytearrayrV�insertr<)rZ�digits�format�
original_nr@r[s      rD�itnrd�s����J��A��A��A�!��f�q�j�!�!��&�F�Q�J��?�*�G�4�s�:��
�H�
�:�	�3�6�A�:�#6�"6�!�"Q�c�f�q�j�>Q�"Q���6��5�'�"�A��5�'�"�A��v�
��!�A��v��z�"�A�
�H�H�Q��E�	�"�
�!�G�A�#�
�H��3�4�4rFc��S[[R"SU55-nS[[R"SU55-nX4$)azCalculate the checksum for a member's header by summing up all
characters except for the chksum field which is treated as if
it was filled with spaces. According to the GNU tar sources,
some tars (Sun and NeXT) calculate chksum with signed char,
which will be different if there are chars in the buffer with
the high bit set. So we calculate two checksums, unsigned and
signed.
rQ�
148B8x356B�
148b8x356b)�sum�struct�unpack_from)�buf�unsigned_chksum�
signed_chksums   rD�calc_chksumsrn�sE���C�� 2� 2�<�� E�F�F�O��#�f�0�0��s�C�D�D�M��)�)rFc��U=(d SnUS:XagUc[R"XU5 g[X$5upV[U5H<nUR	U5n[U5U:aU"S5eUR
U5 M> US:wa9UR	U5n[U5U:aU"S5eUR
U5 g)z_Copy length bytes from fileobj src to fileobj dst.
If length is None, copy the entire content.
i@rN�unexpected end of data)�shutil�copyfileobj�divmodrV�readr>�write)	�src�dstrA�	exception�bufsize�blocks�	remainder�brks	         rDrrrr�s����"��G�
��{��
�~����3�W�-���v�/��F�
�6�]���h�h�w����s�8�g���4�5�5��	�	�#��	��A�~��h�h�y�!���s�8�i���4�5�5��	�	�#��
rFc��[[RSS5nUb!URUS5R	U5n[USS9 g)NrB�backslashreplace� )�end)�getattr�sys�stdoutr=rJ�print)r@rBs  rD�_safe_printr�s@���s�z�z�:�t�4�H���
�H�H�X�1�2�9�9�(�C��	�!��rFc��\rSrSrSrSrg)ri
zBase exception.�N��__name__�
__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r�rFrDrr
s���rFrc��\rSrSrSrSrg)riz%General exception for extract errors.r�Nr�r�rFrDrrs��/�rFrc��\rSrSrSrSrg)riz&Exception for unreadable tar archives.r�Nr�r�rFrDrrs��0�rFrc��\rSrSrSrSrg)r	iz.Exception for unavailable compression methods.r�Nr�r�rFrDr	r	s��8�rFr	c��\rSrSrSrSrg)r
iz=Exception for unsupported operations on stream-like TarFiles.r�Nr�r�rFrDr
r
s��G�rFr
c��\rSrSrSrSrg)riz!Base exception for header errors.r�Nr�r�rFrDrrs��+�rFrc��\rSrSrSrSrg)�EmptyHeaderErrorizException for empty headers.r�Nr�r�rFrDr�r�s��&�rFr�c��\rSrSrSrSrg)�TruncatedHeaderErrori"z Exception for truncated headers.r�Nr�r�rFrDr�r�"s��*�rFr�c��\rSrSrSrSrg)�EOFHeaderErrori%z"Exception for end of file headers.r�Nr�r�rFrDr�r�%s��,�rFr�c��\rSrSrSrSrg)rYi(zException for invalid headers.r�Nr�r�rFrDrYrY(s��(�rFrYc��\rSrSrSrSrg)�SubsequentHeaderErrori+z3Exception for missing and invalid extended headers.r�Nr�r�rFrDr�r�+s��=�rFr�c�0�\rSrSrSrSrSrSrSrSr	g)	�
_LowLevelFilei2zwLow-level file object. Supports reading and writing.
It is used instead of a regular file object for streaming
access.
c��[R[R[R-[R-S.Un[[S5(aU[R-n[R"XS5Ulg)N��r�w�O_BINARYi�)	�os�O_RDONLY�O_WRONLY�O_CREAT�O_TRUNC�hasattrr�r�fd)�self�name�modes   rD�__init__�_LowLevelFile.__init__8sb��������r�z�z�)�B�J�J�6�
�����2�z�"�"��B�K�K��D��'�'�$�e�,��rFc�D�[R"UR5 g�N)r��closer��r�s rDr��_LowLevelFile.closeAs��
������rFc�D�[R"URU5$r�)r�rtr��r�r1s  rDrt�_LowLevelFile.readDs���w�w�t�w�w��%�%rFc�F�[R"URU5 gr�)r�rur��r�r@s  rDru�_LowLevelFile.writeGs��
������!�rF)r�N)
r�r�r�r�r�r�r�rtrur�r�rFrDr�r�2s���
-��&�rFr�c�d�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSSjr
SrS
rSrSrg)�_StreamiJa�Class that serves as an adapter between TarFile and
a stream-like object.  The stream-like object only
needs to have a read() or write() method that works with bytes,
and the method is accessed blockwise.
Use of gzip or bzip2 compression is possible.
A stream-like object could be for example: sys.stdin.buffer,
sys.stdout.buffer, a socket, a tape device etc.

_Stream is intended to be used only internally.
c�:�SUlUc[X5nSUlUS:Xa[U5nUR5nU=(d SUlX lX0lX@lXPlSUl	SUl
SUlUS:Xa[SSKnXplURS5UlUS
:Xa"UR"UlUR'5 gUR)U5 gUS:XaJSSKnUS
:Xa(SUlUR/5Ul[2UlgUR5U5UlgUS
:XaOSSKn	US
:Xa.SUlU	R95UlU	R:UlgU	R=5UlgUS:wa[SU-5eg![a
 [S	5Sef=f![a
 [S5Sef=f![a
 [S5Sef=f! UR(dURR?5 SUle=f)z$Construct a _Stream object.
        TNF�*�rFr�gzzzlib module is not availabler��bz2�bz2 module is not available�xz�lzma module is not available�tar�unknown compression type %r) �_extfileobjr��_StreamProxy�getcomptyper�r��comptype�fileobjryrk�pos�closed�zlib�ImportErrorr	�crc32�crc�errorrx�
_init_read_gz�_init_write_gzr��dbuf�BZ2Decompressor�cmp�OSError�
BZ2Compressor�lzma�LZMADecompressor�	LZMAError�LZMACompressorr�)
r�r�r�r�r�ry�
compresslevelr�r�r�s
          rDr��_Stream.__init__Vs�� ����?�#�D�/�G�$�D���s�?�#�7�+�G��*�*�,�H��
���	��	� �
��������������-	��4��U��!�	��:�:�c�?����3�;�%)�Z�Z�D�N��&�&�(��'�'�
�6��U�"�T���3�;� #�D�I�"�2�2�4�D�H�%,�D�N�"�0�0��?�D�H��T�!�U���3�;� #�D�I�#�4�4�6�D�H�%)�^�^�D�N�#�2�2�4�D�H��U�"�&�'D�x�'O�P�P�#��E#�U�*�+I�J�PT�T�U��#�T�*�+H�I�t�S�T��#�U�*�+I�J�PT�T�U��	��#�#����"�"�$��D�K��sy�<G%�F�AG%�G%�G%�$F1�(-G%�G%�-G%�4G�83G%�,G%�G%�F.�.G%�1G�G%�G"�"G%�%5Hc�l�[US5(a#UR(dUR5 ggg)Nr�)r�r�r�r�s rD�__del__�_Stream.__del__�s&���4��"�"�4�;�;��J�J�L�,7�"rFc��URRUURRURR*URRS5Ul[R"S[[R"555nURSU-S-5 URRS5(aURSSUl[RRUR5UlURURR!SS	5["-5 g)
z6Initialize for writing with gzip compression.
        r�<Ls�s��.gzN���z
iso-8859-1�replace)r��compressobj�DEFLATED�	MAX_WBITS�
DEF_MEM_LEVELr�ri�packrW�time�_Stream__writer��endswithr�r/�basenamer=r?)r�r��	timestamps   rDr��_Stream._init_write_gz�s����9�9�(�(��)-���);�);�*.�)�)�*=�*=�)=�)-���)@�)@�)*�	,���
�K�K��c�$�)�)�+�&6�7�	����(�9�4�{�B�C��9�9���e�$�$��	�	�#�2��D�I��G�G�$�$�T�Y�Y�/��	����T�Y�Y�%�%�l�I�>��D�ErFc�,�URS:Xa*URRXR5UlU=R[U5-
slURS:waURRU5nURU5 g)z&Write string s to the stream.
        r�r�N)	r�r�r�r�r�r>r��compressr�r�s  rDru�
_Stream.write�se���=�=�D� ��y�y���q�(�(�3�D�H����C��F����=�=�E�!����!�!�!�$�A����Q�rFc�`�U=RU-
sl[UR5UR:�avURR	URSUR5 URURSUl[UR5UR:�aMugg)zJWrite string s to the stream if a whole new block
is ready to be written.
N)rkr>ryr�rur�s  rD�__write�_Stream.__write�sr��	
���A�
���$�(�(�m�d�l�l�*��L�L���t�x�x�
����6�7��x�x����
�.�D�H��$�(�(�m�d�l�l�*rFc�4�UR(agSUlURS:Xa=URS:wa-U=RURR5-
slURS:Xa�UR(a�URRUR5 SUlURS:XawURR[R"SUR55 URR[R"SURS-55 UR(dURR5 gg!UR(dURR5 ff=f)	zHClose the _Stream object. No operation should be
done on it afterwards.
NTr�r�rFr�r�l��)r�r�r�rkr��flushr�rurir�r�r�r�r�r�s rDr��
_Stream.close�s	���;�;�����	%��y�y�C��D�M�M�U�$:����D�H�H�N�N�,�,���y�y�C��D�H�H����"�"�4�8�8�,�����=�=�D�(��L�L�&�&�v�{�{�4����'B�C��L�L�&�&�v�{�{�4����J�9N�'O�P��#�#����"�"�$�$��4�#�#����"�"�$�$�s�D!E)�).Fc���URRURR*5UlSUlURS5S:wa[
S5eURS5S:wa[S5e[URS55nURS5 US	-(aI[URS55S
[URS55--nURU5 US-(a&URS5nU(a
U[:XaOM%US-(a&URS5nU(a
U[:XaOM%US-(aURS5 g
g
)z:Initialize for reading a gzip compressed fileobj.
        rFr.s��not a gzip filer-�zunsupported compression method��rQrP�N)r��
decompressobjr�r�r��
_Stream__readrr	�ordrtr?)r��flag�xlenr@s    rDr��_Stream._init_read_gz�s+���9�9�*�*�D�I�I�,?�,?�+?�@�����	��;�;�q�>�[�(��-�.�.��;�;�q�>�W�$�"�#C�D�D��4�;�;�q�>�"�����A���!�8��t�{�{�1�~�&��s�4�;�;�q�>�/B�)B�B�D��I�I�d�O��!�8���K�K��N���A��H����"�9���K�K��N���A��H����!�8��K�K��N�rFc��UR$)z3Return the stream's file pointer position.
        )r�r�s rD�tell�_Stream.tell�s
���x�x�rFc��XR-
S:�an[XR-
UR5up#[U5HnUR	UR5 M  UR	U5 UR$[S5e)zESet the stream's file pointer to pos. Negative seeking
is forbidden.
rz seeking backwards is not allowed)r�rsryrVrtr
)r�r�rzr{r[s     rD�seek�_Stream.seek�sn�����>�Q�� &�s�X�X�~�t�|�|� D��F��6�]���	�	�$�,�,�'�#��I�I�i� ��x�x���@�A�ArFc�n�UceURU5nU=R[U5-
slU$)z5Return the next size number of bytes from the stream.)�_readr�r>)r�r1rks   rDrt�_Stream.reads3�������j�j�������C��H����
rFc�@�URS:XaURU5$[UR5nUR/nX!:a�UR(aURnSUlO-UR
R
UR5nU(dOBURRU5nURU5 U[U5-
nX!:aM�SRU5nX1SUlUSU$!URan[S5UeSnAff=f)z+Return size bytes from the stream.
        r�rFzinvalid compressed dataN)r�rr>r�rkr�rtryr��
decompressrxr�append�join)r�r1�c�trk�es      rDr�
_Stream._reads����=�=�E�!��;�;�t�$�$���	�	�N��
�Y�Y�K���h��x�x��h�h������l�l�'�'����5����
B��h�h�)�)�#�.��
�H�H�S�M�
��S��M�A��h�
�H�H�Q�K���e�H��	���$�x���
�>�>�
B�� 9�:��A��
B�s�C<�<D�D�Dc�4�[UR5nUR/nX!:aSURRUR5nU(dO&URU5 U[U5-
nX!:aMSSR
U5nX1SUlUSU$)z`Return size bytes from stream. If internal buffer is empty,
read another block from the stream.
rFN)r>rkr�rtryrr)r�r1rrrks     rD�__read�_Stream.__read.s���
����M��
�X�X�J���h��,�,�#�#�D�L�L�1�C���
�H�H�S�M�
��S��M�A��h�
�H�H�Q�K���U�8�����$�x�rF)r�rkryr�r�r�r�r�rxr�r�r�r�r�N)r)r�r�r�r�r�r�r�r�rur�r�r�r	rrtrrr�r�rFrDr�r�JsF��	�E�N�F�"�/�%�,�>�
���6rFr�c�0�\rSrSrSrSrSrSrSrSr	g)	r�i?zhSmall proxy class that enables transparent compression
detection for the Stream interface (mode 'r|*').
c�X�XlURR[5Ulgr�)r�rt�	BLOCKSIZErk)r�r�s  rDr��_StreamProxy.__init__Ds�����<�<�$�$�Y�/��rFc�P�URRUlUR$r�)r�rtrkr�s  rDrt�_StreamProxy.readHs���L�L�%�%��	��x�x�rFc���URRS5(agURSSS:XaURSSS:Xag	URRS
5(agg)
Ns�r�r�sBZhr�
s1AY&SYr�)s]�s�7zXZr�r�)rk�
startswithr�s rDr��_StreamProxy.getcomptypeLs\���8�8����/�/��
�X�X�a��]�f�
$����!�B��9�)D��
�X�X�
 �
 �!C�
D�
D��rFc�8�URR5 gr�)r�r�r�s rDr��_StreamProxy.closeVs�������rF)rkr�rtN)
r�r�r�r�r�r�rtr�r�r�r�rFrDr�r�?s���0���rFr�c��\rSrSrSrSSjrSr\S5rSr	Sr
S	rS
r\
R4SjrSSjrS
rSrSrg)�_FileInFilei]zmA thin wrapper around an existing file object that
provides a part of its data as an individual file
object.
Nc��XlX lX0lSUlX@lSUlUcSU4/nSUl/UlSnURnUHQup#X&:�aURRSXbS45 URRSX"U-U45 Xs-
nX#-nMS X`R:a)URRSX`RS45 gg)NrFT)	r��offsetr1�positionr�r��	map_index�mapr)r�r�r,r1r��	blockinfo�lastpos�realposs        rDr��_FileInFile.__init__cs��������	���
��	�������T���I����������+�+��%�L�F����������� >�?��H�H�O�O�T�6�D�=�'�B�C��O�G��m�G�&��Y�Y���H�H�O�O�U�G�Y�Y��=�>�rFc��gr�r�r�s rDr��_FileInFile.flush|s��rFc��g)N�rbr�r�s rDr��_FileInFile.modes��rFc��g�NTr�r�s rD�readable�_FileInFile.readable�s��rFc��g�NFr�r�s rD�writable�_FileInFile.writable�s��rFc�6�URR5$r�)r��seekabler�s rDrB�_FileInFile.seekable�s���|�|�$�$�&�&rFc��UR$)z*Return the current file position.
        )r-r�s rDr	�_FileInFile.tell�����}�}�rFc�8�U[R:Xa1[[US5UR5UlUR
$U[R:XaeUS:a*[UR
U-S5UlUR
$[UR
U-UR5UlUR
$U[R:Xa>[[URU-UR5S5UlUR
$[S5e)z(Seek to a position in the file.
        rzInvalid argument)	�io�SEEK_SET�min�maxr1r-�SEEK_CUR�SEEK_ENDr<)r�r-�whences   rDr�_FileInFile.seek�s����R�[�[� ���H�a� 0�$�)�)�<�D�M��}�}���r�{�{�
"��!�|� #�D�M�M�H�$<�a� @��
��}�}��!$�D�M�M�H�$<�d�i�i� H��
�
�}�}��	�r�{�{�
"���D�I�I��$8�$�)�)� D�a�H�D�M��}�}���/�0�0rFc���UcURUR-
nO"[XRUR-
5nSnUS:�Ga)URURup4pVX@Rs=::aU:aO OOAU=RS-
slUR[UR5:XaSUlMw[XUR-
5nU(adURRX`RU-
-5 URRU5n[U5U:wa[S5eX(-
nOU[U--
nX-nU=RU-
slUS:�aGM)U$)z!Read data from the file.
        rFrr-rp)r1r-rJr/r.r>r�rrtrr?)	r�r1rk�data�start�stopr,rAr|s	         rDrt�_FileInFile.read�s4���<��9�9�t�}�}�,�D��t�Y�Y����6�7�D����Q�h��,0�H�H�T�^�^�,D�)��T��M�M�0�D�0���N�N�a�'�N��~�~��T�X�X��6�)*������d�m�m�3�4�F�����!�!�&�M�M�E�,A�"B�C��L�L�%�%�f�-���q�6�V�#�#�$<�=�=�����s�V�|�#���N�D��M�M�V�#�M�'�Q�h�(�
rFc�f�UR[U55nX!S[U5&[U5$r�)rtr>)r�r|rks   rD�readinto�_FileInFile.readinto�s*���i�i��A�����)�3�s�8���3�x�rFc��SUlgr:)r�r�s rDr��_FileInFile.close�s	����rF)r�r�r/r.r�r,r-r1r�)r�r�r�r�r�r�r��propertyr�r;r?rBr	rHrIrrtrVr�r�r�rFrDr*r*]sV���
?�2
�������'��
%'�K�K�� �>�
rFr*c�(^�\rSrSrU4SjrSrU=r$)�ExFileObjecti�c�>�[URURURURUR
5n[TU]U5 gr�)r*r��offset_datar1r��sparse�superr�)r��tarfile�tarinfor��	__class__s    �rDr��ExFileObject.__init__�s;����g�o�o�w�/B�/B����g�l�l�G�N�N�<��
����!rFr��r�r�r�r�r�r��
__classcell__�rcs@rDr\r\�s
���"�"rFr\c��\rSrSrSrg)ri�r�N)r�r�r�r�r�r�rFrDrr�s��rFrc�(^�\rSrSrU4SjrSrU=r$)ri�c�N>�Xl[TU]	SUR<S35 g)Nzmember z has an absolute path�rbr`r�r��r�rbrcs  �rDr��AbsolutePathError.__init__�s$�����
���7�7�<�<�"2�2G�H�IrF�rbrergs@rDrr�s���J�JrFrc�(^�\rSrSrU4SjrSrU=r$)ri�c�f>�XlX l[TU]
UR<SU<S3S-5 g)Nz would be extracted to �, � which is outside the destination�rb�_pathr`r�r��r�rbr/rcs   �rDr�� OutsideDestinationError.__init__�s7������
�
���G�L�L�+�+B�4�(�"�M�=�>�	?rF�rtrbrergs@rDrr��
���?�?rFrc�(^�\rSrSrU4SjrSrU=r$)ri�c�L>�Xl[TU]	UR<S35 g)Nz is a special filerkrls  �rDr��SpecialFileError.__init__�s"�����
���G�L�L�+�+=�>�?rFrnrergs@rDrr�s���@�@rFrc�(^�\rSrSrU4SjrSrU=r$)ri�c�L>�Xl[TU]	UR<S35 g)Nz is a link to an absolute pathrkrls  �rDr��AbsoluteLinkError.__init__�s"�����
���G�L�L�+�+I�J�KrFrnrergs@rDrr�s���L�LrFrc�(^�\rSrSrU4SjrSrU=r$)ri�c�f>�XlX l[TU]
UR<SU<S3S-5 g)Nz would link to rqrrrsrus   �rDr��$LinkOutsideDestinationError.__init__�s6������
�
���G�L�L�+�?�4�(�"�E�=�>�	?rFrwrergs@rDrr�rxrFrc��0nURn[RRU5nUR	S[R
45(a0URR
S[R
-5=oCS'[RRU5(a[U5e[RR[RRX55n[RRXQ/5U:wa[X5eURnUb�US-nU(awUR5(dUR5(aUS-(dUS-nUS-nO8UR5(dUR!5(aSnO[#U5eX`R:waXcS'U(Ga�UR$bSUS'UR&bSUS	'UR(bSUS
'UR*bSUS'UR5(dUR!5(Ga[RRUR,5(a[/U5eUR!5(aI[RRU[RR1U5UR,5nO*[RRUUR,5n[RRU5n[RRXQ/5U:wa[3X5eU$)N�/r�i��@i�����r�r3r4r5r6)r�r�r/�realpathr%�sep�lstrip�isabsrr�
commonpathrr��isreg�islnk�isdir�issymrr3r4r5r6�linknamer�dirnamer)�member�	dest_path�for_data�	new_attrsr��target_pathr�s       rD�_get_filtered_attrsr��se���I��;�;�D���� � ��+�I�����R�V�V�}�%�%�#)�;�;�#5�#5�c�B�F�F�l�#C�C��� �	�w�w�}�}�T��� ��'�'��'�'�"�"�2�7�7�<�<�	�#@�A�K�	�w�w���;�2�3�y�@�%�f�:�:��;�;�D����e�|����|�|�~�~�������e�|��F�N�D���
�������6�<�<�>�>���'�v�.�.��;�;�� $�f����:�:�!�#�I�e���:�:�!�#�I�e���<�<�#�!%�I�g���<�<�#�!%�I�g���<�<�>�>�V�\�\�^�^��w�w�}�}�V�_�_�-�-�'��/�/��|�|�~�~� �g�g�l�l�9�+-�7�7�?�?�4�+@�+1�?�?�<��!�g�g�l�l�9�+1�?�?�<���'�'�*�*�;�7�K��w�w�!�!�;�":�;�y�H�1�&�F�F��rFc��U$r�r�)r�r�s  rDrr5s���MrFc�X�[XS5nU(aUR"S0UDSS0D6$U$)NF�deepr��r�r��r�r�r�s   rDrr8s-��#�F�u�=�I���~�~�6�	�6��6�6��MrFc�X�[XS5nU(aUR"S0UDSS0D6$U$)NTr�Fr�r�r�s   rDrr>s-��#�F�t�<�I���~�~�6�	�6��6�6��MrF)�
fully_trustedr�rQs([0-9]{1,20}) c��\rSrSrSr\"SX0SS_SS_SS_S	S
_SS_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS _S!S"_S#S$_S%S&_S'S&_S(S&_6rSYS)jr\S*5r	\	RS+5r	\S,5r\RS-5r\S.5r\RS/5rS0r
\\\\\\\\S1\S2.
S3jrS4r\\S54S6jrS7rS8rS9r\S:5rS;r\S<5r\S=5r\S>5r\S?5r\S@5r\SA5r SBr!SCr"SDr#SEr$SFr%SGr&SHr'SIr(SJr)SKr*SLr+SMr,SNr-SOr.SPr/SQr0SRr1SSr2STr3SUr4SVr5SWr6g&)ZriTz�Informational class which holds the details about an
archive member given by a tar header block.
TarInfo objects are returned by TarFile.getmember(),
TarFile.getmembers() and TarFile.gettarinfo() and are
usually created internally.
r�zName of the archive member.r�zPermission bits.r3z6User ID of the user who originally stored this member.r4z7Group ID of the user who originally stored this member.r1zSize in bytes.r2zTime of last modification.�chksumzHeader checksum.�typez�File type. type is usually one of these constants: REGTYPE, AREGTYPE, LNKTYPE, SYMTYPE, DIRTYPE, FIFOTYPE, CONTTYPE, CHRTYPE, BLKTYPE, GNUTYPE_SPARSE.r�zcName of the target file name, which is only present in TarInfo objects of type LNKTYPE and SYMTYPE.r5z
User name.r6zGroup name.�devmajorzDevice major number.�devminorzDevice minor number.r,zThe tar header starts here.r^zThe file's data starts here.�pax_headerszMA dictionary containing key-value pairs of an associated pax extended header.r_zSparse member information.�_tarfileN�_sparse_structs�_link_targetc��XlSUlSUlSUlSUlSUlSUl[UlSUl	SUl
SUlSUlSUl
SUlSUlSUl0Ulg)zEConstruct a TarInfo object. name is the optional name
of the member.
i�rr�N)r�r�r3r4r1r2r��REGTYPEr�r�r5r6r�r�r,r^r_r��r�r�s  rDr��TarInfo.__init__ws{���	���	���������	���
������	���
���
���
���
���
������������rFc�L�SSKnURS[SS9 UR$�NrzhThe undocumented "tarfile" attribute of TarInfo objects is deprecated and will be removed in Python 3.16r.��
stacklevel��warnings�warn�DeprecationWarningr�)r�r�s  rDra�TarInfo.tarfile�s-����
�
�
A��1�	�	.��}�}�rFc�B�SSKnURS[SS9 Xlgr�r�)r�rar�s   rDrar��s(����
�
�
A��1�	�	.� �
rFc��UR$)z(In pax headers, "name" is called "path".�r�r�s rDr/�TarInfo.path�s���y�y�rFc��Xlgr�r�r�s  rDr/r��s���	rFc��UR$)z0In pax headers, "linkname" is called "linkpath".�r�r�s rDr0�TarInfo.linkpath�rFrFc��Xlgr�r�)r�r�s  rDr0r��s�� �
rFc�`�SURRUR[U54-$)Nz<%s %r at %#x>)rcr�r��idr�s rD�__repr__�TarInfo.__repr__�s&���4�>�>�#:�#:�4�9�9�R��X�"N�N�NrFT)
r�r2r�r�r3r4r5r6r��_KEEPc
��U	(a[R"U5nO[R"U5nXLaXlX*LaX+lX:LaX;lXJLaXKlXZLaX[lXjLaXklXzLaX{lX�LaX�l	U$)zGReturn a deep copy of self with the given attributes replaced.
        )
�copy�deepcopyr�r2r�r�r3r4r5r6)r�r�r2r�r�r3r4r5r6r�r��results            rDr��TarInfo.replace�s����]�]�4�(�F��Y�Y�t�_�F����K��� �L����K�� �&�O����J����J��� �L��� �L��
rFc��URcSnOURS-nURUURURURUR
URURURURURURURS.
nUS[:Xa&USRS5(d
US==S-
ss'U$)z9Return the TarInfo's attributes as a dictionary.
        N�)
r�r�r3r4r1r2r�r�r�r5r6r�r�r�r�r�)r�r�r3r4r1r2r�r�r�r5r6r�r��DIRTYPEr�)r�r��infos   rD�get_info�TarInfo.get_info�s����9�9���D��9�9�v�%�D��	�	���������	�	��
�
�����	�	��
�
��
�
��
�
��
�
��
�
�
�� ��<�7�"�4��<�+@�+@��+E�+E���L�C��L��rF�surrogateescapec�2�UR5nUR5HupVUbM
[SU-5e U[:XaUR	XBU5$U[
:XaUR
XBU5$U[:XaURXB5$[S5e)z<Return a tar header as a string of 512 byte blocks.
        z%s may not be Nonezinvalid format)	r��itemsr<r�create_ustar_headerr�create_gnu_headerr�create_pax_header)r�rbrBrCr�r��values       rD�tobuf�
TarInfo.tobuf�s����}�}����:�:�<�K�D��}� �!5��!<�=�=�(��\�!��+�+�D�F�C�C�
�z�
!��)�)�$�&�A�A�
�z�
!��)�)�$�9�9��-�.�.rFc�(�[US'[USRX#55[:�a[	S5e[USRX#55[
:�aUR
USX#5uUS'US'URU[X#5$)z3Return the object as a ustar header block.
        �magicr�zlinkname is too longr��prefix)	�POSIX_MAGICr>r=�LENGTH_LINKr<�LENGTH_NAME�_posix_split_name�_create_headerr)r�r�rBrCs    rDr��TarInfo.create_ustar_header�s���$��W�
��t�J��&�&�x�8�9�K�G��3�4�4��t�F�|�"�"�8�4�5��C�+/�+A�+A�$�v�,�PX�+a�(�D��N�D��L��"�"�4��x�H�HrFc�N�[US'Sn[USRX#55[:�aX@R	US[
X#5-
n[USRX#55[:�aX@R	US[X#5-
nX@RU[X#5-$)z:Return the object as a GNU header block sequence.
        r�rFr�r�)
�	GNU_MAGICr>r=r��_create_gnu_long_header�GNUTYPE_LONGLINKr��GNUTYPE_LONGNAMEr�r)r�r�rBrCrks     rDr��TarInfo.create_gnu_headers���"��W�
����t�J��&�&�x�8�9�K�G��/�/��Z�0@�BR�T\�e�e�C��t�F�|�"�"�8�4�5��C��/�/��V��>N�PX�a�a�C��(�(��z�8�L�L�LrFc��[US'URR5nSS[4SS[4SS4H;upEnXS;aM
XRSS	5 [X5U:�dM5XX5'M= S
HuupGSnXn	[U	[5n
U
(a[U	5OU	nSUs=::aS
US-
-:d	O SX'SnO
U
(aX�U'SnU(dMaXC;dMh[U	5X4'Mw U(aURU[U5nOSnX�RU[SS5-$![a XX5'GM	f=f)z�Return the object as a ustar header block. If it cannot be
represented this way, prepend a pax extended header sequence
with supplement information.
r�r�r/r�r0)r5r5� )r6r6r�rRrS))r3rP)r4rP)r1�)r2r�FrrPr-TrFr�)r�r�r�r�r�r=�UnicodeEncodeErrorr>�
isinstance�float�round�str�_create_pax_generic_header�XHDTYPEr�r)
r�r�rBr�r��hnamerAra�	needs_pax�val�val_is_float�val_intrks
             rDr��TarInfo.create_pax_headersb��
$��W�
��&�&�+�+�-��
���-�
�J��/T�&�(>�$@��D���#��
��
�!�!�'�8�4�
�4�:���'�%)�Z��"�!$@�(R�L�D��I��*�C�%�c�5�1�L�$0�e�C�j�c�G���3�!���
�"3�3���
� �	��%�T�
� �	��y�T�4�$'��H��!�%R�*��1�1�+�w��Q�C��C��(�(��|�W�i�P�P�P��G&�
�%)�Z��"��
�s�D-�-E�Ec�0�URU[S5$)zAReturn the object as a pax global header block sequence.
        r:)r��XGLTYPE)�clsr�s  rD�create_pax_global_header� TarInfo.create_pax_global_headerTs���-�-�k�7�G�L�LrFc�T�URS5n[S[U55HtnSRUSU5nSRXES5n[UR	X#55[
::dMN[UR	X#55[::dMr Xa4$ [S5e)zBSplit a name longer than 100 chars into a prefix
and a name part.
r�r-Nzname is too long)�splitrVr>rr=�
LENGTH_PREFIXr�r<)r�r�rBrC�
componentsr[r�s       rDr��TarInfo._posix_split_nameZs����Z�Z��_�
��q�#�j�/�*�A��X�X�j��!�n�-�F��8�8�J�r�N�+�D��6�=�=��2�3�}�D�����H�5�6�+�E���|��+��/�0�0rFc�j�URS5[[4;nU(a;[URSS5SU5n[URSS5SU5nO[	SSX#5n[	SSX#5nURS[
5nUc[
S5e[	URS	S5S
X#5[URSS5S-SU5[URS
S5SU5[URSS5SU5[URSS5SU5[URSS5SU5SU[	URSS5S
X#5URS[5[	URSS5SX#5[	URSS5SX#5UU[	URSS5SX#5/n[R"S[-SRU55n	[U	[*S5Sn
U	SS[SU
-S5-U	SS-n	U	$) zqReturn a header block. info is a dictionary with file
information, format must be one of the *_FORMAT constants.
r�r�rrPr�r�NzTarInfo.type must not be Noner�rr�r�r3r4r1r�r2s        r�r�r5r�r6r�rz%dsrFi����z%06orRi����)�get�CHRTYPE�BLKTYPErdrEr�r<r�rir�rrrnr^)r�rbrBrC�has_device_fieldsr�r��filetype�partsrkr�s           rDr��TarInfo._create_headerjs��
!�H�H�V�,��'�0B�B����4�8�8�J��2�A�v�>�H��4�8�8�J��2�A�v�>�H��2�q�(�3�H��2�q�(�3�H��8�8�F�G�,�����<�=�=�
������$�c�8�<�������#�f�,�a��8�������"�A�v�.�������"�A�v�.�������#�R��0������!�$�b�&�1��������R�(�#�x�@��H�H�W�k�*������"�%�r�8�<������"�%�r�8�<��������2�&��X�>�
��$�k�k�%�)�+�S�X�X�e�_�=���c�9�*�+�.�/��2���%�4�j�5��F�!2�G�<�<�s�4�5�z�I���
rFc�n�[[U5[5upUS:�aU[U-
[--
nU$)zQReturn the string payload filled with zero bytes
up to the next 512 byte border.
r)rsr>rr?)�payloadrzr{s   rD�_create_payload�TarInfo._create_payload�s7��
#�3�w�<��;����q�=��	�I�-��4�4�G��rFc���URX45[-n0nSUS'X%S'[U5US'[US'UR	U[
X45UR
U5-$)zAReturn a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence
for name.
z
././@LongLinkr�r�r1r�)r=r?r>r�r�rr	)r�r�r�rBrCr�s      rDr��TarInfo._create_gnu_long_header�sn��
�{�{�8�,�s�2����&��V���V���4�y��V��!��W�
��!�!�$��h�G��#�#�D�)�*�	*rFc��SnUR5HupVURSS5 M SnU(aUS-
nUR5H�upVURS5nU(aURUS5nOURS5n[U5[U5-S-nS	=p�U[[	U
55-n	X�:XaOU	n
M!U[[	U
5S
5S-U-S-U-S
--
nM� 0nSUS'X+S'[U5US'[US'URU[S
S5URU5-$![a Sn GM&f=f)z�Return a POSIX.1-2008 extended or global header sequence
that contains a list of keyword, value pairs. The values
must be strings.
Fr:rSTrFs21 hdrcharset=BINARY
r�r#rrR� �=�
z././@PaxHeaderr�r�r1r�r�)
r�r=r�r>r�r^r�r�rr	)r�r�r�rB�binary�keywordr��records�lrZrKr�s            rDr��"TarInfo._create_pax_generic_header�sw����)�/�/�1�N�G�
����W�h�/�2�����0�0�G�)�/�/�1�N�G��n�n�W�-�G�����X�/@�A�����W�-���G��s�5�z�)�A�-�A��I�A����C��F��O���6����	�

�u�S��V�W�-��4�w�>��E��M�PU�U�U�G�!2�(��'��V���V���7�|��V��#��W�
��!�!�$��g�y�I��#�#�G�,�-�	-��I&�
����
�s�E�E�Ec��[U5S:Xa[S5e[U5[:wa[S5eUR	[
5[:Xa[
S5e[USS5nU[U5;a[S5eU"5n[USSX#5Ul[USS	5Ul[US	S
5Ul
[US
S5Ul[USS5Ul[USS5UlXElUSS
Ul[US
SX#5Ul[USSX#5Ul[USSX#5Ul[USS5Ul[USS5Ul[USSX#5nUR$[0:Xa+URR3S5(a[4UlUR$[6:XavSn/n[9S5H>n	[XUS-5n
[XS-US-5nUR=X�45 US-
nM@ [?US5n[USS5n
X�U
4Ul URC5(a URRES5UlU(a+UR$[F;aUS-UR-UlU$![:a  M�f=f)zAConstruct a TarInfo object from a 512 byte bytes object.
        rzempty headerztruncated headerzend of file header��zbad checksumr�l�t�|��ii	i)iIiQiYi�r�i�rr��i�i�i�)$r>r�rr��countr?r�r\rnrYrLr�r�r3r4r1r2r�r�r�r5r6r�r��AREGTYPEr�r��GNUTYPE_SPARSErVr<r�boolr�r��rstrip�	GNU_TYPES)r�rkrBrCr��objr�r��structsr[r,�numbytes�
isextended�origsizes              rD�frombuf�TarInfo.frombuf�s����s�8�q�=�"�>�2�2��s�8�y� �&�'9�:�:��9�9�S�>�Y�&� �!5�6�6��S��S�\�"����c�*�*�$�^�4�4��e���s�1�S�z�8�4����s�3�s�|�$����c�#�c�l�#����c�#�c�l�#����s�3�s�|�$�����C���%��	��
��s�3�<����3�s�3�<��:�����C���h�7��	���C���h�7��	��3�s�3�<�(����3�s�3�<�(����S��S�\�8�4���8�8�x��C�H�H�$5�$5�c�$:�$:��C�H�
�8�8�~�%��C��G��1�X��� ���r��!2�3�F�"�3�R�x��b��#9�:�H�����1�2��r�	����c�#�h��J��3�s�3�<�(�H�#*��"A�C���9�9�;�;��x�x���s�+�C�H��c�h�h�i�/���|�c�h�h�.�C�H��
��"����s�*#J6�6
K�Kc��URR[5nURX!RUR
5nURR
5[-
UlURU5$)z<Return the next TarInfo object from TarFile object
tarfile.
)	r�rtrr*rBrCr	r,�_proc_member)r�rarkr%s    rD�fromtarfile�TarInfo.fromtarfile!s\��
�o�o�"�"�9�-���k�k�#�/�/����@���_�_�)�)�+�i�7��
�����(�(rFc�$�UR[[4;aURU5$UR[:XaURU5$UR[[[4;aURU5$URU5$)zFChoose the right processing method depending on
the type and call it.
)r�r�r��
_proc_gnulongr!�_proc_sparser�r��SOLARIS_XHDTYPE�	_proc_pax�
_proc_builtin)r�ras  rDr-�TarInfo._proc_member6sx���9�9�)�+;�<�<��%�%�g�.�.�
�Y�Y�.�
(��$�$�W�-�-�
�Y�Y�7�G�_�=�
=��>�>�'�*�*��%�%�g�.�.rFc��URR5UlURnUR5(dUR[
;aX R
UR5-
nX!lURURURUR5 UR5(a URRS5UlU$)zSProcess a builtin type or an unknown type which
will be treated as a regular file.
r�)r�r	r^r�r��SUPPORTED_TYPES�_blockr1r,�_apply_pax_infor�rBrCr�r�r#)r�rar,s   rDr5�TarInfo._proc_builtinCs���#�?�?�/�/�1����!�!���:�:�<�<�4�9�9�O�;��k�k�$�)�)�,�,�F���	
���W�0�0�'�2B�2B�G�N�N�S��:�:�<�<��	�	�(�(��-�D�I��rFc�R�URRURUR55nUR	U5nURUlUR[:Xa&[X!RUR5UlO9UR[:Xa%[X!RUR5UlUR#5(a URR%S5UlU$![
an[
[U55SeSnAff=f)z@Process the blocks that hold a GNU longname
or longlink member.
Nr�)r�rtr9r1r.rr�r�r,r�r�rLrBrCr�r�r�r��removesuffix)r�rark�nextrs     rDr1�TarInfo._proc_gnulongYs����o�o�"�"�4�;�;�t�y�y�#9�:��	:��#�#�G�,�D��k�k����9�9�(�(��C�!1�!1�7�>�>�B�D�I�
�Y�Y�*�
*���%5�%5�w�~�~�F�D�M��:�:�<�<��	�	�.�.�s�3�D�I����!�	:�'��A��/�T�9��	:�s�D�
D&�D!�!D&c�0�URup#nU?U(a�URR[5nSn[	S5HLn[XVUS-5n[XVS-US-5n	U(aU	(aURX�45 US-
nMN [US5nU(aM�X l	URR5UlURURUR5-UlX@l
U$![a  Mf=f)z8Process a GNU sparse header plus extra headers.
        r�r�ri�)r�r�rtrrVr\r<rr"r_r	r^r9r1r,)
r�rar&r(r)rkr�r[r,r's
          rDr2�TarInfo._proc_sparsets��)-�(<�(<�%��X�� ���/�/�&�&�y�1�C��C��2�Y��� ���r��!2�3�F�"�3�R�x��b��#9�:�H��h��N�N�F�#5�6��r�	����c�#�h��J��j���"�?�?�/�/�1����)�)�D�K�K��	�	�,B�B����	����"����s�	#D�
D�Dc�H�URRURUR55nUR[
:Xa
URnOURR5nSnSn/n[U5U:�Ga(X$S:wGa[RX$5=n(d[S5e[URS55nUS:a[S5eXH-[U5:�a[S5eURS5U-S-
n	X'R!S5S-U	n
U
R#S5up�n
U(aUS:wdX)S:wa[S5eUR%X�U
45 US:XaUcU
S	:Xa
UR&nOS
nXH-
n[U5U:�aX$S:waGMUcS
nUHxup�n
UR)US
S
UR*5nU[,;a(UR)X�UR&UR*5nOUR)U
S
S
UR*5nX�U'Mz UR/U5nSU;aUR7UU5 OUSU;aUR9UU5 O<UR;S
5S:Xa'UR;S5S:XaUR=UX15 UR[>[@4;a�URCX1R&UR*5 URDUl"SU;aZURFnURI5(dUR[J;aUURUR5-
nUUl"U$![a [S5ef=f![0an[3[5U55SeSnAff=f)zCProcess an extended or global header as described in
POSIX.1-2008.
rNrUr-�rr$s
hdrcharsetsBINARYr:�GNU.sparse.map�GNU.sparse.sizezGNU.sparse.major�1zGNU.sparse.minorrTr1)&r�rtr9r1r�r�r�r�r>�_header_length_prefix_re�matchrYrW�groupr<rRr��	partitionrrB�_decode_pax_fieldrC�PAX_NAME_FIELDSr.rr�r��_proc_gnusparse_01�_proc_gnusparse_00r�_proc_gnusparse_10r�r3r:r,r^r�r8)r�rarkr�r�rB�raw_headersrIrA�header_value_end_offset�keyword_and_value�raw_keyword�equals�	raw_valuerr�r>rr,s                   rDr4�TarInfo._proc_pax�so��
�o�o�"�"�4�;�;�t�y�y�#9�:��
�9�9���!�-�-�K�!�-�-�2�2�4�K��������#�h��n���T�!1�5�;�;�C�E�E�E�E�(�)9�:�:�
;��U�[�[��^�,��
��z�(�)9�:�:��|�c�#�h�&�(�)9�:�:�&+�k�k�!�n�v�&=��&A�#� #�I�I�a�L�1�$4�5L� M��->�-H�-H��-N�*�K���&�D�.�C�4P�TX�4X�(�)9�:�:�����Y�?�@��m�+��0@��	�)�&�/�/�H�&�H��M�C�M�#�h��n���T�!1�R���H�/:�*�F���,�,�[�'�7��N�N�$�G��/�)��.�.�y�G�DT�DT����(���.�.�y�'�7����(��$)�� �#/:�(	:��#�#�G�,�D�
�{�*��#�#�D�+�6�
�+�
-��#�#�D�+�6�
�_�_�/�
0�C�
7�K�O�O�L^�<_�cf�<f��#�#�D�+�?��9�9��/�2�2�� � ��.>�.>����O��+�+�D�K���$��)�)���:�:�<�<�4�9�9�O�#C��d�k�k�$�)�)�4�4�F�!'������y�
;�(�)9�:�:�
;��|�	:�'��A��/�T�9��	:�s$�7M$�2M=�$M:�=
N!�N�N!c�~�/n/nUHhupVnUS:Xa+UR[UR555 M7US:XdM?UR[UR555 Mj [[
X455Ulg![a [	S5ef=f![a [	S5ef=f)z?Process a GNU tar extended sparse header, version 0.0.
        sGNU.sparse.offsetrUsGNU.sparse.numbytesN)rrWrJr<rY�list�zipr_)r�r>rQ�offsetsr'�_rr�s        rDrO�TarInfo._proc_gnusparse_00	s�������!,��A���.�.�?��N�N�3�u�|�|�~�#6�7��2�2�?��O�O�C�����$7�8�"-��3�w�1�2����"�?�,�-=�>�>�?��"�?�,�-=�>�>�?�s�(B
�(B&�
B#�&B<c	��USRS5Vs/sHn[U5PM nn[[USSS2USSS255Ulgs snf)z?Process a GNU tar extended sparse header, version 0.1.
        rE�,Nr.r-)r�rWrYrZr_)r�r>r��xr_s     rDrN�TarInfo._proc_gnusparse_01sZ��#.�.>�"?�"E�"E�c�"J�K�"J�Q�#�a�&�"J��K��3�v�c��c�{�F�1�4�a�4�L�9�:����Ls�Ac	��Sn/nURR[5nURSS5upF[	U5n[U5US-:aiSU;a!XcRR[5-
nURSS5upvUR
[	U55 [U5US-:aMiURR5Ul[[USSS2USSS255Ulg)z?Process a GNU tar extended sparse header, version 1.0.
        Nrr-r.)r�rtrr�rWr>rr	r^rYrZr_)r�r>r�ra�fieldsr_rk�numbers        rDrP�TarInfo._proc_gnusparse_10#s��������o�o�"�"�9�-���i�i��q�)����V����&�k�F�Q�J�&��C�����+�+�I�6�6���)�)�E�1�-�K�F��M�M�#�f�+�&�	�&�k�F�Q�J�&�
#�?�?�/�/�1����3�v�c��c�{�F�1�4�a�4�L�9�:��rFc��UR5H�upEUS:Xa[USU5 MUS:Xa[US[U55 M8US:Xa[US[U55 MVU[;dMbU[;a[U"U5nUS:XaUR
S5n[XU5 M� UR5Ulg![
a SnNKf=f)	z\Replace fields with supplemental information from a previous
pax extended or global header.
zGNU.sparse.namer/rFr1zGNU.sparse.realsizerr�N)	r��setattrrW�
PAX_FIELDS�PAX_NUMBER_FIELDSr<r#r�r�)r�r�rBrCrr�s      rDr:�TarInfo._apply_pax_info3s���*�/�/�1�N�G��+�+���f�e�,��-�-���f�c�%�j�1��1�1���f�c�%�j�1��J�&��/�/�"� 1�'� :�5� A���f�$�!�L�L��-�E���u�-�2�"'�+�+�-����
&�"� !��"�s�>C
�
C�Cc�j�URUS5$![a URX45s$f=f)z1Decode a single field from a pax record.
        rS)rJ�UnicodeDecodeError)r�r�rB�fallback_encoding�fallback_errorss     rDrL�TarInfo._decode_pax_fieldJs:��	D��<�<��(�3�3��!�	D��<�<� 1�C�C�	D�s��2�2c�P�[U[5up#U(aUS-
nU[-$)zLRound up a byte count by BLOCKSIZE and return it,
e.g. _block(834) => 1024.
r-)rsr)r�rrzr{s    rDr9�TarInfo._blockRs*��#�5�)�4�����a�K�F��	�!�!rFc�(�UR[;$�z4Return True if the Tarinfo object is a regular file.)r��
REGULAR_TYPESr�s rDr��
TarInfo.isreg[s���y�y�M�)�)rFc�"�UR5$rs)r�r�s rD�isfile�TarInfo.isfile_s���z�z�|�rFc�(�UR[:H$)z!Return True if it is a directory.)r�r�r�s rDr��
TarInfo.isdirc����y�y�G�#�#rFc�(�UR[:H$)z%Return True if it is a symbolic link.)r��SYMTYPEr�s rDr��
TarInfo.issymgr{rFc�(�UR[:H$)z!Return True if it is a hard link.)r��LNKTYPEr�s rDr��
TarInfo.islnkkr{rFc�(�UR[:H$)z(Return True if it is a character device.)r�rr�s rD�ischr�
TarInfo.ischror{rFc�(�UR[:H$)z$Return True if it is a block device.)r�rr�s rD�isblk�
TarInfo.isblksr{rFc�(�UR[:H$)zReturn True if it is a FIFO.)r��FIFOTYPEr�s rD�isfifo�TarInfo.isfifows���y�y�H�$�$rFc��URSL$r�)r_r�s rD�issparse�TarInfo.issparse{s���{�{�$�&�&rFc�>�UR[[[4;$)zCReturn True if it is one of character device, block device or FIFO.)r�rrr�r�s rD�isdev�
TarInfo.isdev~s���y�y�W�g�x�8�8�8rF)r�r�r�r�r4r6r�r�r2r�r,r^r�r1r_r�r3r5r�)r�)7r�r�r�r�r��dict�	__slots__r�rZra�setterr/r0r�r�r�r�rr
r�r�r�r��classmethodr�r��staticmethodr�r	r�r�r*r.r-r5r1r2r4rOrNrPr:rLr9r�rwr�r�r�r�r�r�r�r�r�r�rFrDrrTs�����
�,�
�!�
�G�
�H�	
�
 �
�-�

�$�
�>�
�F�
��
��
�*�
� *�!
�"/�#
�$5�%
�&9�'
�*.�+
�,�-
�.�/
�0�1
�I�6�0����
�^�^� �� �����
�[�[���������_�_�!��!�O��%�e�e��u�E�����8�8*�H�EV�/�"I�M�8Q�t�M��M�
� �'��'�R�����*��*� �0-��0-�d�<��<�|�)��)�(/��,�6�8w�r3�(;�;� .�.D�"�*��$�$�$�$�$�%�'�9rFrc���\rSrSrSrSrSrSrSr\	r
\rSr
\r\rSrS:Sjr\SSS\4S	j5r\S;S
j5r\S<Sj5r\S<Sj5r\S=S
j5rSSSSS.rSrSrSrSrS>Sjr S?SS.Sjjr!S@SS.Sjjr"SASjr#Sr$SBSSS.Sjjr%SCSSS.S jjr&S!r'S"r(S#r)S$r*S%r+SDS&jr,S'r-S(r.S)r/S*r0S+r1S,r2S-r3S.r4S/r5S0r6SES1jr7S2r8SAS3jr9S4r:S5r;S6r<S7r=S8r>S9r?g)Fri�z=The TarFile Class provides an interface to tar archives.
    rFr-Nr�c�D�SSSSS.nX/;a[S5eX lX�UlU(d_URS:Xa2[RRU5(dSUlSUl[
XR5nS	UlOnUcB[US5(a1[UR[[45(aURn[US5(aURUlS
UlU(a[RRU5OS
Ul
X0lX�lUbX@lUbXPlUbX`lUbXplUbX�lX�lU
bUR [,:XaX�lO0UlUbX�lUbX�lX�lS	Ul/UlS	UlURR=5Ul0Ul URS:XaS
Ul!URE5Ul!URS:Xa_URRGUR>5 UR"RIU5nUR8RKU5 M^URS;a�S
UlUR.(amUR"RSUR.RU55nURRWU5 U=R>[YU5-
slg
g
g
![La) URRGUR>5 M�[Nan[Q[U55S
eS
nAff=f! UR(dURR[5 S
Ule=f)a�Open an (uncompressed) tar archive `name'. `mode' is either 'r' to
read from an existing archive, 'a' to append data to an existing
file or 'w' to create a new file overwriting an existing one. `mode'
defaults to 'r'.
If `fileobj' is given, it is used for reading or writing data. If it
can be determined, `mode' is overridden by `fileobj's mode.
`fileobj' is not closed, when TarFile is closed.
r7zr+b�wb�xb�r��ar�r`�!mode must be 'r', 'a', 'w' or 'x'r�r�FNr�r�Tr��r�r�r`).r<r��_moder�r/�exists�	bltn_openr�r�r�r�r�r^�abspathr��streamrbrb�dereference�ignore_zerosrBrCrr��debug�
errorlevel�copybufsizer��members�_loadedr	r,�inodes�firstmemberr>rr.rr�rrr�r�rur>r�)r�r�r�r�rbrbr�r�rBrCr�r�r�r�r��modesrrks                  rDr��TarFile.__init__�s�����T��=�����@�A�A��	��[��
���y�y�C�������t�(<�(<���	�!��
���j�j�1�G�$�D������&�!9�!9��7�<�<�#�u��6�6��|�|���w��'�'�$�\�\��
�#�D��-1�B�G�G�O�O�D�)�t��	������� �K���"�L��"�*���#� ,����$�M����"�t�{�{�j�'@�*��!�D�����J��!�(�O�'������������l�l�'�'�)������	��y�y�C��#'�� �#'�9�9�;�� ��y�y�C����L�L�%�%�d�k�k�2�:�"&�,�,�":�":�4�"@�����+�+�G�4�	��y�y�O�+�#����#�#��,�,�?�?��@P�@P�@U�@U�@W�X�C��L�L�&�&�s�+��K�K�3�s�8�+�K�$�,��
*�����)�)�$�+�+�6��&�:�'��A��/�T�9��:��	��#�#����"�"�$��D�K��s>� A"M*�6L�9BM*�/M'�M*�	M'�
M"�"M'�'M*�*5Nc�^�U(dU(d[S5eUS;azU4Sjn/n[TRUS9H;n[TTRU5n	UbUR	5n
U	"USU40UD6s $ S	RU5n[S
U35eSU;alURSS5up�U
=(d Sn
U=(d S
nUTR;a[TTRU5n	O[
SU-5eU	"XU40UD6$SU;aoURSS5up�U
=(d Sn
U=(d S
nU
S;a[S5eURSS5n[XX�UU5nT"XU40UD6nSUlU$US;aTR"XU40UD6$[S5e![
[4a8nURSUSU<35 UbURW
5 SnAGM�SnAff=f! UR5 e=f)a^Open a tar archive for reading, writing or appending. Return
an appropriate TarFile class.

mode:
'r' or 'r:*' open for reading with transparent compression
'r:'         open for reading exclusively uncompressed
'r:gz'       open for reading with gzip compression
'r:bz2'      open for reading with bzip2 compression
'r:xz'       open for reading with lzma compression
'a' or 'a:'  open for appending, creating the file if necessary
'w' or 'w:'  open for writing without compression
'w:gz'       open for writing with gzip compression
'w:bz2'      open for writing with bzip2 compression
'w:xz'       open for writing with lzma compression

'x' or 'x:'  create a tarfile exclusively without compression, raise
             an exception if the file is already created
'x:gz'       create a gzip compressed tarfile, raise an exception
             if the file is already created
'x:bz2'      create a bzip2 compressed tarfile, raise an exception
             if the file is already created
'x:xz'       create an lzma compressed tarfile, raise an exception
             if the file is already created

'r|*'        open a stream of tar blocks with transparent compression
'r|'         open an uncompressed stream of tar blocks for reading
'r|gz'       open a gzip compressed stream of tar blocks
'r|bz2'      open a bzip2 compressed stream of tar blocks
'r|xz'       open an lzma compressed stream of tar blocks
'w|'         open an uncompressed stream for writing
'w|gz'       open a gzip compressed stream for writing
'w|bz2'      open a bzip2 compressed stream for writing
'w|xz'       open an lzma compressed stream for writing
znothing to open)r��r:*c�(>�TRUS:H$)N�taropen)�	OPEN_METH)r�r�s �rD�not_compressed�$TarFile.open.<locals>.not_compressed:s����}�}�X�.�)�;�;rF)�keyNr�z	- method z: �
z'file could not be opened successfully:
�:r-r�r��|r�zmode must be 'r' or 'w'r��	Fr�zundiscernible mode)r<�sortedr�r�r	rr	rrrr��popr�r�r�r�)r�r�r�r�ry�kwargsr��
error_msgsr��func�	saved_posr�error_msgs_summary�filemoder�r�rs`                rDr�TarFile.opens%���J�G��.�/�/��<��
<��J�"�3�=�=�n�E���s�C�M�M�(�$;�<���&� '����I����c�7�=�f�=�=�F�"&���:�!6���F�GY�FZ�[�\�\�
�D�[�!%���C��!3��H���3�H��(�5�H��3�=�=�(��s�C�M�M�(�$;�<��&�'D�x�'O�P�P����:�6�:�:�
�D�[�!%���C��!3��H���3�H��(�5�H��z�)� �!:�;�;�"�J�J���:�M��T�X��*�,�F�
����9�&�9��"�A�M��H�
�_�
$��;�;�t�7�=�f�=�=��-�.�.��W"�#3�4���%�%�	�(��2�a�U�&C�D��*����Y�/���	��D
������s$�-
F'�/
G2�'G/�7,G*�*G/�2Hc�8�US;a[S5eU"XU40UD6$)zCOpen uncompressed tar archive name for reading or writing.
        r�r�)r<)r�r�r�r�r�s     rDr��TarFile.taropenps+���+�+��@�A�A��4�w�1�&�1�1rFc��US;a[S5eSSKJn U"XS-XC5nUR"XU40UD6nS
Ul	U$![a
 [	S5Sef=f![
anUbUS:Xa[
S	5UeeSnAff=f![
a(nUR5 US:Xa[
S	5UeeSnAf UR5 e=f)zXOpen gzip compressed tar archive name for reading or writing.
Appending is not allowed.
�r�r�r`�mode must be 'r', 'w' or 'x'r)�GzipFilezgzip module is not availableNr|r�r�F)
r<�gzipr�r�r	r�rr�r�r�)	r�r�r�r�r�r�r�rrs	         rD�gzopen�TarFile.gzopenxs���
��&��;�<�<�	M�%�	��t�C�Z��H�G�		����D��:�6�:�A���
����+�	M�"�#A�B��L�	M��
�	��"�t�s�{�� 1�2��9���	���	��M�M�O��s�{�� 1�2��9���	��M�M�O��s9�A�A�B�A�
B�(A>�>B�
C	�#B3�3C	c�Z�US;a[S5eSSKJn U"U=(d UX$S9nUR
"XU40UD6nS
Ul
U$![a
 [	S5Sef=f![[4a(nUR5 US:Xa[S	5UeeSnAf UR5 e=f)zYOpen bzip2 compressed tar archive name for reading or writing.
Appending is not allowed.
r�r�r)�BZ2Filer�N)r�r�znot a bzip2 fileF)r<r�r�r�r	r�r��EOFErrorr�rr�)	r�r�r�r�r�r�r�rrs	         rD�bz2open�TarFile.bz2open�s���
��&��;�<�<�	L�#��'�/�T�4�M��		����D��:�6�:�A���
����!�	L�"�#@�A�t�K�	L����"�	��M�M�O��s�{�� 2�3��:���	��M�M�O��s"�A�A!�A�!B*�1#B�B*c�V�US;a[S5eSSKJnJn U"U=(d UX$S9nUR"XU40UD6nS
Ul
U$![a
 [S5Sef=f!U[4a(n	UR5 US:Xa[S	5U	eeSn	A	f UR5 e=f)zXOpen lzma compressed tar archive name for reading or writing.
Appending is not allowed.
r�r�r)�LZMAFiler�r�N)�presetr�znot an lzma fileF)r<r�r�r�r�r	r�r�r�rr�)
r�r�r�r�r�r�r�r�rrs
          rD�xzopen�TarFile.xzopen�s���
��&��;�<�<�	M�0��7�?�d�D�@��		����D��:�6�:�A���
����!�	M�"�#A�B��L�	M���8�$�	��M�M�O��s�{�� 2�3��:���	��M�M�O��s"�A	�A#�	A �#B(�/#B�B(r�r�r�r�)r�r�r�r�c�2�UR(agSUlURS;a�URR[[
S--5 U=R[
S--
sl[UR[5upUS:�a)URR[[U-
-5 UR(dURR5 gg!UR(dURR5 ff=f)zYClose the TarFile. In write-mode, two finishing zero blocks are
appended to the archive.
NTr�r.r)r�r�r�rur?rr,rs�
RECORDSIZEr�r�)r�rzr{s   rDr��
TarFile.close�s����;�;�����	%��y�y�O�+����"�"�3�)�a�-�#8�9����	�A�
�.��%+�4�;�;�
�$C�!���q�=��L�L�&�&�s�j�9�.D�'E�F��#�#����"�"�$�$��4�#�#����"�"�$�$�s�B C(�(.Dc�h�URURS55nUc[SU-5eU$)z�Return a TarInfo object for member `name'. If `name' can not be
found in the archive, KeyError is raised. If a member occurs more
than once in the archive, its last occurrence is assumed to be the
most up-to-date version.
r�zfilename %r not found)�
_getmemberr#�KeyError)r�r�rbs   rD�	getmember�TarFile.getmember�s6���/�/�$�+�+�c�"2�3���?��2�T�9�:�:��rFc�|�UR5 UR(dUR5 UR$)z{Return the members of the archive as a list of TarInfo objects. The
list has the same order as the members in the archive.
)�_checkr��_loadr�r�s rD�
getmembers�TarFile.getmembers�s'��	
���
��|�|��J�J�L��|�|�rFc�`�UR5Vs/sHoRPM sn$s snf)zxReturn the members of the archive as a list of their names. It has
the same order as the list returned by getmembers().
)r�r�)r�rbs  rD�getnames�TarFile.getnamess'��-1�O�O�,=�>�,=����,=�>�>��>s�+c���URS5 UbURnUcUn[RR	U5upBUR[RS5nURS5nUR5nXl	Uc?UR(d[R"U5nO;[R"U5nO$[R"UR55nSnURn[R "U5(a�UR"UR$4n	UR(dGUR&S:�a7X�R(;a(X R(U	:wa[*n
UR(U	nO�[,n
U	S(aX R(U	'O�[R."U5(a[0n
O�[R2"U5(a[4n
O}[R6"U5(a[8n
[R:"U5nOE[R<"U5(a[>n
O#[R@"U5(a[Bn
OgX%lX�l"URFUl$URJUl&U
[,:XaURNUl(OSUl(URRUl*X�l+Xul,[Z(a)[ZR\"URH5SUl/[b(a)[bRd"URL5SUl3U
[>[B4;at[i[S5(a_[i[S5(aJ[Rj"URl5Ul7[Rp"URl5Ul9U$![`a N�f=f![`a N�f=f)	a�Create a TarInfo object from the result of os.stat or equivalent
on an existing file. The file is either named by `name', or
specified as a file object `fileobj' with a file descriptor. If
given, `arcname' specifies an alternative name for the file in the
archive, otherwise, the name is taken from the 'name' attribute of
'fileobj', or the 'name' argument. The name should be a text
string.
�awxNr�r�r-r�major�minor):r�r�r�r/�
splitdriver�r�r�rbr�r��lstat�stat�fstat�fileno�st_mode�S_ISREG�st_ino�st_dev�st_nlinkr�r�r��S_ISDIRr��S_ISFIFOr��S_ISLNKr}�readlink�S_ISCHRr�S_ISBLKrr��st_uidr3�st_gidr4�st_sizer1�st_mtimer2r�r��pwd�getpwuidr5r��grp�getgrgidr6r�r��st_rdevr�r�r�)r�r��arcnamer��drvrb�statresr��stmd�inoder�s           rD�
gettarinfo�TarFile.gettarinfos���	
���E�����<�<�D�
�?��G��w�w�)�)�'�2����/�/�"�&�&�#�.���.�.��%���,�,�.�����?��#�#��(�(�4�.���'�'�$�-���h�h�w�~�~�/�0�G��������<�<�����^�^�W�^�^�4�E��#�#��(8�(8�1�(<��[�[�(�W���E�8J�-J����;�;�u�-������8�)0�K�K��&��
�\�\�$�
�
��D�
�]�]�4�
 �
 ��D�
�\�\�$�
�
��D��{�{�4�(�H�
�\�\�$�
�
��D�
�\�\�$�
�
��D�������n�n����n�n����7�?�"�?�?�G�L��G�L��(�(��
���#���3�
� #���W�[�[� 9�!� <��
��3�
� #���W�[�[� 9�!� <��
��G�W�%�%��r�7�#�#���G�(<�(<�#%�8�8�G�O�O�#<�� �#%�8�8�G�O�O�#<�� �����
��
��
�
��
�s$�'(O	�(O�	
O�O�
O&�%O&)r�c�8�[[R[[R[
[R[[R[[R[[R0nUR5 UcUnUGHnU(Ga^URc[S5 OGUR!UR"S5n[[R$"XTR-55 [UR&=(d UR(<SUR*=(d UR,<35 UR/5(dUR15(a([SSUR2UR44--5 O[SUR6-5 UR8c[S5 O/[S	[:R<"UR85SS
-5 [UR>URA5(aSOS-5 U(aZURC5(a[SURD-5 URG5(a[S
URD-5 [I5 GM g)z�Print a table of contents to sys.stdout. If `verbose' is False, only
the names of the members are printed. If it is True, an `ls -l'-like
output is produced. `members' is optional and must be a subset of the
list returned by getmembers().
Nz
??????????rr�z%10sz%d,%dz%10dz????-??-?? ??:??:??z%d-%02d-%02d %02d:%02d:%02dr�r�z-> zlink to )%r�r��S_IFREGr}�S_IFLNKr��S_IFIFOr�S_IFCHRr��S_IFDIRr�S_IFBLKr�r�r�rr�r�r5r3r6r4r�r�r�r�r1r2r��	localtimer�r�r�r�r�r�)r��verboser��	type2moderb�modetypes      rDrY�TarFile.listos����d�l�l�G�T�\�\��t�|�|�W�d�l�l��d�l�l�G�T�\�\�C�	�	
���
��?��G��G���<�<�'���-�(�}�}�W�\�\�1�=�H���
�
�h���.E� F�G��w�}�}�'C����'C�'.�}�}�'C����'C�E�F��=�=�?�?�g�m�m�o�o���$��(8�(8�'�:J�:J�'K�K�!M�N� ����� 5�6��=�=�(�� 5�6�� =�"&�.�.����"?���"C�!D�E�
����w�}�}����B�G�H���=�=�?�?����(8�(8� 8�9��=�=�?�?��
�W�-=�-=� =�>��G�7rF��filterc��URS5 UcUnURbC[RR	U5UR:XaURSSU-5 gURSU5 UR
X5nUcURSSU-5 gUb!U"U5nUcURSSU-5 gUR5(a'[US5nURXV5 SSS5 gUR5(a�URU5 U(ar[[R"U55HNnUR[RRX5[RRX&5X4S	9 MP ggURU5 g!,(df   g=f)
a�Add the file `name' to the archive. `name' may be any type of file
(directory, fifo, symbolic link, etc.). If given, `arcname'
specifies an alternative name for the file in the archive.
Directories are added recursively by default. This can be avoided by
setting `recursive' to False. `filter' is a function
that expects a TarInfo object argument and returns the changed
TarInfo object, if it returns None the TarInfo object will be
excluded from the archive.
r�Nr.ztarfile: Skipped %rr-ztarfile: Unsupported type %r�tarfile: Excluded %rr7r)r�r�r�r/r��_dbgr	r�r��addfiler�r��listdir�addr)r�r�r�	recursiverrb�fs       rDr�TarFile.add�sk��	
���E���?��G��9�9� �R�W�W�_�_�T�%:�d�i�i�%G��I�I�a�.��5�6���	�	�!�T���/�/�$�0���?��I�I�a�7�$�>�?�����W�o�G����	�	�!�3�d�:�;���=�=�?�?��4��&�!����W�(�'�&��]�]�_�_��L�L��!����
�
�4� 0�1�A��H�H�R�W�W�\�\�$�2�B�G�G�L�L��4L�%��6�2��
�L�L��!�'�&�s�(F5�5
Gc��URS5 Uc0UR5(aURS:wa[S5e[R"U5nURURURUR5nURRU5 U=R[U5-
slURnUb�[X RURUS9 [UR[ 5upVUS:�a.URR["[ U-
-5 US-
nU=RU[ --
slUR$R'U5 g)aAdd the TarInfo object `tarinfo' to the archive. If `tarinfo' represents
a non zero-size regular file, the `fileobj' argument should be a binary file,
and tarinfo.size bytes are read from it and added to the archive.
You can create TarInfo objects directly, or by using gettarinfo().
r�Nrz3fileobj not provided for non zero-size regular file)ryr-)r�r�r1r<r�r�rbrBrCr�rur,r>r�rrrsrr?r�r)r�rbr�rkryrzr{s       rDr�TarFile.addfile�s��	
���E���?�w�}�}���7�<�<�1�3D��R�S�S��)�)�G�$���m�m�D�K�K�������D�������3�����s�3�x���� � ��������w�|�|�W�M� &�w�|�|�Y� ?��F��1�}����"�"�3�)�i�*?�#@�A��!����K�K�6�I�-�-�K������G�$rFc��UcPURnUcSSKnURS[SS9 [$[U[5(a[S5eU$[U5(aU$[U$![a [SU<S35Sef=f)Nrz�Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.r#r�zrString names are not supported for TarFile.extraction_filter. Use a function such as tarfile.data_filter directly.zfilter z
 not found)�extraction_filterr�r�r�rr�r��	TypeError�callable�_NAMED_FILTERSr�r<)r�rr�s   rD�_get_filter_function�TarFile._get_filter_function�s����>��+�+�F��~���
�
�J�'�1�	�6�
,�+��&�#�&�&��6�7�7��M��F����M�	G�!�&�)�)���	G��w�v�j�
�;�<�$�F�	G�s�'A0�0B)�
numeric_ownerrc�F�/nURU5nUcUnUHdnURXvU5nUcMUR5(aURU5 UR	X�UR5(+US9 Mf URSSS9 UH_n[RRXR5n	URX�US9 URX�5 URX�5 Ma g![an
URU
5 Sn
A
M�Sn
A
ff=f)a-Extract all members from the archive to the current working
directory and set owner, modification time and permissions on
directories afterwards. `path' specifies a different directory
to extract to. `members' is optional and must be a subset of the
list returned by getmembers(). If `numeric_owner` is True, only
the numbers for user/group names are used and not the names.

The `filter` function will be called on each member just
before extraction.
It can return a changed TarInfo or None to skip the member.
String names of common filters are accepted.
N��	set_attrsr+c��UR$r�r�)r�s rD�<lambda>�$TarFile.extractall.<locals>.<lambda>"	s��q�v�vrFT)r��reverse)r+)r)�_get_extract_tarinfor�r�_extract_one�sortr�r/rr��chown�utime�chmodr�_handle_nonfatal_error)r�r/r�r+r�directories�filter_functionr�rb�dirpathrs           rD�
extractall�TarFile.extractall	s
�����3�3�F�;���?��G��F��/�/���N�G�����}�}����"�"�7�+����g�7�=�=�?�7J�,9�
�
;��	���-�t��<�#�G��g�g�l�l�4���6�G�
/��
�
�7�=�
�I��
�
�7�,��
�
�7�,�#�� �
/��+�+�A�.�.��
/�s�2C:�:
D �D�D c�v�URU5nURXU5nUbURXrX45 gg)aDExtract 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 TarInfo object. You can
specify a different directory using `path'. File attributes (owner,
mtime, mode) are set unless `set_attrs' is False. If `numeric_owner`
is True, only the numbers for user/group names are used and not
the names.

The `filter` function will be called before extraction.
It can return a changed TarInfo or None to skip the member.
String names of common filters are accepted.
N)r)r3r4)r�r�r/r.r+rr;rbs        rD�extract�TarFile.extract.	sA���3�3�F�;���+�+�F�T�J�������g�Y�F�rFc��[U[5(aURU5nOUnUnU"XC5nUc URSSUR-5 gUR5(aD[R"U5n[RRX4R5UlU$![[4anURU5 SnAN�SnAf[anURU5 SnAN�SnAff=f)z@Get filtered TarInfo (or None) from member, which might be a strNr.r)r�r�r�r�r�_handle_fatal_errorrr9rr�r�r�r�r/rr�r�)r�r�r;r/rb�
unfilteredrs       rDr3�TarFile._get_extract_tarinfoA	s����f�c�"�"��n�n�V�,�G��G��
�	+�%�g�4�G�
�?��I�I�a�/�*�/�/�A�B���=�=�?�?��i�i��(�G�#%�7�7�<�<��6F�6F�#G�G� ������%�	(��$�$�Q�'�'���	+��'�'��*�*��	+�s#�B3�3D�C�
D�&C<�<Dc�0�URS5 URU[RR	X!R
5UUS9 g![anURU5 SnAgSnAf[anURU5 SnAgSnAff=f)z%Extract from filtered tarinfo to diskr�r-N)
r��_extract_memberr�r/rr�r�rCrr9)r�rbr/r.r+rs      rDr4�TarFile._extract_oneX	s~�����C��	+�� � ��"�'�'�,�,�t�\�\�*J�+4�/<�
!�
>���	(��$�$�Q�'�'���	+��'�'��*�*��	+�s#�9A
�
B�A-�-
B�:B�Bc�P�URS:�aeURSSU-5 g)z=Handle non-fatal error (ExtractError) according to errorlevelr-�tarfile: %sN)r�r�r�rs  rDr9�TarFile._handle_nonfatal_errore	s$���?�?�Q����I�I�a���*�+rFc�b�URS:�ae[U[5(a\URc UR	SSUR
-5 gUR	SSUR
<SUR<35 gUR	SS[
U5R<SU<35 g)z1Handle "fatal" error according to self.errorlevelrNr-rJz	tarfile: r)r�r�r��filenamer�strerrorr�r�rKs  rDrC�TarFile._handle_fatal_errorl	sw���?�?�Q���
��7�
#�
#��z�z�!��	�	�!�]�Q�Z�Z�7�8��	�	�!����Q�Z�Z�H�I��I�I�a�T�!�W�-=�-=�q�A�BrFc���URS5 [U[5(aURU5nOUnUR	5(dUR
[;aURX5$UR5(dUR5(aJ[UR[5(a[S5eURURU55$g)a(Extract a member from the archive as a file object. `member' may be
a filename or a TarInfo object. If `member' is a regular file or
a link, an io.BufferedReader object is returned. For all other
existing members, None is returned. If `member' does not appear
in the archive, KeyError is raised.
r�z'cannot extract (sym)link as file objectN)r�r�r�r�r�r�r8�
fileobjectr�r�r�r�r
�extractfile�_find_link_target)r�r�rbs   rDrS�TarFile.extractfilex	s���	
���C���f�c�"�"��n�n�V�,�G��G��=�=�?�?�g�l�l�/�A��?�?�4�1�1�
�]�]�_�_��
�
����$�,�,��0�0�"�"K�L�L��'�'��(>�(>�w�(G�H�H�rFc��URS5nURS[R5n[RRU5nU(a9[RR
U5(d[R"USS9 UR5(dUR5(a.URSUR<SUR<35 OURSUR5 UR5(aURX5 O�UR5(aUR!X5 O�UR#5(aUR%X5 O�UR'5(dUR)5(aUR+X5 OsUR5(dUR5(aUR-X5 O7UR.[0;aUR3X5 OURX5 U(aKUR5XU5 UR5(d#UR7X5 UR9X5 ggg)zIExtract the TarInfo object tarinfo to a physical
file called targetpath.
r�T)�exist_okr-z -> N)r#r�r�r�r/r�r��makedirsr�r�rr�r�r��makefiler��makedirr��makefifor�r��makedev�makelinkr�r8�makeunknownr6r8r7)r�rb�
targetpathr.r+�	upperdirss      rDrG�TarFile._extract_member�	s��� �&�&�s�+�
��'�'��R�V�V�4�
��G�G�O�O�J�/�	��R�W�W�^�^�I�6�6�
�K�K�	�D�1��=�=�?�?�g�m�m�o�o��I�I�a�w�|�|�W�5E�5E�F�G��I�I�a����&��=�=�?�?��M�M�'�.�
�]�]�_�_��L�L��-�
�^�^�
�
��M�M�'�.�
�]�]�_�_��
�
����L�L��-�
�]�]�_�_��
�
����M�M�'�.�
�\�\��
0����W�1��M�M�'�.���J�J�w�M�:��=�=�?�?��
�
�7�/��
�
�7�/�#�rFc���URc[R"U5 g[R"US5 g![a( [RRU5(degf=f)z,Make a directory called targetpath.
        Ni�)r�r��mkdir�FileExistsErrorr/r��r�rbr_s   rDrZ�TarFile.makedir�	sW��
	��|�|�#�����$�����U�+���	��7�7�=�=��,�,��-�	�s�#>�>�/A0�/A0c	���URnURUR5 URn[	US5nUR
bdUR
H(upgURU5 [
X5U[U5 M* URUR5 UR5 O[
X5UR[U5 SSS5 g!,(df   g=f)z'Make a file called targetpath.
        r�N)
r�rr^r�r�r_rrrr1�truncate)r�rbr_�sourcery�targetr,r1s        rDrY�TarFile.makefile�	s����������G�'�'�(��"�"��
�z�4�
(�F��~�~�)�$+�N�N�L�F��K�K��'����i��I�%3����G�L�L�)����!��F�G�L�L�)�W�M�)�
(�
(�s
�BC�
C%c�d�URX5 URSSUR-5 g)zFMake a file from a TarInfo object with an unknown type
at targetpath.
r-z9tarfile: Unknown file type %r, extracted as regular file.N)rYrr�res   rDr^�TarFile.makeunknown�	s1��	
�
�
�g�*��	�	�!�2�4;�L�L�A�	BrFc�p�[[S5(a[R"U5 g[S5e)z'Make a fifo called targetpath.
        �mkfifozfifo not supported by systemN)r�r�rorres   rDr[�TarFile.makefifo�	s)���2�x� � ��I�I�j�!��=�>�>rFc��[[S5(a[[S5(d[S5eURnUcSnUR	5(aU[
R-nOU[
R-n[R"X#[R"URUR55 g)z<Make a character or block device called targetpath.
        �mknodr\z'special devices not supported by systemNr�)r�r�rr�r�r�rrrrr\r�r�)r�rbr_r�s    rDr\�TarFile.makedev�	s����r�7�#�#�7�2�y�+A�+A��H�I�I��|�|���<��D��=�=�?�?��D�L�L� �D��D�L�L� �D�
�������G�,�,�g�.>�.>�?�	ArFc�b�UR5(a\[RRU5(a[R"U5 [R
"URU5 g[RRUR5(a"[R"URU5 gURURU5U5 g![a? URURU5U5 g![a
 [S5Sef=ff=f)z�Make a (symbolic) link called targetpath. If it cannot be created
(platform limitation), we try to make a copy of the referenced file
instead of a link.
z%unable to resolve link inside archiveN)r�r�r/�lexists�unlink�symlinkr�r�r��linkrGrT�symlink_exceptionr�rres   rDr]�TarFile.makelink

s���
	V��}�}����7�7�?�?�:�.�.��I�I�j�)��
�
�7�+�+�Z�8��7�7�>�>�'�"6�"6�7�7��G�G�G�0�0�*�=��(�(��)?�)?��)H�)3�5�� �	V�
V��$�$�T�%;�%;�G�%D�%/�1���
V�"�#J�K�QU�U�
V��		V�s+�A0C%�3AC%�!C%�%
D.�0!D�D*�*D.c��[[S5(Ga[R"5S:XGaURnURnU(d�[
(a4UR(a#[
R"UR5Sn[(a4UR(a#[R"UR5SnUcSnUcSnUR5(a-[[S5(a[R"X%U5 g[R"X%U5 ggg![a N�f=f![a N�f=f![[ 4an[#S5UeSnAff=f)z�Set owner of targetpath according to tarinfo. If numeric_owner
is True, use .gid/.uid instead of .gname/.uname. If numeric_owner
is False, fall back to .gid/.uid when the search based on name
fails.
�geteuidrr.NrH�lchownzcould not change owner)r�r�r|r4r3rr6�getgrnamr�r�r5�getpwnamr�r}r6r��
OverflowErrorr)r�rbr_r+�g�urs       rDr6�
TarFile.chown#
s%���2�y�!�!�b�j�j�l�a�&7����A����A� ���s�w�}�}��L�L����7��:����s�w�}�}��L�L����7��:���y����y���
D��=�=�?�?�w�r�8�'<�'<��I�I�j�Q�/��H�H�Z�A�.�/'8�!�� �����
 ������]�+�
D�"�#;�<�!�C��
D�sC�?D7�?E�AE�E�7
E�E�
E�E�E8�'E3�3E8c��URcg[R"X!R5 g![an[	S5UeSnAff=f)zASet file permissions of targetpath according to tarinfo.
        Nzcould not change mode)r�r�r8r�r)r�rbr_rs    rDr8�
TarFile.chmodE
sD���<�<���	?��H�H�Z���.���	?��6�7�Q�>��	?�s� 1�
A�A�Ac��URnUcg[[S5(dg[R"X#U45 g![an[S5UeSnAff=f)zBSet modification time of targetpath according to tarinfo.
        Nr7z"could not change modification time)r2r�r�r7r�r)r�rbr_r2rs     rDr7�
TarFile.utimeO
s[���
�
���=���r�7�#�#��	L��H�H�Z���0���	L��C�D�!�K��	L�s�A�
A�A�Ac��URS5 URbURnSUlU$URURR	5:wadURS:XagURRURS-
5 URR
S5(d[S5eSnURRU5nUb.UR0(dUR2R5U5 U$SUlU$![a[nUR(a@URSSURU4-5 U=R[-
slSnAM�SnAN�SnAf[a�nUR(aAURSSURU4-5 U=R[-
slSnAGMURS:Xa[[U55SeSnAGN%SnAf[ a  URS:Xa[S	5SeGNQ["a0nURS:Xa[[U55SeSnAGN�SnAf[$an[[U55SeSnAf[&aEnSSKn[+X4R,5(a[S
U35SeUe![.a Uef=fSnAff=f)z�Return the next member of the archive as a TarInfo object, when
TarFile is opened for reading. Return None if there is no more
available.
�raNrr-rpTr.z0x%X: %sz
empty filezzlib error: )r�r�r,r�r	rrtrrbr.r�r�rrrYr�r�r�r��	Exceptionr�r�r�r�r�r�rr�)r��mrbrr�s     rDr>�TarFile.next]
s]��
	
���D�����'�� � �A�#�D���H��;�;�$�,�,�+�+�-�-��{�{�a����L�L���d�k�k�A�o�.��<�<�$�$�Q�'�'�� 8�9�9����
��,�,�2�2�4�8��<
����;�;����#�#�G�,��� �D�L����M"�
��$�$��I�I�a��t�{�{�A�.>�!>�?��K�K�9�,�K��%��&�
6��$�$��I�I�a��t�{�{�A�.>�!>�?��K�K�9�,�K���[�[�A�%�#�C��F�+��5�&��#�
<��;�;�!�#�#�L�1�t�;�$�'�
6��;�;�!�#�#�C��F�+��5�$��(�
2���A��'�T�1���
���!�!�Z�Z�0�0�'�,�q�c�(:�;��E����"���G���
�sb�D�
K�$AE:�:
K�AH�%H�)K�0	K�9%I$�$
K�1J�
K�/K�
K�K�Kc���UR5nSnUbURU5nUSUnU(a[RRU5n[
U5HnnU(aURUR:XaSnM(U(a*[RRUR5nOURnX:XdMlUs $ U(a[U5eg![a SnN�f=f)zjFind an archive member by name from bottom to top.
If tarinfo is given, it is used as the starting point.
FNT)	r��indexr<r�r/�normpath�reversedr,r�)	r�r�rb�	normalizer��skippingr�r��member_names	         rDr��TarFile._getmember�
s���
�/�/�#������
*��
�
�g�.��"�&�5�/����7�7�#�#�D�)�D��w�'�F���>�>�V�]�]�2�$�H��� �g�g�.�.�v�{�{�;��$�k�k���"��
�(���W�%�%���1�
 � ��
 �s�C#�#C2�1C2c��UR(d-UR5bUR5bMSUlgg)zvRead through the entire archive file and look for readable
members. This should not run if the file is set to stream.
NT)r�r>r�r�s rDr��
TarFile._load�
s4���{�{��)�)�+�)���)�)�+�)��D�L�rFc���UR(a"[SURR-5eUb)URU;a[SUR-5egg)z[Check if TarFile is still open, and if the operation's mode
corresponds to TarFile's mode.
z%s is closedNzbad operation for mode %r)r�r�rcr�r�)r�r�s  rDr��TarFile._check�
sS���;�;��.�4�>�>�+B�+B�B�C�C����	�	�� 5��5��	�	�A�B�B�!6�rFc�0�UR5(aQSR[S[RRUR5UR455nSnOURnUnURX#SS9nUc[SU-5eU$)zGFind the target member of a symlink or hardlink member in the
archive.
r�NT)rbr�zlinkname %r not found)
r�rrr�r/r�r�r�r�r�)r�rbr��limitr�s     rDrT�TarFile._find_link_target�
s����=�=�?�?��x�x��t�b�g�g�o�o�g�l�l�.K�W�M]�M]�-^� _�`�H��E��'�'�H��E�����D��I���>��2�X�=�>�>��
rFc#�x# �UR(aURShv�N gSnURbUR5nUS-
nUv� U[	UR5:aURUnO2UR(d UR5nU(dSUlgOgUS-
nUv� MfN�7f)z$Provide an iterator object.
        Nrr-T)r�r�r�r>r>)r�r�rbs   rD�__iter__�TarFile.__iter__�
s�����<�<��|�|�#�#�������'��i�i�k�G��Q�J�E��M���s�4�<�<�(�(��,�,�u�-���\�\��)�)�+���#'�D�L�����Q�J�E��M��
$�s�!B:�B8�BB:c�T�XR::a[U[RS9 gg)z.Write debugging output to sys.stderr.
        ��fileN)r�r�r��stderr)r��level�msgs   rDr�TarFile._dbgs!���J�J���#�C�J�J�'�rFc�&�UR5 U$r�)r�r�s rD�	__enter__�TarFile.__enter__s�����
��rFc��UcUR5 gUR(dURR5 SUlgr:)r�r�r�r�)r�r�r��	tracebacks    rD�__exit__�TarFile.__exit__s2���<��J�J�L��#�#����"�"�$��D�KrF)r�r�r�r�r�r�r�rBr�rCr�r�rbr�r�r�r�r�r,r�r�rb)Nr�NNNNNNr�NNNNF)r�N)r�Nr�)r�NN)NNN�Tr:r�)�.N)r�T)TFr>)@r�r�r�r�r�r�r�r�r�rrbr
rBrCrrbr\rRr%r�r�r�rr�r�r�r�r�r�r�r�r�r	rYrrr)r=r@r3r4r9rCrSrGrZrYr^r[r\r]r6r8r7r>r�r�r�rTr�rr�r�r�r�rFrDrr�s����
�E��K��L��J��F��H�
�F��G��J���AE�HL�>B�6;�d�b��#�t�Z�]/��]/�~�2��2�����@����6����:����	�I�%�*	��?�a�F)�D�)�V1"��1"�f%�8G�0+/�%��+/�ZG���G�&�.+�,�
C��@>B�&+�*0�b
�N� B�?�A�$V�2 D�D?�L�>�F&&�P �C��&�>(��rFrc���[US5(a+UR5n[US9nURU5 O[U5nUR	5 g![
a gf=f)z�Return True if name points to a tar archive that we
are able to handle, else return False.

'name' should be a string, file, or file-like object.
rt)r�TF)r�r	rrr�r)r�r�rs   rDrr$s[��
��4�� � ��)�)�+�C��T�"�A��I�I�c�N��T�
�A�	���	�������s�AA�
A'�&A'c	���SSKnSnURUS9nURSSSSSS	9 URS
S[SS
9 UR	SS9nURSSSSS9 URSSSSSS9 URSSSSSS9 URSS SS!S9 UR5nUR(aURcURS"S#5 URb�URn[U5(ax[US$5nUR5 [UR5[RS%9 SSS5 UR (a[S&R#U55 ggURS"S'R#U55 gUR$bwUR$n[U5(a9[&RUS(5nUR%UR S)9 SSS5 gURS"S'R#U55 gURGb3[)UR5S":Xa URSn[*R,nOH[)UR5S*:XaURupXO URS"UR/55 [W5(a�[&RUS(5nUR1WURS+9 SSS5 UR (a5WS,:XaS-R#U5n	OS.R#XX5n	[U	5 ggURS"S'R#U55 gUR2b�UR2R5S5n
[*R6R9U
5up�S/S/S0S0S1S1S1S1S2.n
X�;aS3X�-OS4nUR2n[&RX�5nUHnUR;U5 M SSS5 UR (a[S5R#U
55 ggg!,(df   GN�=f!,(df   g=f!,(df   GNo=f!,(df   Nq=f)6Nrz3A simple command-line interface for tarfile module.)�descriptionz-vz	--verbose�
store_trueFzVerbose output)�action�default�helpz--filterz<filtername>zFilter for extraction)�metavar�choicesr�T)�requiredz-lz--list�	<tarfile>zShow listing of a tarfile)r�r�z-ez	--extract�+)r�z<output_dir>zExtract tarfile into target dir)�nargsr�r�z-cz--create)z<name>z<file>zCreate tarfile from sourcesz-tz--testzTest if a tarfile is validr-z&--filter is only valid for extraction
r�r�z{!r} is a tar archive.z{!r} is not a tar archive.
r�)rr.)r/rr�z{!r} file is extracted.z+{!r} file is extracted into {!r} directory.r�r�r�)r�z.tgzz.xzz.txzz.bz2z.tbzz.tbz2z.tb2zw:r�z{!r} file created.)�argparse�ArgumentParser�add_argumentr(�add_mutually_exclusive_group�
parse_argsrr@�exit�testrrr�r�r�r�rrbrYrr>r��curdir�format_helpr=�creater�r/�splitextr)r�r��parserrJ�argsrvr��tfr�r��tar_namer\�ext�compressions�tar_mode�	tar_files�	file_names                 rD�mainr�9s����G�K�
�
$�
$��
$�
=�F�
����k�,��-��/�
���
�N� .�4��6�
�/�/��/�>�E�	���t�X�{�7��9�	���t�[��<�=��?�
���t�Z�s�3�9��;�
���t�X�{�8��:�����D��{�{�t�|�|�+����A�@�A��y�y���i�i���c�?�?��c�3��3���� ��c�n�n�&�S�Z�Z�8� ��|�|��.�5�5�c�:�;��
�K�K��9�@�@��E�F�	
���	��i�i���c�?�?����c�5�)�R��������-�*�)�
�K�K��9�@�@��E�F�	
���	!��t�|�|���!��,�,�q�/�C��Y�Y�F�
����
�!�
#��,�,�K�C���K�K��6�-�-�/�0��c�?�?����c�5�)�R��
�
�6�$�+�+�
�>�*��|�|��S�=�3�:�:�3�?�C�2�39�6�#�3F���c�
�
�
�K�K��9�@�@��E�F�	
���	 ��;�;�?�?�1�%�����!�!�(�+�����������
��03�/B�4�,�+�+����K�K�	�
�\�\�(�
-��&�	����y�!�'�.��<�<��&�-�-�h�7�8��/
!�M ���*�)��*�)��>.�
-�s0�
7P4�Q�Q�#Q)�4
Q�
Q�
Q&�)
Q7�__main__r�)kr��version�
__author__�__credits__�builtinsrr�r�r�rHrqr�r�rir��rer�r�r�AttributeError�NotImplementedErrorr�ry�__all__r?rr�r�r�r�r�r�r�r r�r}rrr�r��CONTTYPEr�r�r!r�r�r3rrrrr8rtr$rhrMr�rWrir�r
�getfilesystemencodingrErLr\rdrnrrr�r�rrrr	r
rr�r�r�rYr�r�r��objectr�r*�BufferedReaderr\rrrrrrr�rrrr(r��compilerHrrrr�r�r�rFrD�<module>r�s���:���6�
�H��
'�
�	�	�
���
��	�����$�%8�'�B��*�����	�
��^�
��	��������
�
����
��
��
��
��
������������
��
������
�
�
�
����H�g��G�X��W�g�#�%5�!�	#���(��>�+�
��/�
�
�	�.�
�9��
�
�
����
���7�7�d�?��H��(�(�*�H�0�&�
�(�N�
�<*�"&��$��2�	�y�	�	�8�	�	��	�	�x�	�	�(�	�	�(�	�	�{�	�	�;�	�	�[�	�	��	�	�K�	���0r�r�j�6��<i�&�i�X"�2�$�$�"�	�(�	�J��J�
?�k�?�@�{�@�
L��L�
?�+�?�=�~���*�����	����:�:�&8�9��l9�f�l9�^[�f�[�B%�$�|�|��]9�~�z���F���I[��
�C�����
�C��s"�I�I�I�I�I"�!I"
© 2025 GrazzMean-Shell