From 143884f8b97846f3c00f62c24ee3892d9bfb09ce Mon Sep 17 00:00:00 2001 From: DrFrugal Date: Sun, 16 Jul 2023 19:31:38 +0200 Subject: [PATCH] address headers with their proper names --- Cargo.toml | 2 +- src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c940f53..ef03938 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "laa_toggle" -version = "0.1.1" +version = "0.1.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index 4953c03..e3cbd3f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,11 +37,11 @@ fn main() { Err(error) => abort("Failed to open EXE in read/write mode", Some(&error)) }; if let Err(error) = file.seek_read(&mut buffer4, 0x3C) { - abort("Failed to read e_lfanew of MS DOS stub", Some(&error)); + abort("Failed to read e_lfanew of MS-DOS stub", Some(&error)); } let address_coff_characteristics = (u32::from_le_bytes(buffer4) + 0x4 + 0x12) as u64; // real data starts after "PE\0\0" string (first 4 Bytes) if let Err(error) = file.seek_read(&mut buffer2, address_coff_characteristics) { - abort("Failed to read Characteristics from PE header", Some(&error)); + abort("Failed to read Characteristics from COFF file header", Some(&error)); } let is_laa_enabled = buffer2[0] & IMAGE_FILE_LARGE_ADDRESS_AWARE != 0; println!("LAA currently enabled: {}\nDo you want to change that [y/n]?", is_laa_enabled);