Skip to main content
GameDev.net gamedev.net
🔒 Locked

developing FTP client

Started by Cubex Jan 12, 2006 at 6:34 PM 5 replies 1k views
Original Post
Cubex
Cubex
Any good references to developing an FTP client? Just following the RFC atm. Need it builtin to an application. Already have some great winsock code builtin. Will support PASV and PORT. Thanks CubeX [Edited by - Cubex on January 13, 2006 5:14:23 PM]
hplus0603
hplus0603
There are a number of open source ftp clients; you can just get them and read their code. The Linux command-line ftp client would be a start; being command line might make it somewhat simpler in structure.

I don't quite understand why you want an FTP client, though, as FTP is fairly insecure, both from a cleartext password perspective, and from a port spoofing perspective. If you need to upload data over the web, I'd try to support HTTP POST with the option of running over HTTPS instead.
enum Bool { True, False, FileNotFound };
markr
markr
As you'll probably realise, FTP is a really crappy protocol.

It's crappy because it uses two sockets at once. Their data are related, but they are separate sockets. This leads to all sorts of problems with firewalls. It also historically caused security problems (i.e. "bounce" attacks).

If it's some part of another program, I recommend using another protocol. Hey, even TFTP doesn't have that problem (although it has its own problems, i.e. using UDP in a simplistic way makes for terrible performance).

Mark
BertS
BertS
I've programmed an FTP server in java and I found this site helpful. The RFC (959) is quite old and that site gives you some pointers on what you should ignore or add.
Cubex
Cubex
This FTP Client is to be used over a secure Cisco VPN connection.

Already support HTTP POST, this project requires FTP Client as customer is using
FTP Server.

Thanks
Cubex
Michalson
Michalson
Your biggest problem will probably be the poor UNIX era RPC of the text based "protocol". Specifically if you plan any kind of GUI interface, you'll need to write a parser that attempts to figure out what format directory listings are sent in and parse them. If the client only has to work with one FTP server this won't be a problem. If it's a general purpose client, you'll have lots of fun figuring out why it doesn't work with FTP Server XYZ.
Cubex
Cubex
Thanks for the headsup Michalson

Thanks all
CubeX

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.