From 637160d3ea24d52caf4e90115bc08ebc428147de Mon Sep 17 00:00:00 2001 From: futile Date: Wed, 3 Dec 2025 13:47:06 +0000 Subject: [PATCH] format addresses and sizes as hex --- Cargo.toml | 2 +- src/process.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2183ff8..5228202 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/elituf/haxor" keywords = ["memory", "game", "hacking", "process"] [dependencies] -derive_more = { version = "2", features = ["display"] } +derive_more = { version = "2", features = ["debug", "display"] } log = "0.4" thiserror = "2" diff --git a/src/process.rs b/src/process.rs index 86a82e6..4c65fde 100644 --- a/src/process.rs +++ b/src/process.rs @@ -2,7 +2,7 @@ use crate::{ Error, sys::{handle::Handle, memory, snapshot}, }; -use derive_more::derive::Display; +use derive_more::{Debug, derive::Display}; #[derive(Display)] /// an identifier for searching for a process @@ -33,6 +33,7 @@ pub struct Process { /// the process id (th32ProcessID) pub id: u32, /// the base address of the module with the same name as `name` (modBaseAddr) + #[debug("0x{base_address:X}")] pub base_address: usize, /// the process handle (HANDLE) pub handle: Handle, @@ -138,7 +139,9 @@ pub struct Module { /// the module executable path (szExePath) pub path: String, /// the module base address (modBaseAddr) + #[debug("0x{base_address:X}")] pub base_address: usize, /// the module base size (modBaseSize) + #[debug("0x{base_size:X}")] pub base_size: usize, }