TCP Portforwarding, with chat

Discussion in 'Python' started by Neil Padgen, Jun 30, 2003.

  1. Neil Padgen

    Neil Padgen Guest

    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
    afterwards can.

    I've written a basic version using sockets, but the telnet gateway
    sends various telnet protocol characters which confuses the end
    application.

    I've tried to use twisted.protocols.portforward but can't work out how
    to go about this.

    All help greatly appreciated!

    -- Neil
    Neil Padgen, Jun 30, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. OJO

    chat within asp.net?

    OJO, Jul 8, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    418
    Steve C. Orr, MCSD
    Jul 8, 2003
  2. Replies:
    0
    Views:
    2,194
  3. Tiger
    Replies:
    5
    Views:
    970
    Dave Thompson
    May 1, 2006
  4. islamelnaggar
    Replies:
    4
    Views:
    1,510
    islamelnaggar
    Jan 14, 2008
  5. phider1

    TCP-based chat program

    phider1, Aug 27, 2008, in forum: C Programming
    Replies:
    2
    Views:
    474
    phider1
    Aug 27, 2008
Loading...

Share This Page