curl-users
RE: user and password
Date: Fri, 15 Feb 2013 14:45:07 +0000
Anders Wollentz wrote:
>I am using curl at cli and wants to keep user names and passwords secret in Curl command lines.
>curl -X POST -k -H "Username:yyy" -H "Password:xxx" https://vplexcliipadress/vplex/help
>The simplest solution seems to be using -K -config config-.file
>But I cannot get the config file contents correct, is there anyone that can help me with this?
>curl -X POST -k -H "Username:service" -H "Password:Mi@Dim7T" https://10.221.228.26/vplex/help
1) Using the expanded option names just to clarify things, your command would read:
curl --request POST --insecure --config-file myconfigfile https//...
with your options stored in file "myconfigfile"
2) I've created a config file with (Unix) commands like this:
print -- "--disable-epsv\n-u $LOGIN:$PASSWD" > /tmp/curlopt.$$
(If you're using Windows you'll need to the equivalent commands for that OS. )
As described in the cURL man page, you need to have each option on a separate line in the file. So you might do something like this:
print -- "-H Username:service \n -H Password:Mi_at_Dim7T" > myconfigfile
curl -X POST -k -K myconfigfile https://10.221.228.26/vplex/help
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
-------------------------------------------------------------------
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 2013-02-15