Thursday 27 July 2017

curl: 8 Command Line Examples

curl is a great addition to any scripter's arsenal and I tend to use it quite a lot - so I thought I would demonstrate some of its features in this post.

Post data (as parameters) to url

curl -d _username="admin" -d password="<password>"

Ensure curl follows redirects

curl -L

Limit download bandwidth (2 MB per second)

curl --limit-rate 2M -O

Perform basic authentication

curl -u username:password https://localhost/restrictedarea

Enabling debug mode

curl -v https://localhost/

Using a HTTP proxy

curl -x

Spoofing your user agent

curl -A "Spoofed User Agent"

Sending cookies along with a request

curl -b cookies.txt


Post a Comment