Created
June 24, 2015 15:32
-
-
Save vik-y/ad71d8211177fdc0f5f8 to your computer and use it in GitHub Desktop.
Some quick hacks regarding using curl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://curl.haxx.se/docs/httpscripting.html#GET Use this link for further reference | |
curl --referer http://www.example.come http://www.example.com | |
# To fake the referrer header | |
curl --location http://www.example.com | |
# To make curl follow the redirects as well | |
curl --upload-file uploadfile http://www.example.com/receive.cgi | |
# to upload a file | |
curl --data-urlencode "name=I am Daniel" http://www.example.com | |
# to do a simple post request | |
curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL] | |
#Changing the user agent | |
curl --cookie "name=Daniel" http://www.example.com | |
#Custom cookie | |
curl --cookie cookies.txt --cookie-jar newcookies.txt http://www.example.com | |
#use a cookie file | |
curl --header "Host:" http://www.example.com | |
#modify headers | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment