No description
Find a file
2017-12-06 03:51:01 +01:00
cookiefire Initial commit 2017-11-07 23:09:25 +01:00
curlfire Fixes: make some variables lowercase 2017-12-06 03:34:02 +01:00
README.md Update README.md 2017-12-06 03:51:01 +01:00

curlfire

Run curl with the current Firefox cookies. This is useful for interacting with logged in websites from the shell, without having to manually deal with the login process.

The executable cookiefire included in this package can be used to extract the cookies from Firefox.

Attribution

This code is adapted from this Stack Exchange answer by hackerb9.

Usage

# Fetch google with the cookies from the default profile
curlfire http://www.google.com/

# Fetch google with the cookies from the blah profile
curlfire -P blah http://www.google.com/

# Getting cookies
cookiefire > /tmp/cookies
curl -b /tmp/cookies http://www.google.com/

Installation

cd ~
git clone https://github.com/talwrii/curlfire
echo 'PATH=$PATH:~/curlfire' >> ~/.bashrc

Alternatives and prior work

  • Adapted from this Stack Exchange answer
  • Firebug and friends allow you to copy requests as curl. This can be suitable for debugging.
  • Cookies can be exported manually from within Firefox

All of these approaches can be time consuming when automating tasks.

Prior to Firefox 57, the remote control extension could be used to interact with the page currently viewed in Firefox from the shell (including outputting the current document object model as HTML).