The core code is pasted out. It is so simple that ARP packets are manually constructed and then sent out through the database in sharppcap...
Send the correct gateway continuously, that is, the arpfirewall.
The gateway that keeps sending errors to others is the ARP attacker.
/// <Summary>
/// Get the data packet
/// </Summary>
/// <Returns> </returns>
Public byte [] getPacket (byte [] yIP, byte [] mIP, byte [] yMAC, byte [] mMAC)
{
// ARP packet
Byte [] packet = new byte [] {0xe0, 0xcb, 0x4e, 0x2f, 0x8a, 0xc7, 0x00, 0x23, 0xcd, 0x34, 0x20, 0x0e, 0x08, 0x06, 0x00, 0x01, 0x08, 0x00, 0x06, 0x04, 0x00, 0x02, 0x00, 0x23, 0xcd, 0x34, 0x20, 0x0e, 0xc0, 0xa8, 0x01, 0x01, 0xe0, 0xcb, 0x4e, 0x2f, 0x8a, 0xc7, 0xc0, 0xa8, 0x01, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x27, 0xa1, 0xb5 };
// Replace IP addresses cyclically
For (int I = 0; I <4; I ++)
{
Packet [I + 28] = yIP [I];
Packet [I + 38] = mIP [I];
}
// Replace MAC cyclically
For (int I = 0; I <6; I ++)
{
Packet [I + 22] = yMAC [I];
Packet [I] = mMAC [I];
Packet [I + 6] = yMAC [I];
Packet [I + 32] = mMAC [I];
}
Return packet;
}