Esempio n. 1
0
    def send_assoc_response(self, pkt):

        # Get RSN info
        temp_pkt = pkt[Dot11Elt::{"ID": 48}].copy()
        temp_pkt.remove_payload()
        self.RSN = raw(temp_pkt)
        # Avoid 802.11w, etc. (deactivate RSN capabilities)
        self.RSN = self.RSN[:-2] + "\x00\x00"

        rep = RadioTap()
        rep /= Dot11(addr1=self.client, addr2=self.mac, addr3=self.mac)
        rep /= Dot11AssoResp()
        rep /= Dot11Elt(ID="Rates", info='\x82\x84\x8b\x96\x0c\x12\x18$')

        self.send(rep)
Esempio n. 2
0
 def __init__(self, interface, bssid, essid=None):
     self.essid = essid
     self.privacy = PRIVACY_NONE
     self.backlog = 5  # sets a default incase listen() hasn't been called, which may be the case if we're responding to multiple network probes
     self.max_tries = 3
     self.asso_resp_data = Dot11AssoResp(
         cap='ESS+short-preamble+short-slot') / Dot11Elt(
             ID=1, info='\x02\x04\x0b\x16\x0c\x12\x18$') / Dot11Elt(
                 ID=50, info='0H`l')
     WirelessStateMachine.__init__(self, interface, bssid, bssid, None)
     if essid:
         self.networkDescriptor = WirelessNetwork(essid, bssid)
     else:
         self.networkDescriptor = WirelessNetwork(
             UNKNOWN_SSID_NAME, bssid)  # this is kind of lame
Esempio n. 3
0
    def send_assoc_response(self, pkt):

        # Get RSN info
        temp_pkt = pkt[Dot11Elt::{"ID": 48}].copy()
        temp_pkt.remove_payload()
        self.RSN = raw(temp_pkt)
        # Avoid 802.11w, etc. (deactivate RSN capabilities)
        self.RSN = self.RSN[:-2] + "\x00\x00"

        rep = RadioTap()
        rep /= Dot11(addr1=self.client, addr2=self.mac, addr3=self.mac)
        rep /= Dot11AssoResp()
        rep /= Dot11EltRates(rates=[130, 132, 139, 150, 12, 18, 24, 36])

        self.send(rep)