Send packets and arp reply packets to deceive others
Send a packet
Although, in the name of WinPcap, the library should be aimed at data capture (Packet Capture), it also provides many other useful features. Among them, we can find a complete set of functions for sending packets.
Please note that the original libpcap library does not support sending packets, so the functions shown here are extensions to WinPcap, and they cannot be run on the Unix platform.
Use pcap_sendpacket () to send a single packet
The following code shows the easiest way to send a packet. After the adapter is turned on, pcap_sendpacket () is called to send the handcrafted packet. The argument to pcap_sendpacket () has a buffer to contain the sent data, the length of the buffer, and the adapter used to send the data. Note that the buffered data will be sent directly to the network without any processing or processing. This means that the application needs to create the correct protocol header to make the packet more meaningful.
Send a packet
Send arp reply packets to deceive others.
Message format of ARP protocol
Step 1: bind IP/MAC to prevent others from being *
Step 2: check to see if the binding is successful
Under the DOS interface, enter the command [arp-a] to see the ARP entry after being added successfully.
Implement *