Authentication using Curl command

Hi,

I am using linux curl command to login to the website. Website is using http protocol. My question is how to protect "username and password" while posting the data to the website to avoid man in the middle attack.

Is posting the sensitive data(password) using curl is secure?.
Is digest option in curl will be helpful. If yes, can anyone pls provide me with example how to use digest option along with cookie option in curl.

Thanks,

I expect, like the interactive versions, only on secure conection protocol sites: HTTPS, FTPS, SCP, SFTP

There is a digest example here, and the man page says digest is good, too: IT Service Desk Software | SolarWinds

Ok, if i am connecting to https site to post password using curl, will that secure?

Certainly! The ssh/ssl using protocols are all secure!

Hey sorry to ask this. I never worked with CURL before but now got to write the script for almost same thing only the additional thing i need to do after logging into the webpage i need to download the file, could you please give some examples for above.

Thanks in advance

Depends entirely upon the layout of the website and their insistence on cookies and/or javascript. Different choices in these can make using curl anything from simply easy to all-but-impossible.

We may not be so curl-enamored as to be curl-expert, but the man page points to a site with a discussion group docs, and many examples:

cURL - Tutorial