TCP Portforwarding, with chat
I'm trying to forward a TCP port on localhost to a TCP port on a
remote machine, but to do that I have to go through a telnet gateway.
This involves a little chat script:
expect "tn-gw-> "
send "c %s %s\n" % (remotehost, remoteport)
expect "Connected to %s." % (remotehost)
Next line might begin with \r\n - if so this needs stripping out.
No output before this can be displayed to the user, but everything
I've written a basic version using sockets, but the telnet gateway
sends various telnet protocol characters which confuses the end
I've tried to use twisted.protocols.portforward but can't work out how
to go about this.
All help greatly appreciated!
|All times are GMT. The time now is 02:25 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.