cURL / Mailing Lists / curl-users / Single Mail

curl-users

a poor telnet example -- but you don't have to enter the password

From: Dan Leonard <dleonard_at_ipa.cfa.harvard.edu>
Date: Thu, 15 May 2003 09:39:36 -0400

Hi,

I was trying to use the curl library for telnet where I don't have to
enter the password at a terminal; I do this because I want it to talk to
a router via an UI. I figured out a way, using "telnet://localhost", and
a write callback function. The biggest problem is that I have to
assume the socket connection back to the the telnetd daemon is "3", i.e.
0,1,2, are stdin, stderr, stdout. This is a pretty good assumption, at
least for a very short program.

I see in 7.10 there might be ways of using "multi" to get file
desciptors, and to exit gracefully. This is a little new, as the system
I am working on is redhat 7.2 or 7.3, which has 7.9 curl naturally
installed. I guess I could install 7.10. Ayway, here is the poor
example is attached.

Dan

Dan Leonard
(617) 496-7075
dleonard_at_ipa.harvard.edu
IT Specialist (Applications Software)
Mail: SAO MS33/34, 60 Garden St
Cambridge, MA 02138

-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

  • application/octet-stream attachment: telnet.c
Received on 2003-05-15