Пример #1
0
        /// <summary>
        /// Transmits a send queue via internal "WinPcapDevice" and disposes it at the end.
        /// </summary>
        public void SendPacketQueue(SendQueue packetQueue)
        {
            if (!PcapDevice.Opened)
            {
                return;
            }

            PcapDevice.SendQueue(packetQueue, SendQueueTransmitModes.Normal);

            packetQueue.Dispose();
        }
Пример #2
0
        // send old ARP information to targets
        private void ReArpTargets()
        {
            // somewhere around 58 bytes for an ARP reply
            var sendQueue = new SendQueue(SpoofingTargets1.Count * 2 * 60);

            foreach (Target target1 in SpoofingTargets1)
            {
                sendQueue.Add(GenerateARPReply(target1.IP, SpoofingTarget2.IP, SpoofingTarget2.PMAC, target1.PMAC).Bytes);
                sendQueue.Add(GenerateARPReply(SpoofingTarget2.IP, target1.IP, target1.PMAC, SpoofingTarget2.PMAC).Bytes);
            }

            device.SendQueue(sendQueue, SendQueueTransmitModes.Normal);
            sendQueue.Dispose();

            return;
        }