C++/Win32 The basics of FTP security and using SSL

喜你入骨 提交于 2021-01-28 08:05:16

问题


My application downloads files from an FTP server.

Using a packet sniffer I can see the user name and password easily, I would like to have this avoided.

I can't make an FTP account with limited privileges ATM.

How do I know if the server supports SSL? (Apache 2.x.x)

Any other way to hide user : pass of FTP account?


回答1:


If you want to see if a FTP server supports FTPS in explicit mode (RFC 2228, RFC 4217), then send an AUTH TLS. If it replies with a 5xx error code, then it doesn't; if it replies with a 234, then it does and your client should react appropriately (which, for a RFC 4217 compliant server, means doing a standard TLS handshake).

Unfortunately the WinInet API doesn't let you do this, so you might want to look at libcurl, which supports FTPS out of the box.



来源:https://stackoverflow.com/questions/12019819/c-win32-the-basics-of-ftp-security-and-using-ssl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!