Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub fn send_syn(collector: &Collector) -> Result<(), io::Error> {
- let (mut tx, _) = transport_channel(100, Layer3(Tcp)).unwrap();
- let mut packet = [0u8;40];
- let packet = build_pkt(collector, &mut packet);
- match tx.send_to(packet, IpAddr::V4(collector.dst_ip)) {
- Ok(_) => Ok(()),
- Err(e) => Err(e),
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement