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
1 changed files with 6 additions and 8 deletions

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();
let mut com_iter = com.split(' ');
let com = Command::new(com_iter.next().unwrap())
.args(
com_iter.map(|x| x
.replace("$HOME", unsafe { &HOME_DIR })
.replace("$CURRENT", cfolder)
)
)
// let mut com_iter = com.split(' ');
let com = Command::new("bash")
.arg("-c")
.arg(com)
.env("HOME", unsafe { &HOME_DIR })
.env("CURRENT", cfolder)
.output();
let com = match com {