mirror of
https://github.com/nab138/isideload.git
synced 2026-03-02 06:26:16 +01:00
Add additional debug logs
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1831,7 +1831,7 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "isideload"
|
name = "isideload"
|
||||||
version = "0.2.12"
|
version = "0.2.13"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes 0.9.0-rc.4",
|
"aes 0.9.0-rc.4",
|
||||||
"aes-gcm",
|
"aes-gcm",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "isideload"
|
|||||||
description = "Sideload iOS/iPadOS applications"
|
description = "Sideload iOS/iPadOS applications"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
authors = ["Nicholas Sharp <nab@nabdev.me>"]
|
authors = ["Nicholas Sharp <nab@nabdev.me>"]
|
||||||
version = "0.2.12"
|
version = "0.2.13"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
repository = "https://github.com/nab138/isideload"
|
repository = "https://github.com/nab138/isideload"
|
||||||
documentation = "https://docs.rs/isideload"
|
documentation = "https://docs.rs/isideload"
|
||||||
|
|||||||
@@ -573,8 +573,10 @@ impl AppleAccount {
|
|||||||
.get_data("et")
|
.get_data("et")
|
||||||
.context("Failed to get encrypted token")?;
|
.context("Failed to get encrypted token")?;
|
||||||
|
|
||||||
|
debug!("Acquired encrypted token for {}", app);
|
||||||
let decrypted_token = Self::decrypt_gcm(encrypted_token, session_key)
|
let decrypted_token = Self::decrypt_gcm(encrypted_token, session_key)
|
||||||
.context("Failed to decrypt app token")?;
|
.context("Failed to decrypt app token")?;
|
||||||
|
debug!("Decrypted app token for {}", app);
|
||||||
|
|
||||||
let token: Dictionary = plist::from_bytes(&decrypted_token)
|
let token: Dictionary = plist::from_bytes(&decrypted_token)
|
||||||
.context("Failed to parse decrypted app token plist")?;
|
.context("Failed to parse decrypted app token plist")?;
|
||||||
@@ -653,15 +655,24 @@ impl AppleAccount {
|
|||||||
bail!("IV is not the correct length: {} bytes", iv.len());
|
bail!("IV is not the correct length: {} bytes", iv.len());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug!(
|
||||||
|
"Decrypting GCM data with key of length {} and IV of length {}",
|
||||||
|
key.len(),
|
||||||
|
iv.len()
|
||||||
|
);
|
||||||
let key = aes_gcm::Key::<AesGcm<Aes256, U16>>::try_from(key)?;
|
let key = aes_gcm::Key::<AesGcm<Aes256, U16>>::try_from(key)?;
|
||||||
|
debug!("GCM key created successfully");
|
||||||
let cipher = AesGcm::<Aes256, U16>::new(&key);
|
let cipher = AesGcm::<Aes256, U16>::new(&key);
|
||||||
|
debug!("GCM cipher initialized successfully");
|
||||||
let nonce = Nonce::<U16>::try_from(iv)?;
|
let nonce = Nonce::<U16>::try_from(iv)?;
|
||||||
|
debug!("GCM nonce created successfully");
|
||||||
|
|
||||||
let mut buf = ciphertext_and_tag.to_vec();
|
let mut buf = ciphertext_and_tag.to_vec();
|
||||||
|
|
||||||
cipher
|
cipher
|
||||||
.decrypt_in_place(&nonce, header, &mut buf)
|
.decrypt_in_place(&nonce, header, &mut buf)
|
||||||
.map_err(|e| report!("Failed to decrypt gcm: {}", e))?;
|
.map_err(|e| report!("Failed to decrypt gcm: {}", e))?;
|
||||||
|
debug!("GCM decryption successful");
|
||||||
|
|
||||||
Ok(buf)
|
Ok(buf)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user