Skip to content

SaltSpectre/ext-CookieExporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cookie Exporter - Edge Extension

Cookie Exporter Banner

About

A privacy-focused Microsoft Edge extension that exports cookies from the current website to a text file in the Netscape standard format for compatibility with standard tools like cURL.

Privacy

This extension:

  • Does NOT send any data to external servers
  • Does NOT store cookies permanently
  • Does NOT harvest bank account information, passwords, SSNs, or kidneys
  • Only reads cookies from the current website when you click "Export"
  • All processing is done locally in your browser

Installation

Option 1: Load Unpacked Extension (Development)

  • Open Microsoft Edge
  • Navigate to edge://extensions/
  • Enable "Developer mode" (toggle in the bottom-left corner)
  • Click "Load unpacked"
  • Select the ext-DownloadCookieFile folder
  • The extension should now appear in your extensions list

Usage

  1. Navigate to any website in your browser
  2. Click the Cookie Exporter extension icon in the toolbar
  3. The popup will show:
    • Current website domain
    • Number of cookies found
  4. Click "Export Cookies" button
  5. Choose where to save the file (or it will save to your default Downloads folder)
  6. The cookies will be exported to a text file named cookies_[domain].txt

File Format

The exported cookies are saved in Netscape HTTP Cookie File format, the industry-standard format compatible with most HTTP tools and applications such as cURL.

Format Specification

The file uses a tab-separated format with 7 fields per cookie:

  1. Domain - The domain that can read the cookie
  2. Flag - TRUE if domain begins with a dot (subdomain wildcard), FALSE otherwise
  3. Path - The path within the domain that the cookie is valid for
  4. Secure - TRUE if connection must be secure (HTTPS), FALSE otherwise
  5. Expiration - Unix timestamp of expiration (or 0 for session cookies)
  6. Name - The cookie name
  7. Value - The cookie value

Example Output

# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# This file was generated by Cookie Exporter extension
# Edit at your own risk.

.example.com	TRUE	/	FALSE	1734451200	session_id	abc123xyz
example.com	FALSE	/api	TRUE	1734451200	auth_token	def456uvw

Compatible Tools

This format is supported by:

  • curl - Use with --cookie cookies.txt or -b cookies.txt
  • wget - Use with --load-cookies=cookies.txt
  • yt-dlp - Use with --cookies cookies.txt
  • aria2 - Use with --load-cookies=cookies.txt
  • HTTPie - Convert or use with session management
  • Most HTTP libraries and browser automation tools

Usage Examples

Using with curl:

curl -b cookies_example.com.txt https://example.com/api/data

Using with wget:

wget --load-cookies=cookies_example.com.txt https://example.com/file.zip

Using with PowerShell:

# Parse the Netscape cookie file and create a WebRequestSession
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
Get-Content cookies_example.com.txt | Where-Object { $_ -notmatch '^#' -and $_ -match '\S' } | ForEach-Object {
    $fields = $_ -split "`t"
    $cookie = New-Object System.Net.Cookie
    $cookie.Name = $fields[5]
    $cookie.Value = $fields[6]
    $cookie.Domain = $fields[0]
    $cookie.Path = $fields[2]
    $session.Cookies.Add($cookie)
}

# Example with Invoke-WebRequest
Invoke-WebRequest -Uri "https://example.com/api/data" -WebSession $session

# Example with Invoke-RestMethod
Invoke-RestMethod -Uri "https://example.com/api/data" -WebSession $session

Permissions

The extension requires the following permissions:

  • cookies: To read cookie data from websites
  • activeTab: To get the current tab's URL and domain
  • downloads: To save the exported cookie file
  • host_permissions (<all_urls>): To access cookies from any website

Browser Compatibility

Designed for Microsoft Edge but should be usable accross any Chromium based browser with Manifest v3 extension support (Chrome, Brave, Vivaldi, etc.)

Troubleshooting

No cookies found:

  • Some websites don't set cookies
  • Cookies might be set on a different subdomain
  • Try refreshing the page before exporting

Download not working:

  • Check that the extension has the "downloads" permission
  • Ensure you're not in a restricted page (edge:// or chrome:// URLs)

Extension not loading:

  • Verify all files are present, especially manifest.json
  • Check that icons are generated and placed in the icons folder
  • Look for errors in edge://extensions/ with Developer mode enabled

License

Licensed under the MIT license. See LICENSE for details.

Contributing

Due to code safety concerns and the potential for abuse, pull requests are unlikely to be merged. There are dozens of cookie exporters out there, but I made this one for myself because I don't trust any of them. Cookies are sacred keys to your digital life.


Icon Attribution

Extension logo by Icons8.

About

A privacy-focused Microsoft Edge extension that exports cookies from the current website to a text file in the Netscape standard format for compatibility with standard tools like cURL.

Topics

Resources

License

Stars

Watchers

Forks

Contributors