HEX
Server: Apache
System: Linux vps.rockyroadprinting.net 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: rockyroadprintin (1011)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/share/lve/modlscapi/user/__pycache__/exec_command.cpython-36.pyc
3

��h~�@sDddlZddlZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�ZdS)�NcCs|ddkr|dkrdSdS)Nr�"��)�line�isquotfrr�-/usr/share/lve/modlscapi/user/exec_command.py�
first_quotsrcCs$|t|�ddkr |dkr dSdS)Nrrr)�len)rrrrr�	last_quot
sr
cCs�|jd�}d}d}g}x�tt|��D]p}||dkr$t|||�dkrTd}||}q$t|||�dkr�d}|d||7}|j|�q$|j||�q$Wt|�dS)N� r�r)�split�ranger	rr
�append�print)�commandZisquot�res�result�irrr�
parse_commands"

rcCs�g}yNtj|dtjtjd�}x2|jj�}|s.P|j�dkr|j|j�j��qWWn2tk
r�}zt	dt
|��WYdd}~XnX|S)NT)�shell�stdout�stderrrzCall process error: )�
subprocess�Popen�PIPEr�readline�stripr�decode�	Exceptionr�str)rr�p�output�instrrr�exec_command's
"r$cCs
tj|�S)z�
    Run command via os.system and return its exit status

    :param command: Command to execute in a subshell
    :return: Exit status of the command process
    )�os�system)rrrr�exec_command_out6sr'cCs&t|�}x|D]}||kr|SqWdS)Nr���)r$)rZ	substringrrrrr�exec_command_find_substring@s

r))r%rrr
rr$r'r)rrrr�<module>s