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.
BASIC HTTP CALL
do a simple http call on index of example.com
be silent...
add some Port... yawn...
include Header Output
Verbose Mode
DICT
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
Insecure HTTPS
Save OUTPUT in File
with flag -o you are able to save the output to a file on a disk
with flag --create-dirs cURL will even handle to create the local dir hierachy for you
Get some FTP File
Send a FTP NLSD command
list a directory on a FTP server
Upload some FTP File
Send some Headers
Send some custom Headers
GET some data
POST some data
curl --data "
Pass HTACCESS
curl -u name:pass http://spielprinzip.com/secret-page/
curl http://name:pass@protected.example.com
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.
FOLLOW LOCATION
When the server is sending in a redirect header (301, 302), cURL will follow
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
