fixed typo

This commit is contained in:
uru
2021-03-22 01:14:46 +09:00
parent 4487c4a29a
commit bee58c370f
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -89,11 +89,11 @@ impl PE_Container<'_> {
}
}
pub fn change_target_imabe_base(&mut self, new_image_base: *mut c_void) {
pub fn change_target_image_base(&mut self, new_image_base: *mut c_void) {
self.target_image_base = new_image_base;
}
pub fn change_payload_imabe_base(&self, new_image_base: *mut c_void) {
pub fn change_payload_image_base(&self, new_image_base: *mut c_void) {
unsafe { (*self.payload_image.FileHeader).OptionalHeader.ImageBase = new_image_base as _ };
}
+2 -2
View File
@@ -88,11 +88,11 @@ impl PE_Container<'_> {
}
}
pub fn change_target_imabe_base(&mut self, new_image_base: *mut c_void) {
pub fn change_target_image_base(&mut self, new_image_base: *mut c_void) {
self.target_image_base = new_image_base;
}
pub fn change_payload_imabe_base(&self, new_image_base: *mut c_void) {
pub fn change_payload_image_base(&self, new_image_base: *mut c_void) {
unsafe { (*self.payload_image.FileHeader).OptionalHeader.ImageBase = new_image_base as _ };
}
+4 -4
View File
@@ -56,13 +56,13 @@ pub unsafe fn hollow32(src: impl Into<String>, dest: impl Into<String>) -> Resul
if new_address as u64 == 0x0 as u64 {
bail!("could not allocate of the remote process image. VirtualAllocEx calling was failed.")
};
container.change_target_imabe_base(new_address);
container.change_target_image_base(new_address);
// calculate delta before to change base address
let delta = shared::Delta::calculate_delta(container.target_image_base as usize, container.payload_base() as usize);
// change base address to allocated memory address
container.change_payload_imabe_base(new_address);
container.change_payload_image_base(new_address);
container.copy_remote_headers(hp)?;
container.copy_remote_section_headers(hp)?;
@@ -125,13 +125,13 @@ pub unsafe fn hollow64(src: impl Into<String>, dest: impl Into<String>) -> Resul
if new_address as u64 == 0x0 as u64 {
bail!("could not allocate of the remote process image. VirtualAllocEx calling was failed.")
};
container.change_target_imabe_base(new_address);
container.change_target_image_base(new_address);
// calculate delta before to change base address
let delta = shared::Delta::calculate_delta(container.target_image_base as usize, container.payload_base() as usize);
// change base address to allocated memory address
container.change_payload_imabe_base(new_address);
container.change_payload_image_base(new_address);
container.copy_remote_headers(hp)?;
container.copy_remote_section_headers(hp)?;