Sending Through ^] Through telnetlib

J

John Abel

I have written a script that makes a telnet connection, runs various
commands, and returns the output. That was the easy bit :) However, to
close the session, I need to send ^] followed by quit. I've tried
sending chr(29), which is the ascii equivalent, but that doesn't seem to
work. Is there something I'm missing?

Any pointers would be much appreciated.

Thanks

J
 
R

Richard Brodie

I have written a script that makes a telnet connection, runs various
commands, and returns the output. That was the easy bit :) However, to
close the session, I need to send ^] followed by quit.

Are you sure that just calling close() isn't what you want?
It would be unusual to send ^]quit on the wire.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,176
Messages
2,570,949
Members
47,500
Latest member
ArianneJsb

Latest Threads

Top