cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Working with curl connections as with sockets.

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 25 Apr 2008 13:12:35 -0700

On Fri, Apr 25, 2008 at 11:48:32PM +0400, Tetetest wrote:
> Dan, what do you mean by "raw socket mode"? Raw sockets could be used
> for manually constructing data packets of weird protocols like IGMP
> and the like, and eventually for nuke attacks on poor win98 machines.

In this context I mean sending unadulterated data directly over a stream
socket, as opposed to having data filtered by Telnet's escaping scheme
or corrupted by Telnet's option negotiation protocol.

> Besides, creating a raw socket in Linux requires root privileges; you
> can check a nearby Linux distribution to see that telnet client
> program has no SUID bit on it.
>
> Telnet uses TCP/IP without any special modifications (except one:
> Nagle's packet assembly algorithm is disabled to get better response
> time). This change is not visible to applications; there is nothing
> special about it.

That's not true--Telnet includes option negotation, escaping and virtual
terminal semantics. It uses a regular TCP/IP connection, but it's certainly
not compatible with POP3 or IMAP.

> POP3 and IMAP use telnet-style strings, and you can connect to
> mailserver with any telnet client. I tried Linux, Windows (several
> different pieces of telnet software), and Solaris - everything works
> just fine.

I'm not sure what you mean by a "telnet-style string". As I said before,
if you use a standard UNIX telnet client on a TCP port other than 23, it
reverts to a netcat-like "raw data" mode and no longer runs the Telnet
protocol. Try running a POP3 server on port 23 and you'll find that
your telnet client no longer works just fine.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-04-25