mirror of
https://github.com/2vg/blackcat-rs
synced 2026-06-08 10:16:29 +00:00
fixed typo
This commit is contained in:
@@ -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 _ };
|
||||
}
|
||||
|
||||
|
||||
@@ -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 _ };
|
||||
}
|
||||
|
||||
|
||||
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user