Explore Implementing a simple FTP server under Linux

Source: Internet
Author: User
Tags ftp connection

A lot of information on the Internet, 90% of the code after the run, with the Linux FTP command login.

Later found that there is a project in the experimental building is an FTP server, then had to spend 400 of the ocean to buy a member, the result of its code run, the FTP command can not login, real TM PIT!!! MY 400 Oceans!!!!!

Helpless, can only explore some of their own!

First, the packet capture FTP connection process

Fortunately, I have a server with PROFTPD, so I'm going to grab a packet to parse the FTP related packet.

Open Wireshrk, open ftp://xxx.xxx.xxx.xxx, saw a huge number of packets ran out, screening analysis as follows:

Three-time handshake server:220 Successful connection!//browser by default anonymous login 530 login error//Anonymous login failed, start prompt user to login//user name Client:user ... server:331//password client:pass server:230 successfully logged in!//request system related information client:systserver:215//request system related information client:featserver:211-featuresserver:211 End// Set encoding format client:opts UTF8 onserver:200 UTF8 set to onclient:pwdserver:257/ftp directory Client:type iserver:200 TYPE set to Iclient:p Asvserver:227client:cwd/ftp directory server:250 CWD successful//display the current file list client:listserver:ftpdata//accept data in binary mode client : 150server:226
Second, using C language simulation to achieve a successful login process

  

Explore Implementing a simple FTP server under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.