Solved

FTP Client

Posted on 2004-04-19
5
809 Views
Last Modified: 2010-04-15
I am looking for sources/code for a simple FTP Client to connect, authenticate, and perform the 'ls' and 'cd' commands!
0
Comment
Question by:sporenza
5 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10865715
homework ?
0
 
LVL 11

Expert Comment

by:avizit
ID: 10865723
http://lftp.yar.ru/get.html

i doubt anyone is going to paste source code for a ftp client here  

/abhijit/
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10865923
sporenza,

Your question history does not indicate that you ask homework questions, however we have had exactly same question being asked by students. So please take time to clarify if this is homework question. This will allow us to provide help accordingly. For a homework assignment, you may need more tutorials and help rather than source code while for a professional project, a couple of good links that I have may suffice.

sunnycoder
0
 
LVL 24

Expert Comment

by:fridom
ID: 10866444
why should one want to write such a thing, if one can get prebuild libraries for that?
If it's about socket programming, well fine, then post your code

Friedrich
0
 
LVL 22

Accepted Solution

by:
grg99 earned 500 total points
ID: 10867774
Here's the basic idea:

Get the relevant RFC's for FTP.  

Connect to port 21
accept any lines beginning with "100" or "200" series codes
Open up a listening socket on a random port.
inform the server of that port number with the "PORT" commmand.
Send the "ls" command.
Read the data from the random port.
Handle any response codes on the port 21 connection.


Voila!

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now