403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.208
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/usr/lib/python3/dist-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/usr/lib/python3/dist-packages/mercurial/__pycache__/pathutil.cpython-313.pyc
�

6�h�2����%SSKJr SSKrSSKrSSKrSSKrSSKrSSKJrJ	r	J
r
Jr SSKJ
r
 SSKJrJrJrJrJr SSKJr \R."SS	S
S9r\R2"S5rSS
jr"SS5rSSSjjrSSjrSSjrSSjr "SS\RB5r"\#"\S5(a\RDr"\b\r"\RHr$\RJr%S\&S'g)�)�annotationsN)�Any�Callable�Iterator�Optional�)�_)�encoding�error�policy�pycompat�util)�misc�dirstate�DirsT)�pyo3�parsersc�J�[R"UR55$�N)r
�hfsignoreclean�lower)�ss �4/usr/lib/python3/dist-packages/mercurial/pathutil.py�_lowercleanrs���"�"�1�7�7�9�-�-�c��\rSrSrSrSSjrSS
Sjjr\SSSjj5rSSjr	\
RS5rS	r
S
rg)�pathauditor�#aensure that a filesystem path contains no banned components.
the following properties of a path are checked:

- ends with a directory separator
- under top-level .hg
- starts at the root of a windows drive
- contains ".."

More check are also done about the file system states:
- traverses a symlink (e.g. a/symlink_here/b)
- inside a nested repository (a callback can be used to approve
  some nested repositories, e.g., subrepositories)

The file system checks are only done when 'realfs' is set to True (the
default). They should be disable then we are auditing path for operation on
stored history.

If 'cached' is set to True, audited paths and sub-directories are cached.
Be careful to not keep the cache of unmanaged directories for long because
audited paths may be replaced with symlinks.
Nc�*�[5Ul[5UlXlX0lX@lX l[RRU5(a1[R"U5(d[RUl
gSUl
g)Nc��U$r�)�xs r�<lambda>�&pathauditor.__init__.<locals>.<lambda>Ds��ar)�set�audited�dict�
auditeddir�root�_realfs�_cached�callback�os�path�lexistsr�fscasesensitive�normcase)�selfr)r,�realfs�cacheds     r�__init__�pathauditor.__init__:s]���u����&����	����� �
�
�7�7�?�?�4� � ��)=�)=�d�)C�)C� �M�M�D�M�'�D�Mrc��[R"U5nXR;ag[R"U5(a"[R
"[
S5U-5e[R"U5n[RRU5S(d&[US5S;d[RU;a"[R
"[
S5U-5eSU;arUHlnSU;dMURSS5upVUR5(dM6UR!5S;dML[R
"[
S5U-5e S	[U5;a�UVs/sHn[U5PM nnS
HtnXGSS;dM
UR#U5n[RR$"USU6n	[R
"[
S5U[R&"U	54-5e UR((a�[+U5Hun
X�R,;aUR,U
nOJ[.R1UR2X�UR45nUR6(aX�R,U
'U(aMu O UR6(aURR9U5 ggs snf)zHCheck the relative path.
path may contain a pattern (e.g. foodir/**.txt)Ns$path ends in directory separator: %sr)�.hg�.hg.rs#path contains illegal component: %s�~r)sHGsHG8B6Cr8)r8r9�"path '%s' is inside nested repo %r)r�	localpathr&�endswithsepr�
InputErrorr	�	splitpathr-r.�
splitdriverr
�ospardir�split�isdigit�upper�index�join�bytestrr*�finddirs_rev_norootr(r�_checkfs_existsr)r,r+�add)r2r.�mode�parts�p�first�last�lparts�pos�base�prefix�ress            r�__call__�pathauditor.__call__FsG���~�~�d�#���<�<������D�!�!��"�"��9�:�T�A��
����t�$���G�G���t�$�Q�'��5��8�$�(>�>�� � �E�)��"�"��8�9�D�@��
��4�<����1�9�"#�'�'�$��"2�K�E��|�|�~�~�%�+�+�-�;M�*M�#�.�.��D�E��L���	��[��&�&�.3�4�e��k�!�n�e�F�4�$���q�r�
�?� �,�,�q�/�C��7�7�<�<��t���5�D��*�*��?�@���!1�!1�$�!7�8�9���	%��<�<�.�d�3���_�_�,��/�/�&�1�C�%�5�5��	�	�6�����C��|�|�25����/��s��4��<�<��L�L���T�"���95s�4Kc��[RRX5n[R"U5n[R
"UR5(aN[S5[R"U5[R"U54-n[R"U5e[R"UR5(a�[RRRUS55(aMU(a
U"U5(d9[S5n[R"Xb[R"U54-5eg![aknUR[R :XaSnAgUR[R [R"[R$4;aeSnAgSnAff=f)zwraise exception if a file system backed check fails.

Return a bool that indicates that the directory (or file) exists.s"path %r traverses symbolic link %rr8r;NFT)r-r.rF�lstat�stat�S_ISLNK�st_moder	r
rGr�Abort�S_ISDIR�isdir�OSError�errno�ENOENT�ENOTDIR�EINVAL)r)rSr.r,�curpath�st�msg�errs        rrI�pathauditor._checkfs_exists�sN���'�'�,�,�t�,��	N����'�"�B��|�|�B�J�J�'�'��=�>��$�$�T�*��$�$�V�,�B����k�k�#�&�&����b�j�j�)�)�b�g�g�m�m������W�f�-�/�/� �x��'8�'8��A�B�C��+�+�c�8�3C�3C�F�3K�,L�&L�M�M���)�	��y�y�E�L�L�(���y�y����u�}�}�e�l�l� K�K��L���)	�s�E�
G�)G�>G�Gc�V�U"U5 g![[R4a gf=f�NTF)r_rr\)r2r.s  r�check�pathauditor.check�s,��	���J�������%�	��	�s��(�(c#�F# �UR(aSv� gSUlSv� URR5 URR5 SUlg!URR5 URR5 SUlf=f7frj)r+r&�clearr(�r2s rr4�pathauditor.cached�so����<�<��
%�#�������"�"�$����%�%�'�$�������"�"�$����%�%�'�$���s�B!�A!�<B!�!=B�B!c�l�URR5 URR5 g)zLreset all audit cache

intended for debug and performance benchmark purposesN)r&rnr(ros r�clear_audit_cache�pathauditor.clear_audit_cache�s$��	
�����������r)r+r*r&r(r,r1r)rjr)r.�bytesrKz
Optional[Any]�return�None)rSrtr.rtr,z!Optional[Callable[[bytes], bool]])r.rtru�bool)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r5rU�staticmethodrIrk�
contextlib�contextmanagerr4rr�__static_attributes__r!rrrr#sl���,
(�<#�|�
7;�	 �� �� �4�	 �� �D����
%��
%� rrc��[R"U5(aUnOU[R-nUn[R
R
U5(d [R
RXU5n[R
RU5nUc[U5nXT:waBURU5(a,U[U5SnU"U5 [R"U5$XP:Xag/n[R"XP5nU(aSU(dgUR5 [R
R"U6nU"U5 [R"U5$[R "U5up�UR#U	5 X�:XaOUnM�Sn
X:waZ[%XX#5 [R&"XS5nUR)[R5(aUSSn[+S5U-n
[,R."[+S5X 4-U
S9e![a SnGN f=f![,R.a NKf=f)aPreturn the canonical path of myname, given cwd and root

>>> def check(root, cwd, myname):
...     a = pathauditor(root, realfs=False)
...     try:
...         return canonpath(root, cwd, myname, a)
...     except error.Abort:
...         return 'aborted'
>>> def unixonly(root, cwd, myname, expected='aborted'):
...     if pycompat.iswindows:
...         return expected
...     return check(root, cwd, myname)
>>> def winonly(root, cwd, myname, expected='aborted'):
...     if not pycompat.iswindows:
...         return expected
...     return check(root, cwd, myname)
>>> winonly(b'd:\\repo', b'c:\\dir', b'filename')
'aborted'
>>> winonly(b'c:\\repo', b'c:\\dir', b'filename')
'aborted'
>>> winonly(b'c:\\repo', b'c:\\', b'filename')
'aborted'
>>> winonly(b'c:\\repo', b'c:\\', b'repo\\filename',
...         b'filename')
'filename'
>>> winonly(b'c:\\repo', b'c:\\repo', b'filename', b'filename')
'filename'
>>> winonly(b'c:\\repo', b'c:\\repo\\subdir', b'filename',
...         b'subdir/filename')
'subdir/filename'
>>> unixonly(b'/repo', b'/dir', b'filename')
'aborted'
>>> unixonly(b'/repo', b'/', b'filename')
'aborted'
>>> unixonly(b'/repo', b'/', b'repo/filename', b'filename')
'filename'
>>> unixonly(b'/repo', b'/repo', b'filename', b'filename')
'filename'
>>> unixonly(b'/repo', b'/repo/subdir', b'filename', b'subdir/filename')
'subdir/filename'
NrF���sconsider using '--cwd %s's%s not under root '%s')�hint)rr=r
�ossepr-r.�isabsrF�normpathr�
startswith�len�pconvert�samefiler_�reverserB�append�	canonpath�pathto�endswithr	rr\)r)�cwd�myname�auditor�rootsep�name�relr�dirname�basenamer��relpaths            rr�r��s���^������������'���D�
�7�7�=�=�����w�w�|�|�D�t�,��
�7�7���D�!�D����d�#����4�?�?�7�3�3��C��L�N�#����
��}�}�T�"�"�	
������
��M�M�$�-��������
��w�w�|�|�S�)����
��}�}�T�*�*� $�
�
�4� 0��G��J�J�x� �����D�#�*��	��{��$�f�6��+�+�d��5���#�#�H�N�N�3�3�%�c�r�l�G��5�6��@���k�k�
�'�(�F�>�9��
�	
��;�
���
��4�{�{�	��	�s%�6H�AH0�H-�,H-�0I�Ic��[RRU5up[U5[[R
5:waU[R
-$U$)a�normalize the specified path as path prefix

Returned value can be used safely for "p.startswith(prefix)",
"p[len(prefix):]", and so on.

For efficiency, this expects "path" argument to be already
normalized by "os.path.normpath", "os.path.realpath", and so on.

See also issue3033 for detail about need of this function.

>>> normasprefix(b'/foo/bar').replace(pycompat.ossep, b'/')
'/foo/bar/'
>>> normasprefix(b'/').replace(pycompat.ossep, b'/')
'/'
)r-r.r@r�r
r�)r.�drMs   r�normasprefixr�.sC�� �7�7���d�#�D�A�
�1�v��X�^�^�$�$��h�n�n�$�$��rc#�# �URS5nUS:wa"USUv� URSSU5nUS:waM"Sv� g7f)N�/r�rr)�rfind�r.rQs  r�finddirsr�EsH���
�*�*�T�
�C�

��)��4�C�j���j�j��q�#�&����)��I�s
�8A�Ac#�# �UR[R5nUS:wa3USUv� UR[RUS-5nUS:waM2gg7f)Nr�r)�findr
r�r�s  rrHrHMsK���
�)�)�H�N�N�
#�C�

��)��4�C�j���i�i�����a��0����)�s�AA�Ac�F�\rSrSrSrS
SjrSSjrSSjrSrSSjr	Sr
g	)
�dirsiTz6a multiset of directory names from a set of file pathsc�*�0UlURn[U[5(a;U(a4UR	5HupEUR
S:wdMU"U5 M! gU(aSn[R"U5eUHnU"U5 M
 g)zC
a dict map indicates a dirstate while a list indicates a manifest
�rs3`only_tracked` is only supported with a dict sourceN)�_dirs�addpath�
isinstancer'�items�stater�ProgrammingError)r2�map�only_trackedr��frrfs       rr5�
dirs.__init__Wss����
��,�,���c�4� � �\��	�	�����7�7�d�?��A�J�$��H�C��(�(��-�-�����
�rc��URn[U5H>nURS5(a[SU-5eX2;aX#==S-
ss' gSX#'M@ g)Nr�z-found invalid consecutive slashes in path: %rr)r�r�r��
ValueError�r2r.r�rRs    rr��dirs.addpathhsY���z�z���T�N�D��}�}�T�"�"� �C�d�J����|��
�a��
���D�J�#rc�p�URn[U5HnX#S:�aX#==S-ss' gX#	M g)Nr)r�r�r�s    r�delpath�dirs.delpathts5���z�z���T�N�D��z�A�~��
�a��
���
�	#rc�,�[UR5$r)�iterr�ros r�__iter__�
dirs.__iter__|s���D�J�J��rc��XR;$r�r�)r2r�s  r�__contains__�dirs.__contains__s���J�J��rr�N)F)r.rtrurv)r�rtrurw)rxryrzr{r|r5r�r�r�r�r�r!rrr�r�Ts��@��"
�� �rr�zCallable[[bytes], bytes]r�)rrtrurtr)
r)rtr�rtr�rtr�zOptional[pathauditor]rurt)r.rtrurt)r.rtruzIterator[bytes])'�
__future__rr~r`r-�	posixpathrY�typingrrrr�i18nr	�r
rrr
r�
interfacesr�int_misc�
importrust�rustdirs�	importmodrrrr�r�r�rH�IDirsr��hasattrrFr��__annotations__r!rr�<module>r�s	��"���	��������)����Z��d�;��
�
�
�9�
%��.�] �] �H&*�	h
�
�h
�	�h
�
�h
�#�	h
�
�h
�V�.�1�,�8�>�>�,�^�7�F����<�<�D����D��~�~��$-�$5�$5��	!�5r

Youez - 2016 - github.com/yon3zu
LinuXploit