mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-05-02 02:09:58 -07:00
Fix clippy lints
https://github.com/EFForg/rayhunter/pull/451 is failing because we got auto-upgraded to a new clippy, which lints against more things
This commit is contained in:
committed by
Markus Unterwaditzer
parent
355242fa71
commit
3247d35b7e
@@ -92,16 +92,16 @@ pub async fn telnet_send_file(addr: SocketAddr, filename: &str, payload: &[u8])
|
||||
|
||||
pub async fn send_file(admin_ip: &str, local_path: &str, remote_path: &str) -> Result<()> {
|
||||
let file_content = std::fs::read(local_path)
|
||||
.with_context(|| format!("Failed to read local file: {}", local_path))?;
|
||||
.with_context(|| format!("Failed to read local file: {local_path}"))?;
|
||||
|
||||
println!("Connecting to {admin_ip}");
|
||||
let addr = SocketAddr::from_str(&format!("{admin_ip}:23"))
|
||||
.with_context(|| format!("Invalid IP address: {}", admin_ip))?;
|
||||
.with_context(|| format!("Invalid IP address: {admin_ip}"))?;
|
||||
|
||||
telnet_send_file(addr, remote_path, &file_content)
|
||||
.await
|
||||
.with_context(|| format!("Failed to send file {} to {}", local_path, remote_path))?;
|
||||
.with_context(|| format!("Failed to send file {local_path} to {remote_path}"))?;
|
||||
|
||||
println!("Successfully sent {} to {}", local_path, remote_path);
|
||||
println!("Successfully sent {local_path} to {remote_path}");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user