[Tutor] Re: Sending Break in Telnet

Derrick 'dman' Hudson dman@dman.ddts.net
Tue Jan 28 00:01:02 2003


--T4sUOijqQbZv57TR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jan 15, 2003 at 06:21:54PM -0800, Pankaj Mittal wrote:
| Hi
|=20
| I am developing a python program that connects to a server using telnet.
| When I use the unix telnet I have to send=20
| telnet <IPAddress> <PortNumber>. This has to be followed by sending a "^]"
| chartacter and then with "send break" on receiving a "telnet>" prompt.=20
| But when I try to send \035(equivalent of '^]', it does not work.

How does your python program make the connection?

Typing ^] is specific to the 'telnet' program.  That is merely a way
of indicating that you (the user at the keyboard) want the telnet
program itself to respond to you, rather than sending the keys on to
the remote machine.

| Also I tried to send '\377\363'(255 and 243 - code as in RFC
| document).

I'm not sure, but possibly that character sequence must occur in a
specific location in the telnet data stream.  I'm not familiar with
the intricacies of the telnet protocol and I don't have the RFCs
handy, nor the time at the moment to read through them.  However, I
suspect that if you reread the RFC and if you use a packet sniffer
like tcpdump or ethereal to compare the two sessions you'll find the
difference.  It is completely possible to match the (snipped) example
session using python code and not using the 'telnet' program.

HTH,
-D

--=20
Whoever gives heed to instruction prospers,
and blessed is he who trusts in the Lord.
        Proverbs 16:20
=20
http://dman.ddts.net/~dman/

--T4sUOijqQbZv57TR
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj42DmoACgkQO8l8XBKTpRSNRQCeLbnJh3yja4Sz6xCtVjl/pHJF
1DkAnRK6Ud2iBIs7tNSDC5r0gtkI3J28
=+826
-----END PGP SIGNATURE-----

--T4sUOijqQbZv57TR--