Example #1
0
 public PacketWrapper(TcpRecon tcpRecon)
 {
     Count      = ++CaptureForm.packetCount;
     ipPacket   = tcpRecon.IpPacket;
     rawCapture = tcpRecon.RawCapture;
     tcpPacket  = tcpRecon.TcpPacket;
     Msg        = tcpRecon.Msg.ToString();
 }
 public PacketWrapper(TcpRecon tcpRecon)
 {
     Count = ++CaptureForm.packetCount;
     ipPacket = tcpRecon.IpPacket;
     rawCapture = tcpRecon.RawCapture;
     tcpPacket = tcpRecon.TcpPacket;
     Msg = tcpRecon.Msg.ToString();
 }
        public CaptureForm()
        {
            InitializeComponent();

            foreach (IPAddress ip in Dns.GetHostEntry(Dns.GetHostName()).AddressList)
            {
                if (ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
                {
                    CaptureForm.MyIp = ip;
                    break;
                }
            }

            rbEveryPacket_CheckedChanged(rbEveryPacket, null);
            dataGridView.DataSource = bs;
            _device.OnPacketArrival += device_OnPacketArrival;
            _device.OnCaptureStopped += device_OnCaptureStopped;
            _device.Open();
            //device.Filter = "src port 9339";
            _device.Filter = string.Format("host {0} and tcp port {1}", TARGET_HOST, TARGET_PORT);
            _tcpRecon = new TcpRecon(this);

            StartCapture();
        }
Example #4
0
        public CaptureForm()
        {
            InitializeComponent();

            foreach (IPAddress ip in Dns.GetHostEntry(Dns.GetHostName()).AddressList)
            {
                if (ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
                {
                    CaptureForm.MyIp = ip;
                    break;
                }
            }

            rbEveryPacket_CheckedChanged(rbEveryPacket, null);
            dataGridView.DataSource   = bs;
            _device.OnPacketArrival  += device_OnPacketArrival;
            _device.OnCaptureStopped += device_OnCaptureStopped;
            _device.Open();
            //device.Filter = "src port 9339";
            _device.Filter = string.Format("host {0} and tcp port {1}", TARGET_HOST, TARGET_PORT);
            _tcpRecon      = new TcpRecon(this);

            StartCapture();
        }