#winapi - Making a DLL Injector that connects to a TcpStream
3 messages · Page 1 of 1 (latest)
here is the code in the dll
fn attach() -> String {
panic::set_hook(Box::new(|info| {
let _ = fs::write(generate_rand_fn(), info.to_string());
}));
let loop_thread = thread::spawn(|| {
let mut stream = TcpStream::connect_timeout(
&SocketAddr::new([127, 0, 0, 1].into(), PORT),
Duration::from_secs(10),
)
.unwrap();
loop {
let command = stream.reads::<Instruction>().unwrap();