fragattacks: fix preauth client injection test

This commit is contained in:
Mathy Vanhoef 2020-07-13 05:24:41 +04:00 committed by Mathy Vanhoef
parent f88fd2476b
commit 4e29602da0

View File

@ -1134,14 +1134,14 @@ class Supplicant(Daemon):
# When using a separate interface to inject, switch to correct channel
self.follow_channel()
# With the ath9k_htc, injection in mixed managed/monitor only works after
# sending the association request. So only perform injection test now.
self.injection_test(self.station.bss, self.station.mac, False)
p = re.compile("Associated with (.*) successfully")
bss = p.search(msg).group(1)
self.station.handle_connecting(bss)
# With the ath9k_htc, injection in mixed managed/monitor only works after
# sending the association request. So only perform injection test now.
self.injection_test(self.station.bss, self.station.mac, False)
elif "EAPOL-TX" in msg:
cmd, srcaddr, payload = msg.split()
self.station.handle_eapol_tx(bytes.fromhex(payload))