示例#1
0
        //constructors
        public ArpPoisoner(LivePacketDevice device, Target Gateway)
        {
            _device     = device;
            _gateway    = Gateway;
            _ownMacAddr = _device.GetMacAddress();

            _bgWorker = new BackgroundWorker();
            _bgWorker.WorkerSupportsCancellation = true;
            _bgWorker.DoWork += new DoWorkEventHandler(DoWork);

            _targets         = new List <Target>();
            _dnsSpoofingList = new DNSspoofingList();

            _forwardingListener = new Listener.Listener(device, "ip and ( udp or tcp) and ether dst " + _ownMacAddr.ToString() +
                                                        " and not host " + _device.getIpV4Address().Address.ToString());
            _forwardingListener.StartCapture(Forwarder);
        }
示例#2
0
        private void StartPacketCounting()
        {
            _udpPacketCount = 0;
            _tcpPacketCount = 0;
            _dnsPacketCount = 0;
            updateGUI();

            _tcpListener = new Listener(getCurrentDevice(), "ip and tcp");
            _tcpListener.StartCapture(PacketHandlerTCP);
            _udpListener = new Listener(getCurrentDevice(), "ip and udp");
            _udpListener.StartCapture(PacketHandlerUDP);
            _dnsListener = new Listener(getCurrentDevice(), "ip and udp and port 53");
            _dnsListener.StartCapture(PacketHandlerDNS);
        }
示例#3
-1
        //constructors
        public ArpPoisoner(LivePacketDevice device, Target Gateway)
        {
            _device = device;
            _gateway = Gateway;
            _ownMacAddr = _device.GetMacAddress();

            _bgWorker = new BackgroundWorker();
            _bgWorker.WorkerSupportsCancellation = true;
            _bgWorker.DoWork += new DoWorkEventHandler(DoWork);

            _targets = new List<Target>();
            _dnsSpoofingList = new DNSspoofingList();

            _forwardingListener = new Listener.Listener(device, "ip and ( udp or tcp) and ether dst " + _ownMacAddr.ToString() +
                " and not host " + _device.getIpV4Address().Address.ToString());
            _forwardingListener.StartCapture(Forwarder);
        }