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. Advertisements

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:
    607
    Steve C. Orr, MCSD
    Jul 8, 2003
  2. Quentin

    chat about asp.net

    Quentin, Aug 2, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    432
    Quentin
    Aug 2, 2003
  3. Luiz Alberto Gibson da Costa

    web chat development, http header connection: keep-alive

    Luiz Alberto Gibson da Costa, Aug 6, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    773
    Luiz Alberto Gibson da Costa
    Aug 6, 2003
  4. imagina
    Replies:
    0
    Views:
    940
    imagina
    Aug 16, 2003
  5. Replies:
    0
    Views:
    2,402
  6. Tiger
    Replies:
    5
    Views:
    1,225
    Dave Thompson
    May 1, 2006
  7. islamelnaggar
    Replies:
    4
    Views:
    1,754
    islamelnaggar
    Jan 14, 2008
  8. phider1

    TCP-based chat program

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