//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); }
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); }
//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); }