mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-17 17:43:06 -05:00
fragattack: update test-inject to perform self-test as well
This commit is contained in:
parent
2b18bfdff5
commit
c23fd0ae92
@ -1 +1 @@
|
||||
Subproject commit 712daee7e5afed15cfeca1be03ee5946b8baa1b6
|
||||
Subproject commit 1b06e87920eac9380c9cfaaf0594c784bc7c30c8
|
@ -5,17 +5,21 @@ import argparse, time
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Test packet injection properties of a device.")
|
||||
parser.add_argument('inject', help="Interface to use to inject frames.")
|
||||
parser.add_argument('monitor', help="Interface to use to monitor for frames.")
|
||||
parser.add_argument('monitor', nargs='?', help="Interface to use to monitor for frames.")
|
||||
options = parser.parse_args()
|
||||
|
||||
subprocess.check_output(["rfkill", "unblock", "wifi"])
|
||||
|
||||
set_monitor_mode(options.inject)
|
||||
set_monitor_mode(options.monitor)
|
||||
|
||||
if get_channel(options.inject) != get_channel(options.monitor):
|
||||
log(ERROR, "Both devices are not on the same channel")
|
||||
quit(1)
|
||||
if options.monitor:
|
||||
set_monitor_mode(options.monitor)
|
||||
if get_channel(options.inject) != get_channel(options.monitor):
|
||||
log(ERROR, "Both devices are not on the same channel")
|
||||
quit(1)
|
||||
else:
|
||||
log(WARNING, "Only performing selftest. This can detect only injection issues caused by")
|
||||
log(WARNING, "the kernel. Many other issues cannot be detected in this self-test,so you")
|
||||
log(WARNING, "should not trust the output of the tests unless you know what you're doing.")
|
||||
|
||||
log(STATUS, "Performing injection tests ...")
|
||||
test_injection(options.inject, options.monitor, peermac="00:11:22:33:44:55")
|
||||
|
Loading…
x
Reference in New Issue
Block a user