Ejemplo n.º 1
0
        public ProbePacket(PacketDotNet.Ieee80211.ProbeRequestFrame probeRequestFrame, DateTime TimeStamp)
        {
            this.ProbeRequestFrame = probeRequestFrame;
            this.TimeStamp         = TimeStamp;

            foreach (InformationElement element in ProbeRequestFrame.InformationElements)
            {
                switch (element.Id)
                {
                case InformationElement.ElementId.VendorSpecific:
                {
                    VendorSpecificManufacturer = OuiParser.GetOuiByMac(element.Value);
                    break;
                }

                case InformationElement.ElementId.ServiceSetIdentity:
                {
                    SSID = ASCIIEncoding.ASCII.GetString(element.Value);

                    if (SSID != null && SSID.Length > 0)
                    {
                        IsHidden = SSID[0] == 0;
                    }
                    else if (SSID == "")
                    {
                        IsHidden = true;
                    }
                    break;
                }
                }
            }
        }
Ejemplo n.º 2
0
        public MainForm()
        {
            InitializeComponent();
            OuiParser.Initialize("./Data/OUI.txt");
            this.CapFiles     = new List <CapFile>();
            this.GpsLocations = new List <GpsLocation>();

            RefreshAll();
        }
Ejemplo n.º 3
0
        public BeaconFrame(PacketDotNet.Ieee80211.BeaconFrame frame, DateTime TimeStamp)
        {
            this.Frame        = frame;
            this.Manufacturer = OuiParser.GetOuiByMac(frame.SourceAddress.GetAddressBytes());
            this.MacAddress   = frame.SourceAddress.GetAddressBytes();
            this.TimeStamp    = TimeStamp;

            foreach (InformationElement element in frame.InformationElements)
            {
                switch (element.Id)
                {
                case InformationElement.ElementId.ServiceSetIdentity:
                {
                    SSID = ASCIIEncoding.ASCII.GetString(element.Value);

                    if (SSID != null && SSID.Length > 0)
                    {
                        IsHidden = SSID[0] == 0;
                    }
                    break;
                }

                case InformationElement.ElementId.DsParameterSet:
                {
                    if (element.Value != null && element.Value.Length >= 3)
                    {
                        Channel = element.Value[2];
                    }
                    break;
                }

                case InformationElement.ElementId.VendorSpecific:
                {
                    //correct me if I was wrong here...
                    if (element.Bytes.Length > 5)
                    {
                        if (element.Bytes[5] == 4)
                        {
                            WPS_Enabled = true;
                        }
                    }
                    break;
                }
                }
            }

            if (String.IsNullOrEmpty(SSID))
            {
                SSID = "";
            }
        }