#browser #cookies #cli

bin+lib browsercookie-rs

A simple filesystem browser cookie extractor

2 releases

0.1.1 Apr 22, 2019
0.1.0 Apr 22, 2019

#75 in #cookies

MIT license

16KB
256 lines

browsercookie-rs

A rust crate useful for extracting cookies from browsers. Inspired from browsercookie python library.

Usage

Using the library is quite simple

use browsercookie::{Browsercookies, Browser};

let mut bc = Browsercookies::new();
let domain_regex = Regex::new("google.com").unwrap();

bc.from_browser(Browser::Firefox, &domain_regex).expect("Failed to get cookies from firefox");
println!("Cookie header string: Cookie: {}", bc.to_header(domain_regex));

Better example should be present in browsercookies.

Binary

Same crate should also give you a binary browsercookies, which should be usable from your favourite shell for crudely using frontend apis for simple tooling.

browsercookies --domain jira

Feature Matrix

TargetOS Firefox Chrome
Linux
macOS
Windows

Dependencies

~6.5–9.5MB
~165K SLoC