How can I print out a command's output?
let mut telnet_scan_command = Command::new("telnet");
telnet_scan_command.arg("0.0.0.0");
match telnet_scan_command.output() {
Ok(o) => {
println!("{}", String::from_utf8_unchecked(o.stdout))
}
Err(e) => {
println!("Something Went wrong Log: {} ", e)
}
The program runs perfectly fine but the output should be:
Trying 0.0.0.0...
telnet: Unable to connect to remote host: Connection refused
The actual output is:
Trying 0.0.0.0...
How can I get the rest of the output?