cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Prompting for password

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 3 May 2011 13:30:27 -0700

On Tue, May 03, 2011 at 02:33:27PM -0400, Jerome Covington wrote:
> I am interested in using cURL to check webmail via the command line, but want
> to make sure that it prompts me for the password so that I do not need to
> delete .bash_history after a terminal session.
>
> Are there accepted ways of doing this?

If the site uses HTTP authentication, then curl will prompt for a password
if you provide a user name with -u but no password. But if authentication is
done through an HTTP POST, then you'll have to write a script to read the
password from the terminal and pass it in with an appropriate -d option to
the curl command-line.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-03