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?
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 a5xxerror code, then it doesn’t; if it replies with a234, 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.