cURL: a quick intro

03:08 PM by Christian Koch

Filed under Commands

Last modified Monday October 19th, 2009

Here you can find a short practical intro to cURL.


Show website.

Sending post
curl -d “name1=value1&name2=value2”

Save output in a file
curl -o out.txt

Spoof the Referer
curl -e

Spoof  User Agent
curl -A ‘SuperGC Microsoft 7.5’

Spoof Cookies
curl -b =”name=value”

Catch and use Cookies
curl –dump-header header
curl -b header

curl -c cookies.txt
curl -b cookies.txt -c cookies.txt

cURL Timing
Abort if to slow, if you do not download 300 bytes (-Y) every seconds for one minute, 60 seconds (-y) then stop download
curl -Y 300 -y 60

Set overall timelimit with -m
curl -m 10

Limit the transferrate per second
curl –limit-rate 10K (same as)
curl –limit-rate 10240

Prevent cURL from upload (-T upload) in a packet size (–limit-rate) of 1 mb per second
curl -T upload.file

Setting Headers
curl -H “Balbla: This is the value :)”

Prevent to send specific headers with -H “name:”
curl -H “host:”


Related Articles

                                                          Leave a Comment