From 4ed8fadd4ced871b383a2776790cb70b52de1763 Mon Sep 17 00:00:00 2001 From: MechaCat02 Date: Sat, 28 Mar 2026 22:24:23 +0100 Subject: [PATCH] feat: show decrypted session key in inspect output Co-Authored-By: Claude Opus 4.6 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/display.rs | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4d49bf6..8a9606b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -288,7 +288,7 @@ dependencies = [ [[package]] name = "xex2tractor" -version = "0.6.0" +version = "0.6.1" dependencies = [ "aes", "cbc", diff --git a/Cargo.toml b/Cargo.toml index 5d282e4..910a5b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xex2tractor" -version = "0.6.0" +version = "0.6.1" edition = "2024" description = "A tool for extracting and inspecting Xbox 360 XEX2 executable files" license = "MIT" diff --git a/src/display.rs b/src/display.rs index 47166d9..996c2da 100644 --- a/src/display.rs +++ b/src/display.rs @@ -1,4 +1,5 @@ /// Pretty-print formatting for parsed XEX2 structures. +use crate::crypto; use crate::header::Xex2Header; use crate::optional::{ format_hex_bytes, format_rating, format_timestamp, CompressionInfo, HeaderKey, OptionalHeaders, @@ -266,6 +267,11 @@ pub fn display_security_info(security: &SecurityInfo) { "AES Key (encrypted): {}", format_hex_bytes(&security.aes_key) ); + let session_key = crypto::derive_session_key(&security.aes_key); + println!( + "AES Key (decrypted): {}", + format_hex_bytes(&session_key) + ); if security.export_table == 0 { println!("Export Table: 0x00000000 (none)");