mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
fragattack: bugfix: always send EAPOL to bss or sta MAC
This commit is contained in:
parent
e94b04ff57
commit
b934c6c17b
@ -343,7 +343,6 @@ class Station():
|
|||||||
log(STATUS, ">>> TEST COMPLETED SUCCESSFULLY", color="green")
|
log(STATUS, ">>> TEST COMPLETED SUCCESSFULLY", color="green")
|
||||||
self.test = None
|
self.test = None
|
||||||
|
|
||||||
# FIXME: EAPOL should not be send to peer_mac() always??
|
|
||||||
def send_mon(self, data, prior=1, plaintext=False):
|
def send_mon(self, data, prior=1, plaintext=False):
|
||||||
"""
|
"""
|
||||||
Right after completing the handshake, it occurred several times that our
|
Right after completing the handshake, it occurred several times that our
|
||||||
@ -502,8 +501,8 @@ class Station():
|
|||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def handle_eapol_tx(self, eapol):
|
def handle_eapol_tx(self, eapol, dstmac):
|
||||||
eapol = EAPOL(eapol)
|
eapol = Ether(dst=dstmac, src=self.mac)/EAPOL(eapol)
|
||||||
send_it = self.trigger_eapol_events(eapol)
|
send_it = self.trigger_eapol_events(eapol)
|
||||||
|
|
||||||
if send_it == None:
|
if send_it == None:
|
||||||
@ -1010,7 +1009,7 @@ class Authenticator(Daemon):
|
|||||||
if not clientmac in self.stations:
|
if not clientmac in self.stations:
|
||||||
log(WARNING, f"Sending EAPOL to unknown client {clientmac}.")
|
log(WARNING, f"Sending EAPOL to unknown client {clientmac}.")
|
||||||
return
|
return
|
||||||
self.stations[clientmac].handle_eapol_tx(bytes.fromhex(payload))
|
self.stations[clientmac].handle_eapol_tx(bytes.fromhex(payload), clientmac)
|
||||||
|
|
||||||
elif "AP-STA-CONNECTED" in msg:
|
elif "AP-STA-CONNECTED" in msg:
|
||||||
cmd, clientmac = msg.split()
|
cmd, clientmac = msg.split()
|
||||||
@ -1183,8 +1182,8 @@ class Supplicant(Daemon):
|
|||||||
self.injection_test(self.station.bss, self.station.mac, False)
|
self.injection_test(self.station.bss, self.station.mac, False)
|
||||||
|
|
||||||
elif "EAPOL-TX" in msg:
|
elif "EAPOL-TX" in msg:
|
||||||
cmd, srcaddr, payload = msg.split()
|
cmd, dstmac, payload = msg.split()
|
||||||
self.station.handle_eapol_tx(bytes.fromhex(payload))
|
self.station.handle_eapol_tx(bytes.fromhex(payload), dstmac)
|
||||||
|
|
||||||
# The "EAPOL processing" event only occurs with WEP
|
# The "EAPOL processing" event only occurs with WEP
|
||||||
if "WPA: Key negotiation completed with" in msg or \
|
if "WPA: Key negotiation completed with" in msg or \
|
||||||
|
Loading…
Reference in New Issue
Block a user