Crates.io | binarycookies |
lib.rs | binarycookies |
version | 0.1.2 |
source | src |
created_at | 2024-01-18 03:53:59.125216 |
updated_at | 2024-01-19 02:34:15.619118 |
description | A package reader for Mac os cookie file |
homepage | |
repository | https://github.com/findre/binarycookies-reader |
max_upload_size | |
id | 1103779 |
size | 19,297 |
binarycookies is a program for deocde .binarycookies files from Safari or WebKit.
The Safari cookies file, also known as the Safari binary cookies file (Cookies.binarycookies) format
More info: https://github.com/libyal/dtformats/blob/main/documentation/Safari%20Cookies.asciidoc
https://github.com/findre/binarycookies-reader
use std::{fs::File, io::Read};
use binary_cookies::BinaryCookiesReader;
fn main() {
let mut target = File::open("/Users/foo/Library/HTTPStorages/boo.binarycookies").unwrap();
let mut data = Vec::new();
let _ = target.read_to_end(&mut data).unwrap();
let mut d = BinaryCookiesReader::from_vec(&data);
let _ = d.deocde().unwrap();
for pages in d.origin_pages() {
for cookie in pages.cookies() {
println!("{} | {} | {} | {}", cookie.domian_str(), cookie.name_str(), cookie.value_str(), cookie.http_only);
}
}
}
use binary_cookies::BinaryCookiesReader;
fn main() {
let target = String::from("/Users/foo/Library/HTTPStorages/boo.binarycookies");
let mut dec = BinaryCookiesReader::new(&target).unwrap();
let _ = d.deocde().unwrap();
for pages in d.origin_pages() {
for cookie in pages.cookies() {
println!("{} | {} | {} | {}", cookie.domian_str(), cookie.name_str(), cookie.value_str(), cookie.http_only);
}
}
}