cursock 1.2.0

Crate for raw socketing, can send raw packets and some protocols from linux os and windows using npcap for 2nd
Documentation
cursock-1.2.0 has been yanked.

Cursock

Crate for raw socketing, can send raw packets and some protocols

Protocols

  • Arp

Platforms

  • Windows (npcap)
  • Linux

Links

Examples

#[cfg(target_os = "linux")]
let socket = cursock::Socket::new("wlan0", true).expect("initialize error"); // Linux
#[cfg(target_os = "windows")]
let socket = cursock::Socket::new("{D37YDFA1-7F4F-F09E-V622-5PACEF22AE49}", true).expect("initialize error"); // Windows
// Since windows socket implementation is using npcap you should pass "npcap-like" interface

let buffer: [u8; 1024] = [0; 1024];

socket.send_raw_packet(&buffer, true).expect("send error");

socket.destroy()