format addresses and sizes as hex

This commit is contained in:
2025-12-03 13:47:06 +00:00
parent 30b22107a1
commit 637160d3ea
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ repository = "https://github.com/elituf/haxor"
keywords = ["memory", "game", "hacking", "process"] keywords = ["memory", "game", "hacking", "process"]
[dependencies] [dependencies]
derive_more = { version = "2", features = ["display"] } derive_more = { version = "2", features = ["debug", "display"] }
log = "0.4" log = "0.4"
thiserror = "2" thiserror = "2"
+4 -1
View File
@@ -2,7 +2,7 @@ use crate::{
Error, Error,
sys::{handle::Handle, memory, snapshot}, sys::{handle::Handle, memory, snapshot},
}; };
use derive_more::derive::Display; use derive_more::{Debug, derive::Display};
#[derive(Display)] #[derive(Display)]
/// an identifier for searching for a process /// an identifier for searching for a process
@@ -33,6 +33,7 @@ pub struct Process {
/// the process id (th32ProcessID) /// the process id (th32ProcessID)
pub id: u32, pub id: u32,
/// the base address of the module with the same name as `name` (modBaseAddr) /// the base address of the module with the same name as `name` (modBaseAddr)
#[debug("0x{base_address:X}")]
pub base_address: usize, pub base_address: usize,
/// the process handle (HANDLE) /// the process handle (HANDLE)
pub handle: Handle, pub handle: Handle,
@@ -138,7 +139,9 @@ pub struct Module {
/// the module executable path (szExePath) /// the module executable path (szExePath)
pub path: String, pub path: String,
/// the module base address (modBaseAddr) /// the module base address (modBaseAddr)
#[debug("0x{base_address:X}")]
pub base_address: usize, pub base_address: usize,
/// the module base size (modBaseSize) /// the module base size (modBaseSize)
#[debug("0x{base_size:X}")]
pub base_size: usize, pub base_size: usize,
} }