Solved

Could you explain this curl script?

Posted on 2014-03-29
4
648 Views
Last Modified: 2014-03-29
Hi

I have a curl script and it works
curl -i -X POST admin:admin@localhost/auth

What is "admin:admin"? How do I know the parameter name for this?
Shouldn't it be "username=admin&password=admin"?


Thanks
Jamie
0
Comment
Question by:jamie_lynn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 78

Accepted Solution

by:
arnold earned 500 total points
ID: 39964309
admin:admin is username:password when you use for services such as http, FTP you use username:password@www.somesite.com
-X POST tells the method in this case you will be passing data as part of your request.
-i is include HTTP headers.

Man curl in your favorite search engine
Or locally on the system or info curl

http://linux.die.net/man/1/curl
0
 

Author Comment

by:jamie_lynn
ID: 39964313
Oh I see.  it is using http basic authentication.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question