Some notes on cURL

Little powerful command-line tool by Daniel Stenberg for transferring data between computers in networks using various protocols such as http, https or ftp.

As i keep on forgetting boring things pretty fast, i will post some more or less useful cURL commands on this page just for myself. And for anyone else, as long as he or she might be as dumb as i am. You can do a lot more with cURL than described here: Proxies, Tunneling, SSL, Fileuploading. Please refer to the official docs or the man pages for complete options.


do a simple http call on index of
be silent...
curl -s
add some Port... yawn...
include Header Output
curl --include
Verbose Mode
curl --verbose


Get the definition of the word SOLARIS. For in-depth understanding of the DICT-Protocol, have a look at Wikipedia DICT and for more detailled informations refer to RFC2229
curl dict://

Insecure HTTPS

curl -k

Save OUTPUT in File

with flag -o you are able to save the output to a file on a disk
curl -o saveHere.html
with flag --create-dirs cURL will even handle to create the local dir hierachy for you
curl -o path/to/some/not/existing/dir/saveHere.html --create-dirs

Get some FTP File


Send a FTP NLSD command

list a directory on a FTP server
curl -l -u user:name

Upload some FTP File

curl -T /path/to/a/file -u user:pass

Send some Headers

curl --header "Connection:keep-alive" "--header "User-Agent: Warrior 01"

Send some custom Headers

curl --header "Secret:15412415" "--header "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0.1)"

GET some data


POST some data

curl --data "p=4&ut=helo" curl --data "Information"

PUT some data without file

curl -X PUT -d "something=blabla&somethingelse=blaha"


curl --user name:pass curl -u name:pass curl

Fake HTTP Referer

By the way, in RFC2068, the word Referrer is wrongly written as Referer [sic] and therefor now standard in the HTTP-Specification! This mistake was not adepted to the DOM Specifications. So this may explain the different notation.
curl --referer http://www.example.come


When the server is sending in a redirect header (301, 302), cURL will follow
curl --location

Send Cookies

For advanced Hacking, you often need to send some cookies. This one here is the simple method. Dig the web for more detailed informations about cookie handling with cURL
curl --cookie "name=Jack"