now passes commands through bash!

This commit is contained in:
Aviv "RustyStriker" Romem 2022-06-10 19:54:24 +03:00
parent 9ff5d4b44f
commit 14bf204d35

View file

@ -109,14 +109,12 @@ fn write_injection(s: &str, out: &mut File, inp: &mut File, cfolder: &str) {
out.write(pre.as_bytes()).unwrap(); out.write(pre.as_bytes()).unwrap();
let mut com_iter = com.split(' '); // let mut com_iter = com.split(' ');
let com = Command::new(com_iter.next().unwrap()) let com = Command::new("bash")
.args( .arg("-c")
com_iter.map(|x| x .arg(com)
.replace("$HOME", unsafe { &HOME_DIR }) .env("HOME", unsafe { &HOME_DIR })
.replace("$CURRENT", cfolder) .env("CURRENT", cfolder)
)
)
.output(); .output();
let com = match com { let com = match com {