Crate decrypt_cookies

Source
Expand description

ยงDecrypt Cookies

ยงExample

Easily make a request using the authorization data from your browser.

See: reqwest

use std::sync::Arc;

use decrypt_cookies::{chromium::GetCookies, prelude::*};
use reqwest::cookie::Jar;
use snafu::{ResultExt, Whatever};

#[snafu::report]
#[tokio::main]
async fn main() -> Result<(), Whatever> {
    let chromium = ChromiumBuilder::<Chrome>::new()
        .build()
        .await
        .whatever_context("Chromium build failed")?;
    let all_cookies: Jar = chromium
        .cookies_all()
        .await
        .whatever_context("Get cookies failed")?
        .into_iter()
        .collect();

    let client = reqwest::Client::builder()
        .cookie_provider(Arc::new(all_cookies))
        .build()
        .whatever_context("reqwest Client build failed")?;

    let resp = client
        .get("https://www.rust-lang.org")
        .send()
        .await
        .whatever_context("Get send failed")?
        .text()
        .await
        .whatever_context("get text failed")?;
    println!("{resp}");

    Ok(())
}

ยงTo add a new browser

  • BASE: A browser all data location relative to home dir.
  • COOKIES, LOGIN_DATA, KEY: Relative to BASE path.
  • NAME: browser name

Implement ChromiumInfo, FirefoxPath trait.

ยงTest Status

[!NOTE]

These are the latest status updates, not the released status. Please check out the newest tag for the released status.

  • Linux:
BrowserCookiesPasswdTest DateVersion
Firefox๐Ÿ”‘๐Ÿšซ2025-07-19140.0.4
Librewolf๐Ÿ”‘๐Ÿšซ2025-07-19140.0.2-1
Floorp๐Ÿ”‘๐Ÿšซ2025-07-19141.0
Zen๐Ÿ”‘๐Ÿšซ2025-08-021.14.5b
Chrome๐Ÿ”‘๐Ÿ”‘2025-07-19138.0.7204.157
Edge๐Ÿ”‘๐Ÿ”‘2025-07-19138.0.3351.95
Chromium๐Ÿ”‘๐Ÿ”‘2025-07-19138.0.7204.157
Brave๐Ÿ”‘๐Ÿ”‘2025-07-19138.1.80.122
Yandex๐Ÿ”‘๐Ÿšซ2025-07-1925.4.1.1213
Vivaldi๐Ÿ”‘๐Ÿ”‘2025-07-197.5.3735.54
Opera๐Ÿ”‘๐Ÿ”‘2025-07-19120.0.5543.93
  • Windows:
BrowserCookiesPasswdTest DateVersion
Firefox๐Ÿ”‘๐Ÿšซ2025-07-20140.0.4
Librewolf๐Ÿ”‘๐Ÿšซ2025-07-20140.0.4-1
Floorp๐Ÿ”‘๐Ÿšซ2025-07-2011.28.0
Zen๐Ÿ”‘๐Ÿšซ2025-08-021.14.9b
Chrome๐Ÿ”‘๐Ÿ”‘2025-07-20138.0.7204.158
Edge๐Ÿ”‘๐Ÿ”‘2025-07-20138.0.3351.95
Chromium๐Ÿ”‘๐Ÿ”‘2025-07-20138.0.7204.158
Brave๐Ÿ”‘๐Ÿ”‘2025-07-20138.1.80.122
Yandex๐Ÿ”‘๐Ÿšซ2025-07-2025.6.2.425
Vivaldi๐Ÿ”‘๐Ÿ”‘2025-07-207.5.3735.54
Opera๐Ÿ”‘๐Ÿ”‘2025-07-20120.0.5543.93
OperaGX๐Ÿ”‘๐Ÿ”‘2025-07-20119.0.5497.186
CocCoc๐Ÿ”‘๐Ÿ”‘2025-07-20137.0.7151.124
Arc๐Ÿ”‘๐Ÿ”‘2025-07-201.62.0.172
  • Macos:
BrowserCookiesPasswdTest DateVersion
Firefox๐Ÿ”‘๐Ÿšซ2025-07-19140.0.4
Librewolf๐Ÿ”‘๐Ÿšซ2025-07-19140.0.4,1
Floorp๐Ÿ”‘๐Ÿšซ2025-07-1912.0.15
Zen๐Ÿ”‘๐Ÿšซ2025-08-021.14.9b
Chrome๐Ÿ”‘๐Ÿ”‘2025-07-19138.0.7204.158
Edge๐Ÿ”‘๐Ÿ”‘2025-07-19138.0.3351.95,70a9712a-3712-420f-a3f0-8f2032f1c838
Chromium๐Ÿ”‘๐Ÿ”‘2025-07-19140.0.7306.0
Brave๐Ÿ”‘๐Ÿ”‘2025-07-191.80.122.0
Yandex๐Ÿ”‘๐Ÿšซ2025-07-1925.6.0.2391,84025
Vivaldi๐Ÿ”‘๐Ÿ”‘2025-07-197.5.3735.54
Opera๐Ÿ”‘๐Ÿ”‘2025-07-19120.0.5543.93
OperaGX๐Ÿ”‘๐Ÿ”‘2025-07-19120.0.5543.85
CocCoc๐Ÿ”‘๐Ÿ”‘2025-07-19136.0.7103.154
Arc๐Ÿ”‘๐Ÿ”‘2025-07-191.104.0,65533
Safari๐Ÿ”‘๐Ÿšซ2025-07-19

ยงTODO

  • Decrypt firefox passwd.

ยงCredits

Modulesยง

browser
chromium
firefox
prelude

Macrosยง

chromium
Register a Chromium based browser info
firefox
Register a Firefox based browser info