Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
allow-expect-in-tests = true
allow-unwrap-in-tests = true
allow-dbg-in-tests = true
avoid-breaking-exported-api = false
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
],
"rust-analyzer.rustfmt.extraArgs": ["+nightly"],
"rust-analyzer.cargo.features": [
"chromium-crypto/tracing",
"decrypt-cookies/Safari",
"decrypt-cookies/tracing",
"binary-cookies/serde",
"binary-cookies/tokio",
"binary-cookies/sync"
Expand Down
186 changes: 52 additions & 134 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ panic = "abort"


[workspace.dependencies]
snafu = "0.8"
owo-colors = "4.2"
positioned-io = { version = "0.3", default-features = false }
chacha20poly1305 = "0.10"
Expand Down Expand Up @@ -49,7 +50,6 @@ tracing = { version = "^0.1" }
tracing-subscriber = { version = "^0.3", default-features = true, features = ["env-filter"] }

anyhow = "^1"
miette = { version = "^7", default-features = true }
thiserror = { version = "^2" }

serde = { version = "^1", default-features = false, features = ["derive"] }
Expand All @@ -73,6 +73,7 @@ rust-ini = { version = "^0.21" }
which = "8"
duct = "1"
clap = "^4"
strum = "0.27"

decrypt-cookies = { path = "./crates/decrypt-cookies", version = "0.7.0" }
chromium-crypto = { path = "./crates/chromium-crypto", version = "0.1.0" }
Expand Down
5 changes: 4 additions & 1 deletion crates/chromium-crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exclude = ["./CHANGELOG.md", "examples", "tests/"]
cfg-if = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["fs", "rt"] }
tracing = { workspace = true }
tracing = { workspace = true, optional = true }

[target.'cfg(target_os = "linux")'.dependencies]
TinyUFO = { workspace = true }
Expand Down Expand Up @@ -52,5 +52,8 @@ windows = { workspace = true, features = [
"Wdk_System_SystemServices",
] }

[features]
tracing = ["dep:tracing"]

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/chromium-crypto/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub enum CryptoError {
#[error("{0}")]
Context(winnow::error::ContextError),
#[error(r#"app_bound_encrypted_key not start with "APPB""#)]
APPB,
Appb,
#[error("Get process path failed")]
ProcessPath,
#[error("Invalid status from RtlAdjustPrivilege")]
Expand Down
5 changes: 3 additions & 2 deletions crates/chromium-crypto/src/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ impl Decrypter {
decrypter
.decrypt_padded_mut::<block_padding::Pkcs7>(&mut ciphertext[prefix_len..])
.map(|res| {
String::from_utf8(res.to_vec()).unwrap_or_else(|e| {
tracing::info!("Decoding for chromium 130.x: {e}");
String::from_utf8(res.to_vec()).unwrap_or_else(|_e| {
#[cfg(feature = "tracing")]
tracing::info!("Decoding for chromium >= 130.x: {_e}");
String::from_utf8_lossy(&res[32..]).to_string()
})
})
Expand Down
Loading
Loading