I would like to have cookie of a HTTPS site. I do have credential and certificate to access given site.

If I access site from chrome/firefox then I can easily extract cookie but what is the way to have this cookie from command line by using curl,wget or similar CUI-based tools ?

1 Answer 1


Try this out:

curl -c - '<website>'
  • -c flag is to retrieve the cookie
  • 1
    curl: no URL specified! curl: try 'curl --help' or 'curl --manual' for more information
    – SHW
    May 4, 2017 at 13:07
  • What command did you use? Can you copy and the paste the exact command?
    – ryekayo
    May 4, 2017 at 13:08
  • I used the same command as you mentioned by replacing '<website>' by desired URL.
    – SHW
    May 4, 2017 at 13:10
  • I made a typo in my answer.. Just updated
    – ryekayo
    May 4, 2017 at 13:11
  • I tried that too. Then message appears as "<html><head><title>Object moved</title></head><body>"
    – SHW
    May 4, 2017 at 13:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .