Merge pull request #61 from p-l-/fix-ssh-output

Display data using safe byte2str()
This commit is contained in:
_Frky 2022-08-25 08:07:39 +02:00 committed by GitHub
commit 64161228ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -176,12 +176,7 @@ pub fn repl<'a>(
}
let repl_data = b"SSH-2.0-1\r\n".to_vec();
debug!("sending SSH answer");
warn!(
"SSH server banner to {}",
std::str::from_utf8(&pstate.ssh_software)
.unwrap()
.trim_end()
);
warn!("SSH server banner to {}", byte2str(&pstate.ssh_software));
Some(repl_data)
}