Solved

Could you explain this curl script?

Posted on 2014-03-29
4
573 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
4 Comments
 
LVL 76

Accepted Solution

by:
arnold earned 500 total points
Comment Utility
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
Comment Utility
Oh I see.  it is using http basic authentication.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This is an explanation of a simple data model to help parse a JSON feed
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now