Exemple #1
1
        // start listening on a device (combobox index)
        public void StartDevice(int deviceIndex)
        {
            Started = true;

            DeviceInfo = DeviceInfoList[deviceIndex];
            Device = WinPcapDeviceList.Instance[deviceIndex];

            Sniffer = new Sniffer(DeviceInfo);
            ARPTools = new ARPTools(DeviceInfo);
            NDTools = new NDTools(DeviceInfo);
            SSLStrip = new SSLStrip();
            Scanner = new Scanner(DeviceInfo);

            Sniffer.SnifferResult += new SnifferResultHandler(sniffer_OnSnifferResult);
            Scanner.ScannerResponse += new ScannerResponseReceived(scanner_OnResponse);
            Scanner.ScanComplete += new ScannerEventHandler(scanner_OnScanComplete);
            Scanner.HostnameResolved += new ScannerHostnameResolvedHandler(scanner_HostnameResolved);
            SSLStrip.SSLStripped += new SSLStripHandler(SSLStrip_OnSSLStripped);

            // open device, set filters & events, start capturing
            Device.Open(DeviceMode.Promiscuous, 1);
            Device.Filter = "(arp || ip || ip6)";

            Device.OnPacketArrival += new PacketArrivalEventHandler(device_OnPacketArrival);
            Device.StartCapture();
        }
Exemple #2
0
        // start listening on a device (combobox index)
        public void StartDevice(int deviceIndex)
        {
            Started = true;

            DeviceInfo = DeviceInfoList[deviceIndex];
            Device     = WinPcapDeviceList.Instance[deviceIndex];

            Sniffer  = new Sniffer(DeviceInfo);
            ARPTools = new ARPTools(DeviceInfo);
            NDTools  = new NDTools(DeviceInfo);
            SSLStrip = new SSLStrip();
            Scanner  = new Scanner(DeviceInfo);

            Sniffer.SnifferResult    += new SnifferResultHandler(sniffer_OnSnifferResult);
            Scanner.ScannerResponse  += new ScannerResponseReceived(scanner_OnResponse);
            Scanner.ScanComplete     += new ScannerEventHandler(scanner_OnScanComplete);
            Scanner.HostnameResolved += new ScannerHostnameResolvedHandler(scanner_HostnameResolved);
            SSLStrip.SSLStripped     += new SSLStripHandler(SSLStrip_OnSSLStripped);

            // open device, set filters & events, start capturing
            Device.Open(DeviceMode.Promiscuous, 1);
            Device.Filter = "(arp || ip || ip6)";

            Device.OnPacketArrival += new PacketArrivalEventHandler(device_OnPacketArrival);
            Device.StartCapture();
        }