__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

��e���L�SSKrSSKrSSKJrJr SSKJr SSjrSSjrg)�N�)�EOF�TIMEOUT)�spawnc	��US:Xa[U4SXVUS.UD6n	O[U4USUXgS.UD6n	[U[5(a-UV
Vs/sHup�U
PM	 nn
nUV
Vs/sHup�UPM	 n
n
nOL[U[5(a3[UR	55n[UR55n
OSnSn
/nSnU	R
U5n[U	RU	R5(a)URU	RU	R-5 OURU	R5 [U
UU	R5(aU	RU
U5 O�[U
U[R5(d"[U
U[R5(agU
U"[55n[ R"R%5 [UU	R5(aU	RU5 O%U(aO%O['SR)UU
US95eUS	-nGM}U	R/5R1U5nU(aU	R35 UU	R44$U$s snn
fs snn
f![*a URU	R5 Mz[,a URU	R5 M�f=f)
a]

This function runs the given command; waits for it to finish; then
returns all output as a string. STDERR is included in output. If the full
path to the command is not given then the path is searched.

Note that lines are terminated by CR/LF (\r\n) combination even on
UNIX-like systems because this is the standard for pseudottys. If you set
'withexitstatus' to true, then run will return a tuple of (command_output,
exitstatus). If 'withexitstatus' is false then this returns just
command_output.

The run() function can often be used instead of creating a spawn instance.
For example, the following code uses spawn::

    from pexpect import *
    child = spawn('scp foo [email protected]:.')
    child.expect('(?i)password')
    child.sendline(mypassword)

The previous code can be replace with the following::

    from pexpect import *
    run('scp foo [email protected]:.', events={'(?i)password': mypassword})

**Examples**

Start the apache daemon on the local machine::

    from pexpect import *
    run("/usr/local/apache/bin/apachectl start")

Check in a file using SVN::

    from pexpect import *
    run("svn ci -m 'automatic commit' my_file.py")

Run a command and capture exit status::

    from pexpect import *
    (command_output, exitstatus) = run('ls -l /bin', withexitstatus=1)

The following will run SSH and execute 'ls -l' on the remote machine. The
password 'secret' will be sent if the '(?i)password' pattern is ever seen::

    run("ssh [email protected] 'ls -l'",
        events={'(?i)password':'secret\n'})

This will start mencoder to rip a video from DVD. This will also display
progress ticks every 5 seconds as it runs. For example::

    from pexpect import *
    def print_ticks(d):
        print d['event_count'],
    run("mencoder dvd://1 -o video.avi -oac copy -ovc copy",
        events={TIMEOUT:print_ticks}, timeout=5)

The 'events' argument should be either a dictionary or a tuple list that
contains patterns and responses. Whenever one of the patterns is seen
in the command output, run() will send the associated response string.
So, run() in the above example can be also written as::

    run("mencoder dvd://1 -o video.avi -oac copy -ovc copy",
        events=[(TIMEOUT,print_ticks)], timeout=5)

Use a tuple list for events if the command output requires a delicate
control over what pattern should be matched, since the tuple list is passed
to pexpect() as its pattern list, with the order of patterns preserved.

Note that you should put newlines in your string if Enter is necessary.

Like the example above, the responses may also contain a callback, either
a function or method.  It should accept a dictionary value as an argument.
The dictionary contains all the locals from the run() function, so you can
access the child spawn object or any other variable defined in run()
(event_count, child, and extra_args are the most useful). A callback may
return True to stop the current run process.  Otherwise run() continues
until the next event. A callback may also return a string which will be
sent to the child. 'extra_args' is not used by directly run(). It provides
a way to pass data to a callback function through run() through the locals
dictionary passed to a callback.

Like :class:`spawn`, passing *encoding* will make it work with unicode
instead of bytes. You can pass *codec_errors* to control how errors in
encoding and decoding are handled.
���i�)�maxread�logfile�cwd�env)�timeoutr	r
rrNrzSparameter `event' at index {index} must be a string, method, or function: {value!r})�index�valuer)r�
isinstance�list�dict�keys�values�expect�after�allowed_string_types�append�before�send�types�FunctionType�
MethodType�locals�sys�stdout�flush�	TypeError�formatrr�string_type�join�close�
exitstatus)�commandr
�withexitstatus�events�
extra_argsr
rr�kwargs�child�x�y�patterns�	responses�child_result_list�event_countr�callback_result�child_results                   �-/usr/lib/python3/dist-packages/pexpect/run.py�runr7s���p�"�}��g�"�t�W�3�"� �"���g�,�w��g��,�$*�,���&�$��� &�'����1���'�"(�)�&�3�1�Q�&�	�)�	�	�F�D�	!�	!�����
�&�������)�	����	����K�
�	��L�L��*�E��%�+�+�u�'A�'A�B�B�!�(�(�������)C�D�"�(�(����6��)�E�*�E�,F�,F�G�G��
�
�9�U�+�,��Y�u�-�u�/A�/A�B�B��Y�u�-�u�/?�/?�@�@�"+�E�"2�6�8�"<���
�
� � �"��o�u�/I�/I�J�J��J�J��/�$��%� �!K�!'��e�9�U�;K��!L�N�N�&��/�K�/�<�$�$�&�+�+�,=�>�L��
���
��e�.�.�/�/����](��)��D�	��$�$�U�\�\�2���	��$�$�U�\�\�2��	�s+�I?�J�=EJ�"J�%K�3$K�Kc�H�URSS5 [U4XX4XVUS.UD6$)z0Deprecated: pass encoding to run() instead.
    �encodingzutf-8)r
r)r*r+r
rr)�
setdefaultr7)	r(r
r)r*r+r
rrr,s	         r6�runur;�s:�����j�'�*��w�#���g��#�!�#�#�)�FNNNNN)	rr�
exceptionsrr�	pty_spawnrr7r;�r<r6�<module>rAs,��
��$��:>�59�M�^<@�59�#r<

Filemanager

Name Type Size Permission Actions
ANSI.cpython-313.pyc File 18.51 KB 0644
FSM.cpython-313.pyc File 14.93 KB 0644
__init__.cpython-313.pyc File 4.15 KB 0644
_async.cpython-313.pyc File 911 B 0644
_async_pre_await.cpython-313.pyc File 6.44 KB 0644
_async_w_await.cpython-313.pyc File 6.54 KB 0644
exceptions.cpython-313.pyc File 2.24 KB 0644
expect.cpython-313.pyc File 15.73 KB 0644
fdpexpect.cpython-313.pyc File 7.2 KB 0644
popen_spawn.cpython-313.pyc File 8.3 KB 0644
pty_spawn.cpython-313.pyc File 39.65 KB 0644
pxssh.cpython-313.pyc File 20.63 KB 0644
replwrap.cpython-313.pyc File 6.74 KB 0644
run.cpython-313.pyc File 6.83 KB 0644
screen.cpython-313.pyc File 19.42 KB 0644
socket_pexpect.cpython-313.pyc File 6.59 KB 0644
spawnbase.cpython-313.pyc File 22.52 KB 0644
utils.cpython-313.pyc File 5.9 KB 0644
Filemanager