Curl
Fetch HTTP Headers : curl --head "https://example.com"
List contents of directory : curl --list-only "https://example.com/foo/"
Redirect query as specified by a 3xx response : curl --location "https://iana.org"
Check whether a site is down : curl --head --show-error "http://example.com"
Send form data : curl --form "username=seth" --form "password=12345678" "https://example.com/api/v4/endpoint"
Send a file as form data : curl --form "profile=@me.jpg" "https://example.com/foo/bar"
Send contents of a file as form data : curl --form "description=<file.md" "https://example.com/foo/bar"
Specify HTTP Method : curl --request POST --data "Foo: bar" "https://example.com/api/endpoint"
Curl post request :curl -d "name=username&password=123456"
-s option doesnt show any error msg : curl -s URL
curl -s -d "username=test&password=xyz&submit=submit" -X POST http://ip/login/
curl -s --cookie "zyx=1" http://ip/
curl -s --user-agent "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Mobile/15E148 Safari/604.1" http://10.10.141.149/
curl -s --referer "tryhackme.com" http://zyx/free_sub/
-H flag : sends additional preflight request headers to the server : curl -s -H "egg: Yes" http://ip/
Last updated