HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib64/python3.6/site-packages/zmq/ssh/__pycache__/forward.cpython-36.opt-1.pyc
3

VS�_�
�@s�dZddlmZddlZddlZyddlZWnek
rHddlZYnXejd�Z	Gdd�dej
�ZGdd�dej�Z
d	d
�Zd
gZdS)a
Sample script showing how to do local port forwarding over paramiko.

This script connects to the requested SSH server and sets up local port
forwarding (the openssh -L option) from a local port through a tunneled
connection to a destination reachable from the SSH server machine.
�)�print_functionNZsshc@seZdZdZdZdS)�
ForwardServerTN)�__name__�
__module__�__qualname__Zdaemon_threadsZallow_reuse_address�rr�/usr/lib64/python3.6/forward.pyr'src@seZdZdd�ZdS)�HandlercCsDy"|jjd|j|jf|jj��}Wn<tk
r^}z tjd|j|jt	|�f�dSd}~XnX|dkr�tjd|j|jf�dStjd|jj�|j�|j|jff�xzt
j
|j|ggg�\}}}|j|kr�|jjd�}t|�dkr�P|j
|�||kr�|jd�}t|�dk�rP|jj
|�q�W|j�|jj�tjd�dS)Nzdirect-tcpipz$Incoming request to %s:%d failed: %sz9Incoming request to %s:%d was rejected by the SSH server.z&Connected!  Tunnel open %r -> %r -> %rirzTunnel closed )�
ssh_transportZopen_channel�
chain_host�
chain_portZrequestZgetpeername�	Exception�logger�debug�repr�selectZrecv�len�send�close)�selfZchan�e�r�w�x�datarrr�handle.s<





zHandler.handleN)rrrrrrrrr	,sr	cs.G���fdd�dt�}td|f|�j�dS)NcseZdZ�Z�Z�ZdS)z!forward_tunnel.<locals>.SubHanderN)rrrrrr
r)�remote_host�remote_port�	transportrr�	SubHanderTsrz	127.0.0.1)r	rZ
serve_forever)Z
local_portrrrrr)rrrr�forward_tunnelPsr )�__doc__Z
__future__rZloggingrZsocketserver�ImportErrorZSocketServerZ	getLoggerrZThreadingTCPServerrZBaseRequestHandlerr	r �__all__rrrr�<module>s
$