frattack: control over when macos test frames are sent

This commit is contained in:
Mathy 2020-04-23 12:38:54 -04:00 committed by Mathy Vanhoef
parent 4c124a728c
commit a4d62d03e8

View File

@ -313,11 +313,8 @@ class MacOsTest(Test):
""" """
See docs/macoxs-reversing.md for background on the attack. See docs/macoxs-reversing.md for background on the attack.
""" """
def __init__(self, ptype): def __init__(self, ptype, actions):
super().__init__([ super().__init__(actions)
Action(Action.BeforeAuth, enc=False),
Action(Action.BeforeAuth, enc=False)
])
self.ptype = ptype self.ptype = ptype
self.check_fn = None self.check_fn = None
@ -1219,7 +1216,13 @@ def prepare_tests(test_name, stractions, delay=0, inc_pn=0, as_msdu=False, ptype
test = LinuxTest(REQ_ICMP) test = LinuxTest(REQ_ICMP)
elif test_name == "macos": elif test_name == "macos":
test = MacOsTest(REQ_ICMP) if stractions != None:
actions = [Action(char2trigger(t), enc=False) for t in stractions]
else:
actions = [Action(Action.StartAuth, enc=False),
Action(Action.StartAuth, enc=False)]
test = MacOsTest(REQ_ICMP, actions)
elif test_name == "qca_test": elif test_name == "qca_test":
test = QcaDriverTest() test = QcaDriverTest()