403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/mercurial/__pycache__/posix.cpython-39.opt-1.pyc
a

�+�b5\�@sddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlmZddlmZmZddlmZmZmZmZe�d�ZejjZejjZejjZz
ejZWney�dd	�ZYn0ej Z ej!Z!ej"Z"ej#Z#d
Z$e�%d�Z%e�%e%�ej&�s,dmd
d�Z'neZ'dd�Z(dd�Z)dd�Z*dd�Z+dd�Z,dd�Z-dd�Z.dndd�Z/dd �Z0d!d"�Z1d#d$�Z2d%d&�Z3d'd(�Z4d)d*�Z5d+d,�Z6d-d.�Z7d/d0�Z8d1d2�Z9d3d4�Z:d5d6�Z;ej<j=Z>e;Z?ej@�r�d7d6�Z;ej<j=Z>d8d9�Z?ejAd:k�r>eBgd;�d<d=�ZCd>d6�Z;ej<jDZ>e;Z?d?d �Z0d@d"�Z1daEdAdB�ZFdCdD�ZGdEdF�ZHdGdH�ZIdIdJ�ZJdKdL�ZKe
jLe
jMhZNdMdN�ZOdOdP�ZPdodQdR�ZQdpdSdT�ZRdUdV�ZSdWdX�ZTdYdZ�ZUd[d\�ZVdqd]d^�ZWd_d`�ZXGdadb�dbeY�ZZdcdd�Z[dedf�Z\dgdh�Z]didj�Z^dkdl�Z_dS)r�)�absolute_importN�)�_)�getattr�open)�encoding�error�policy�pycompat�osutilcCsttjd||f��dS)Ns!hardlinks not supported: %s to %s)�OSError�errno�EINVAL)�src�dst�r�5/usr/lib64/python3.9/site-packages/mercurial/posix.py�oslink0s�rF�r���cCs(t|||d�}d|vr$|�dtj�|S)N)�mode�	buffering�ar)r�seek�os�SEEK_END)�namerr�fprrr�	posixfileAsrcCsR|�dd�}t|�dkr d|fS|d�d�}|r>||dfS|dd|dfS)a�Same as posixpath.split, but faster

    >>> import posixpath
    >>> for f in [b'/absolute/path/to/file',
    ...           b'relative/path/to/file',
    ...           b'file_alone',
    ...           b'path/to/directory/',
    ...           b'/multiple/path//separators',
    ...           b'/file_at_root',
    ...           b'///multiple_leading_separators_at_root',
    ...           b'']:
    ...     assert split(f) == posixpath.split(f), f
    �/r�r)�rsplit�len�rstrip)�pZhtZnhrrr�splitPsr%cCsdS)z@return true if it is safe to hold open file handles to hardlinksTrrrrr�
openhardlinksgsr&cCst�|�jS)z-return number of hardlinks for the given file)r�lstat�st_nlink�rrrr�nlinkslsr*cCs\|dd�}tjdkr0|ddkrX|dd�}n(|�d�rX|�d�rXd	|vrX|dd�}|S)
z<parses the output produced by patch and returns the filename�N�OpenVMSr�`rr�'� )r
�sysplatform�
startswith�endswith)Zoutput_lineZpfrrr�parsepatchoutputqs
r3cCsV|rd||fp|}d|dd�vr6t�td�|��t|�}|rRdt|�|f}|S)zBuild argument list for sshs%s@%s�-Nrs4illegal ssh hostname or username starting with -: %ss-p %s %s)rZAbortr�
shellquote)Zsshcmd�host�user�port�argsrrr�sshargs}s
�r:cCst�|�jd@dkS)z"check whether a file is executable�@r)rr'�st_mode)�frrr�isexec�sr>cCs�t�|�}|j}|r�t�|�s�t|d��}|��}Wd�n1sF0Yt|�zt�||�WnFt	y�t|d��}|�
|�Wd�n1s�0YYn0dSt�|��rt�|�}t|�t|d��}|�
|�Wd�n1s�0Ydt@}|d@}|j
dk�r�t|�t|�k�r�t|d��}|��}Wd�n1�s`0Yt|�t|d��}|�
|�Wd�n1�s�0Y|�r�|�s�t�|||d@d?t@B�n|�s�|�r�t�||d@�dS)Nsrbswb�r;ri$�)rr'r<�stat�S_ISLNKr�read�unlink�symlinkr�write�readlink�umaskr(�bool�chmod)r=�l�x�st�sr�dataZsxrrr�setflags�s<

&.
(
(* rPc
Cs�zt�|�jd@}WnLty`}z4|jtjkr2�|}|durDt}|dM}WYd}~n
d}~00|}|rt|tjO}t�	||�dS)z�Copy the file mode from the file at path src to dst.
    If src doesn't exist, we're using mode instead. If mode is None, we're
    using umask.�Nr?)
rr'r<rr
�ENOENTrHrA�S_IWUSRrJ)rrrZenforcewritabler<�instZnew_moderrr�copymode�s
rUc
Cs��zftjtjBtjB}tj�|d�}tj�|d�}tj�|d�}tj�|�s�z0t�|�tj�|�rpt	||�n
t	||�Wnt
tfy�Yn0tj�|��r�tj�|d�}tj�|d�}zt�|�j
}Wn4t�y}z|jtjkr�WYd}~n�d}~00||@dk�r�zt�|�j
}WnPt�yr}z6|jtjk�rD�t|d���t�|�j
}WYd}~n
d}~00||@dk�r�Wd	St|�t|�|}	n|}	d}tj|	d
d�\}
}z�t�|
�t�|�j
}||@dk�r<t�||d@|B�t�|�j
|@dk�r<|du�r"t�||�d}W|du�r6t|�Wd	SW|du�rft|�n|du�rdt|�0Wnt
tf�y�Yd
S0dS)z}
    Check whether the given path is on a filesystem with UNIX-like exec flags

    Requires a directory (like /foo/.hg)
    �.hg�wcachesstorescheckisexecschecknoexecNr�wTs
hg-checkexec-��dir�prefixrQF)rA�S_IXUSR�S_IXGRP�S_IXOTHr�path�join�exists�mkdirrU�IOErrorr�isdirr<r
rRr�closerDr
ZmkstemprJ�rename)r_Z	EXECFLAGSZbasedir�cachedirZstoredirZcheckisexecZchecknoexec�m�e�checkdirZfh�fnrrr�	checkexec�sp
"


�

�
rlc	
CsXtj�|dd�}tj�|d�}tj�|�r.dStj�|�r@|}n|}d}tjt�|�dd�}t�	|�}�z�d}|dur�tj
|dd�}tj�|j�}njd	}z tj�||�}t
|d
���WnDty�}z,|dtjkr�WYd}~WdS�WYd}~n
d}~00z�zjt�||�|du�r"t|�n.zt�||�Wnt�yNt|�Yn0WW|du�rf|��WdSt�y�}z>|jtjk�r�WYd}~W|du�r�|��Wq�WYd}~n
d}~00W|du�r�|��n|du�r�|��0Wqt�yYdSt�yP}z2|jtjk�r:tj�|��r:t|�WYd}~dSd}~00qdS)
z?check whether the given path is on a symlink-capable filesystemrVrWs	checklinkTNz
checklink-rYs
hg-checklink-schecklink-targetrXrF)rr_r`�islinkrd�tempfileZmktempr
�fsdecode�fsencodeZ
namedtempfile�basenamerrrercr
ZEACCESrErDrfrZEEXIST�AttributeErrorZEIOra)	r_rg�	checklinkrjr�fd�target�fullpathrTrrrrs$sp
�
�


�
�

�
rscCsdS)z�Check that the base-relative path is a valid filename on this platform.
    Returns None if the path is ok, or a UI string describing the problem.Nr�r_rrr�checkosfilenamelsrxcCsttddd��|�S)z�Get the filesystem mount point from a directory (best-effort)

    Returns None if we are unsure. Raises OSError on ENOENT, EPERM, etc.
    �getfsmountpointcSsdS�Nr�rLrrr�<lambda>wr z!getfsmountpoint.<locals>.<lambda>�rr��dirpathrrrryrsrycCsttddd��|�S)z�Get the filesystem type name from a directory (best-effort)

    Returns None if we are unsure. Raises OSError on ENOENT, EPERM, etc.
    �	getfstypecSsdSrzrr{rrrr|r zgetfstype.<locals>.<lambda>r}r~rrrr�zsr�cCst�t�d��S)N�)rZ
strtolocal�getpassrrrr�get_password�sr�cCsdSrzr)rtrrr�	setbinary�sr�cCs|Srzrrwrrr�pconvert�sr�cCs|Srzrrwrrr�	localpath�sr�cCstj�||�S)zwReturns whether path1 and path2 refer to the same file. This is only
    guaranteed to work for files, not directories.)rr_�samefile)�fpath1�fpath2rrrr��sr�cCs t�|�}t�|�}|j|jkS)zyReturns whether fpath1 and fpath2 are on the same device. This is only
    guaranteed to work for files, not directories.)rr'�st_dev)r�r�Zst1Zst2rrr�
samedevice�s

r�cCs|��Srz)�lowerrwrrr�normcase�sr�cCs,zt�|�WSty&t|�YS0dS)a�
        Normalize a filename for OS X-compatible comparison:
        - escape-encode invalid characters
        - decompose to NFD
        - lowercase
        - omit ignored characters [200c-200f, 202a-202e, 206a-206f,feff]

        >>> normcase(b'UPPER')
        'upper'
        >>> normcase(b'Caf\xc3\xa9')
        'cafe\xcc\x81'
        >>> normcase(b'\xc3\x89')
        'e\xcc\x81'
        >>> normcase(b'\xb8\xca\xc3\xca\xbe\xc8.JPG') # issue3918
        '%b8%ca%c3\xca\xbe%c8.jpg'
        N)rZ
asciilower�UnicodeDecodeError�normcasefallbackrwrrrr��scCs�z|�d�}Wn�ty�d}d}t|�}||kr�zt�||�}|t|�7}Wn2ty�dt|||d��}|d7}Yn0||7}q,|�d�}Yn0t�d|��	��
d�}t�|�S)Nzutf-8r rs%%%02XrZNFD)�decoder�r"rZgetutf8char�
ValueError�ord�unicodedata�	normalizer��encodeZhfsignoreclean)r_�urN�posrK�c�encrrrr��s"
r�scygwin)s/usr/bins/usr/libs	/cygdriveT)�reversecCs�t|�}|dks|dtjkr(t�|�StD]P}|�|�s<q,t|�}||krT|S||tjkr,|t�||d��Sq,t�|�S)Nr)r"r
�ossepr�upper�cygwinmountpointsr1)r_�pathlenZmpZmplenrrrr��s

cCsdS�NFrrwrrrrlscCsdSr�rrwrrrrsscCsJtjdkrd|Stdur&t�d�ja|r6t|�s6|Sd|�dd�SdS)Nr,s"%s"s[^a-zA-Z0-9._/+-]s'%s'r.s'\'')r
r0�_needsshellquote�re�compile�search�replace�rNrrrr5s
r5cCstj|dd�S)z7Parse a command string in POSIX shell way (best-effort)T)�posix)r
Z
shlexsplitr�rrr�
shellsplit"sr�c
CsVtjdkrdSzt�|d�WdStyP}z|jtjkWYd}~Sd}~00dS)z5return False if pid dead, True if running or not surer,TrN)r
r0r�killrr
ZESRCH)�pidrTrrr�testpid's
r�cCs|jt��kS)z;Return True if the stat object st is from the current user.)�st_uidr�getuid�rMrrr�isowner2sr�cCs�tjdkr|Sdd�}tj|vr(||�StjdkrD|tj�d|��Stj�dd��	tj
�D]&}|tj�||��}|durZ|SqZdS)	z�Find executable for command searching like which does.
    If command is a basename then PATH is searched for command.
    PATH isn't searched if command is an absolute or relative path.
    If command isn't found None is returned.r,cSs"tj�|�rt�|tj�r|SdSrz)rr_�isfile�access�X_OK)�
executablerrr�findexisting?szfindexe.<locals>.findexistingsplan9s/binsPATHr N)r
r0r�rr_r`r�environ�getr%Z	ospathsep)Zcommandr�r_r�rrr�findexe7s



r�cCsdSrzrrrrr�setsignalhandlerRsr�ccs|tj}tj}|D]f}z||�}||j�tvr0d}Wn<tyn}z$|jtjtj	fvrV�d}WYd}~n
d}~00|VqdS)zqStat each file in files. Yield each stat, or None if a file does not
    exist or has a type we don't care about.N)
rr'rA�S_IFMTr<�_wantedkindsrr
rR�ENOTDIR)�filesr'ZgetkindZnfrM�errrrr�	statfilesYsr�cCst�t���S)zreturn name of current user)r
rpr��getuserrrrrr�jsr�cCsF|durt��}zt�t�|�d�WSty@d|YS0dS)ziReturn the name of the user with the given uid.

    If uid is None, return the name of the current user.Nrs%d)rr�r
rp�pwd�getpwuid�KeyError)�uidrrr�usernameosr�cCsH|durt��}zt�t�|�d�WStyBt�|�YS0dS)zkReturn the name of the group with the given gid.

    If gid is None, return the name of the current group.Nr)r�getgidr
rp�grp�getgrgidr�Zbytestr)�gidrrr�	groupname|sr�cCs$t�|�}t�tjtt�|�j��S)zkReturn the list of members of the group with the given
    name, KeyError if the group does not exist.
    )r
roZrapplyrp�listr��getgrnam�gr_memr)rrr�groupmembers�s
r�cCs t�tjttdd�B|d|�S)NZP_DETACHr)r�spawnvp�P_NOWAITr)r9rrr�
spawndetached�sr�cCstjdd�S)Nr)�sys�argvrrrr�gethgcmd�sr�cCst�|�dSrz)rrb)r_Z
notindexedrrr�makedir�sr�cCsdSrzr)�keyrZscoperrr�	lookupreg�sr�cCsdS)z�Hide current shell window.

    Used to hide the window opened when starting asynchronous
    child process under Windows, unneeded on other systems.
    Nrrrrr�
hidewindow�sr�c@s2eZdZdd�Zdd�ZejZdd�Zdd�Zd	S)
�	cachestatcCst�|�|_dSrz)rrA)�selfr_rrr�__init__�szcachestat.__init__cCst|jj�Srz)rIrA�st_ino)r�rrr�	cacheable�szcachestat.cacheablecCs�z�|jj|jjko�|jj|jjko�|jj|jjko�|jj|jjko�|jj|jjko�|jj|jjko�|jj|jjko�|jtj|jtjko�|jtj	|jtj	kWSt
y�YdS0dSr�)rAr<r�r�r(r��st_gid�st_size�ST_MTIME�ST_CTIMErr�r��otherrrr�__eq__�s(��������zcachestat.__eq__cCs
||kSrzrr�rrr�__ne__�szcachestat.__ne__N)	�__name__�
__module__�__qualname__r�r��object�__hash__r�r�rrrrr��s
r�cCs|ot�|j�S)z(check whether a stat result is a symlink)rArBr<r�rrr�
statislink�sr�cCs|o|jd@dkS)z1check whether a stat result is an executable filer;r)r<r�rrr�
statisexec�sr�c
Cs�zbzt�|||�}Wq`Wqtjy\}z*|jdtjkrFWYd}~q�WYd}~qd}~00qWntyzt��Yn0ttt	t
|g����S)z�block until something happens on any file descriptor

    This is a generic helper that will check for any activity
    (read, write.  exception) and return the list of touched files.

    In unsupported cases, it will raise a NotImplementedErrorrN)�selectrr9r
ZEINTRr��NotImplementedError�sortedr��set�sum)Zfds�resrTrrr�poll�sr�cCs�t�|tj�}|tjO}t�|tj|�}zXg}z|��}|s@Wqf|�|�Wq.tybYqfYq.0q.d�|�Wt�|tj|�St�|tj|�0dS)z$Read all available data from a pipe.r N)	�fcntlZF_GETFLr�
O_NONBLOCKZF_SETFLrC�appendrcr`)�pipe�flagsZoldflags�chunksrNrrr�readpipe�s 

�r�c	Csptj�|�\}}d}zF|r2t�dtj�}t�|�|�|�|rJt�|�W|rlt�|�n|rjt�|�0dS)z1Bind the UNIX domain socket to the specified pathN�.)	rr_r%r�O_DIRECTORY�chdirZbind�fchdirre)Zsockr_�dirnamerqZbakwdfdrrr�bindunixsockets

�r�)rr)NF)N)N)NN)`Z
__future__rr
r�r�r�rr�r�r�rAr�rnr�Zi18nrr
rrr�rrr	Z	importmodrr_�normpath�samestat�abspath�linkrrrrGrDrf�
removedirsZexpandglobsrHZispy3rr%r&r*r3r:r>rPrUrlrsrxryr�r�r�r�r�r�r�r�Z
normcasespecsr�Znormcasespecr�Zisdarwinr0r�r�r�r�r5r�r�r�r�r��S_IFREG�S_IFLNKr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr�<module>s�




,
SH	�





	"

Youez - 2016 - github.com/yon3zu
LinuXploit