| Server IP : 180.180.241.3 / Your IP : 216.73.216.35 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Program Files/MySQL/MySQL Workbench 6.3 CE/python/site-packages/paramiko/ |
Upload File : |
ó
rKXc @ s° d d l m Z d d l Z d d l m Z d d l Z d d l m Z m Z d d l m Z d d l
Z
d d l Z d d l m
Z
d d l m Z d e f d „ ƒ YZ d S(
iÿÿÿÿ( t datetimeN( t split( t Popent PIPE( t select( t ProxyCommandFailure( t ClosingContextManagert ProxyCommandc B s; e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s®
Wraps a subprocess running ProxyCommand-driven programs.
This class implements a the socket-like interface needed by the
`.Transport` and `.Packetizer` classes. Using this class instead of a
regular socket makes it possible to talk with a Popen'd command that will
proxy traffic between the client and a server hosted in another machine.
Instances of this class may be used as context managers.
c C sI t | ƒ | _ t | j d t d t d t ƒ| _ d | _ g | _ d S( s
Create a new CommandProxy instance. The instance created by this
class can be passed as an argument to the `.Transport` class.
:param str command_line:
the command that should be executed and used as the proxy.
t stdint stdoutt stderrN( t shlsplitt cmdR R t processt Nonet timeoutt buffer( t selft command_line( ( sT C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\paramiko\proxy.pyt __init__, s $ c C sU y | j j j | ƒ Wn1 t k
rJ } t d j | j ƒ | j ƒ ‚ n Xt | ƒ S( sº
Write the content received from the SSH client to the standard
input of the forked command.
:param str content: string to be sent to the forked command
t ( R
R t writet IOErrorR t joinR t strerrort len( R t contentt e( ( sT C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\paramiko\proxy.pyt send9 s
"c C sm yt j ƒ } xí t | j ƒ | k rþ d } | j d k rz t j ƒ | } | | j k rj t j ƒ ‚ n | j | } n t | j j g g g | ƒ \ } } } | r | d | j j k r t j
| j j j ƒ | t | j ƒ ƒ } | j j | ƒ q q Wd j
| j ƒ } g | _ | SWnG t j k
r8‚ n1 t k
rh}
t d j
| j ƒ |
j ƒ ‚ n Xd S( s¼
Read from the standard output of the forked program.
:param int size: how many chars should be read
:return: the length of the read content, as an `int`
i t R N( t timeR R R R t socketR R
R t ost readt filenot extendR R R R R ( R t sizet startt select_timeoutt elapsedt rt wt xt bt resultR ( ( sT C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\paramiko\proxy.pyt recvJ s, $% c C s t j | j j t j ƒ d S( N( R t killR
t pidt signalt SIGTERM( R ( ( sT C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\paramiko\proxy.pyt closem s c C s
| | _ d S( N( R ( R R ( ( sT C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\paramiko\proxy.pyt
settimeoutp s ( t __name__t
__module__t __doc__R R R- R2 R3 ( ( ( sT C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\paramiko\proxy.pyR ! s
# ( R R t shlexR R R0 t
subprocessR R R R R t paramiko.ssh_exceptionR t
paramiko.utilR R ( ( ( sT C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\paramiko\proxy.pyt <module> s