PDA

View Full Version : How to get replies from ftp/ssh/telnet/smtp server using UDP.


javaman99
10-24-2002, 02:41 AM
I'm developing a small program for homework which will connect to 5 popular services on a specified machine and will see if they are active across UDP.

Currently I only have daytime implemented so I'll use it as an example.

Essentially a datagram socket sends any data to the server, on the port associated with daytime. I then recv from the specified server into a buffer and I essentially end up with the daytime stored in there.

However testing this method for the other protocols (listed in the threat topic) seems to be difficult because I'm not sure if any of those servers even operate across UDP.

If they do how would I go about seeing if they are active or not. I think I would need to send something other then a random packet, some sort of control command in order to get a response from the server.

Any help is appreciated.

Twon
10-27-2002, 01:48 PM
For what it's worth, I've never heard of any of ftp,ssh,telnet,smtp operating over UDP. Because of what they do, they need a reliable transport layer, which UDP isn't by definition. I think you'd be wasting your time checking for it.

stuka
10-28-2002, 07:21 PM
For this I think you'd need some basic protocol info from the RFCs. I know, for example, that if you telnet to port 110 on an SMTP server, and send it the command 'user <name>' you SHOULD get an 'OK' response.