shell bypass 403
3
]ûf� � @ s d dl Z dgZddd�ZdS )� N�runProgc
C s� |d krg }| g| }d }|r@t |d��}|j� j� }W d Q R X ddi}y tj|tjtjtjd|d�}W n tk
r| d
S X |j|�\}} |j dd �}|j
|fS )N�rZLANG�CT)�stdin�stderr�stdoutZ close_fds�env� � zutf-8�replace)r r
)�open�read�encode�
subprocess�Popen�PIPEZSTDOUT�OSErrorZcommunicate�decode�
returncode)
�prog�argvr �argsZinput_stringZhandler Zprocess�outputZ
err_output� r �/usr/lib/python3.6/prog.pyr s$
)NN)r �__all__r r r r r �<module> s