Skip to content

Commit

Permalink
research/fragattack: add --pre-test-delay parameter
Browse files Browse the repository at this point in the history
This parameter can be used each time a test needs to be delayed before
actually executing it.

Suggested-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
  • Loading branch information
angeloc committed Oct 7, 2021
1 parent fb22c8f commit 5af94ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion research/fragattack.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def prepare_tests(opt):
else: return None

# If requested, override delay and inc_pn parameters in the test.
test.set_general_options(opt.delay, opt.inc_pn)
test.set_general_options(opt.delay, opt.inc_pn, opt.pre_test_delay)

# If requested, override the ptype
if opt.ptype != None:
Expand Down Expand Up @@ -218,6 +218,7 @@ def get_expected_scapy_ver():
parser.add_argument('--to-self', default=False, action='store_true', help="Send ARP/DHCP/ICMP with same src and dst MAC address.")
parser.add_argument('--no-drivercheck', default=False, action='store_true', help="Don't check if patched drivers are being used.")
parser.add_argument('--stay-up', default=False, action='store_true', help="Don't quit when test has finished.")
parser.add_argument('--pre-test-delay', type=int, default=0, help="Delay before launching the test")
options = parser.parse_args()

# Check if we're using the expected scapy version
Expand Down

0 comments on commit 5af94ca

Please sign in to comment.