K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / lib / python2.7 / dist-packages / twisted / tap /
server ip : 172.67.156.115

your ip : 108.162.241.149

H O M E


Filename/usr/lib/python2.7/dist-packages/twisted/tap/portforward.py
Size795
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 09:56
Last modified18-Oct-2011 18:31
Last accessed07-Jul-2025 00:23
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image

# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

"""
Support module for making a port forwarder with twistd.
"""
from twisted.protocols import portforward
from twisted.python import usage
from twisted.application import strports

class Options(usage.Options):
synopsis = "[options]"
longdesc = 'Port Forwarder.'
optParameters = [
["port", "p", "6666","Set the port number."],
["host", "h", "localhost","Set the host."],
["dest_port", "d", 6665,"Set the destination port."],
]

compData = usage.Completions(
optActions={"host": usage.CompleteHostnames()}
)

def makeService(config):
f = portforward.ProxyFactory(config['host'], int(config['dest_port']))
return strports.service(config['port'], f)