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