Refactor argument parser to allow setting channel hop interval with a new command-line option

This commit is contained in:
Yaro Kasear 2025-05-06 09:46:11 -05:00
parent 27d64d2bed
commit d538e10c9c

View file

@ -264,10 +264,10 @@ def main():
parser.add_argument("--monitor-iface", required=True, help="Monitor interface to sniff on")
parser.add_argument("--outfile", required=True, help="CSV file to append metrics row")
parser.add_argument("--include-probes", action="store_true", help="Include probe responses as valid APs")
parser.add_argument("--hop-interval", type=int, default=CHANNEL_HOP_INTERVAL, help="Interval for channel hopping (default: 5 seconds)")
group = parser.add_mutually_exclusive_group()
group.add_argument("--channel", type=int, help="Channel to lock monitor interface to")
group.add_argument("--channel-hop", action="store_true", help="Enable channel hopping")
group.add_argument("--hop-interval", type=int, default=CHANNEL_HOP_INTERVAL, help="Interval for channel hopping (default: 5 seconds)")
args = parser.parse_args()