Exemplo n.º 1
0
    def process(self,  mac, frame):
        """
        It processes the received frame.
        """
        radio_tap = dot11.RadioTap(frame)
        buf = radio_tap.get_body_as_string()

        d11 = dot11.Dot11(buf)
        if d11.get_type() != dot11.Dot11Types.DOT11_TYPE_MANAGEMENT:
            return
            
        if d11.get_subtype() != dot11.Dot11Types().DOT11_SUBTYPE_MANAGEMENT_BEACON:
            return

        buf = d11.get_body_as_string()
        mgt = dot11.Dot11ManagementFrame(buf)
        bssid = mgt.get_bssid()
        bssid_str = bssid.tostring()
        
        # Check if the access point was already counted.
        if self.bssids.has_key(bssid_str):
            return

        self.bssids[bssid_str] = ""

        channel = helpers.get_channel_from_frame(frame)
        if channel == -1:
            return
           
        self.add(channel, 0, 1)
Exemplo n.º 2
0
 def process(self,  mac, frame):
     """
     It processes the received frame.
     """
     channel = helpers.get_channel_from_frame(frame)
     if channel == -1:
         return
     self.add(channel, 0, 1)
Exemplo n.º 3
0
 def process(self, mac, frame):
     """
     It processes the received frame.
     """
     channel = helpers.get_channel_from_frame(frame)
     if channel == -1:
         return
     self.add(channel, 0, 1)
    def process(self,  mac, frame):
        """
        It processes the received frame.
        """
        radio_tap = dot11.RadioTap(frame) 
        buf = radio_tap.get_body_as_string()
        d11 = dot11.Dot11(buf)

        if d11.get_type() != dot11.Dot11Types.DOT11_TYPE_DATA:
            return 
            
        channel = helpers.get_channel_from_frame(frame)
        if channel == -1:
            return
           
        if not d11.is_QoS_frame():
            self.add(channel, 0, 1)
        else:    
            self.add(channel, 1, 1)
    def process(self, mac, frame):
        """
        It processes the received frame.
        """
        radio_tap = dot11.RadioTap(frame)
        buf = radio_tap.get_body_as_string()
        d11 = dot11.Dot11(buf)

        if d11.get_type() != dot11.Dot11Types.DOT11_TYPE_DATA:
            return

        channel = helpers.get_channel_from_frame(frame)
        if channel == -1:
            return

        if not d11.is_QoS_frame():
            self.add(channel, 0, 1)
        else:
            self.add(channel, 1, 1)