Advertisement
Guest User

Untitled

a guest
Jul 21st, 2018
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.34 KB | None | 0 0
  1. pub fn send_syn(collector: &Collector) -> Result<(), io::Error> {
  2.     let (mut tx, _) = transport_channel(100, Layer3(Tcp)).unwrap();
  3.     let mut packet = [0u8;40];
  4.     let packet = build_pkt(collector, &mut packet);
  5.     match tx.send_to(packet, IpAddr::V4(collector.dst_ip)) {
  6.         Ok(_) => Ok(()),
  7.         Err(e) => Err(e),
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement