Curl Cheat Sheet

Posted : admin On 1/29/2022
  • The one-page guide to Curl: usage, examples, links, snippets, and more.
  • Curl HTTP cheat sheet. Hide progress-s.

Single page documents with the most important curl options explained. Download Download View curl-cheat-sheet on GitHub. Welcome to curl cheat sheet. Curl HTTP cheat cheat. Bagder maintains curl-cheat-sheet. This page generated using GitHub Pages theme by Jon Rohan. Command injection is an attack in which the goal is execution of arbitrary commands on the host operating system via a vulnerable application.


Curl Cheat Sheet Pdf

  • PDF Link: cheatsheet-curl-A4.pdf, Category: Tools
  • Blog URL: https://cheatsheet.dennyzhang.com/cheatsheet-curl-A4
  • Related posts: CheatSheet: shell, #denny-cheatsheets

File me Issues or star this repo.

1.1 Curl Get/Head

Curl
NameCommand
Curl head requestcurl -I https://www.google.com
Curl head request with verbosecurl -v -I https://www.google.com
Curl with explicit http methodcurl -X GET https://www.google.com
Curl without http proxycurl --noproxy 127.0.0.1 http://www.stackoverflow.com
Curl has no timeout by defaultcurl --connect-timeout 10 -I -k https://www.google.com
Curl get with extra headerscurl --verbose --header 'Host: www.mytest.com:8182' www.google.com
Curl get response with headerscurl -k -v https://www.google.com

1.2 Curl POST

Curl reference
NameCommand
Curl post requestcurl -d 'name=username&password=123456' <URL>
Curl post send jsoncurl <URL> -H 'content-type: application/json' -d '{ 'woof': 'bark'}'

1.3 Curl Advanced

NameCommand
Get my public ipcurl -L -s http://ipecho.net/plain, curl -L -s http://whatismijnip.nl
Curl with credentialcurl -u $username:$password http://repo.dennyzhang.com/README.txt
Curl uploadcurl -v -F key1=value1 -F [email protected] <URL>
Install curl in alpine linuxapk add --update curl
Curl with http2curl -k -v --http2 https://www.google.com/
Curl ftp uploadcurl -T cryptopp552.zip -u test:test ftp://10.32.99.187/
Curl ftp downloadcurl -u test:test ftp://10.32.99.187/cryptopp552.zip -o cryptopp552.zip
Curl upload with credentialcurl -v -u admin:admin123 --upload-file package1.zip http://mysever:8081/dir/package1.zip

1.4 Curl Script

NameCommand
Install packages with curlcurl-install-package.sh
Check a website response timecurl-url-time.sh
Beautify json output for curl responsecurl-format-json.sh
Curl run remote scriptscurl-remote-scripts.sh

Curl Cheat Sheet

1.5 Wget

NameCommand
Download one urlwget -O /tmp/google.html https://google.com
Download mutiple urlswget https://google.com https://bing.com
Download a list of urlswget -i url-list.txt, url-list.txt

1.6 More Resources

License: Code is licencurl under MIT License.