From 306aee17072616c4d8be994f6902d1623eed1833 Mon Sep 17 00:00:00 2001 From: Ragnt Date: Tue, 12 Mar 2024 08:08:13 -0400 Subject: [PATCH] update nl80211-ng, add list for -b, implement channel set during startup. --- Cargo.toml | 2 +- src/main.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3cfec55..d564e80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ path = "src/main.rs" [dependencies] libwifi = { version = "0.3.1", path = "libs/libwifi" } pcap-file = { version = "2.0.0", path = "libs/pcap-file" } -nl80211-ng = ">=0.5.1" +nl80211-ng = ">=0.5.2" byteorder = "1.5.0" libc = "0.2.149" nix = { version = "0.27.1", features = [ diff --git a/src/main.rs b/src/main.rs index fcc2eb0..6dde363 100644 --- a/src/main.rs +++ b/src/main.rs @@ -114,7 +114,7 @@ struct Arguments { #[arg(short, long, use_value_delimiter = true, action = clap::ArgAction::Append)] /// Optional - Channel to scan. Will use "-c 1,6,11" if none specified. channel: Vec, - #[arg(short, long, name = "2 | 5 | 6 | 60")] + #[arg(short, long, name = "2 | 5 | 6 | 60", use_value_delimiter = true, action = clap::ArgAction::Append)] /// Optional - Entire band to scan - will include all channels interface can support. band: Vec, #[arg(short, help_heading = "Targeting", name = "Target MAC/SSID")] @@ -795,6 +795,10 @@ impl OxideRuntime { netlink.set_interface_up(idx).ok(); netlink.set_powersave_off(idx).ok(); + if let Err(e) = set_interface_chan(idx, hop_channels[0].1, hop_channels[0].0) { + eprintln!("{}", e); + } + // Setup OUI Database let oui_db = OuiDatabase::new(); println!("💲 OUI Records Imported: {}", oui_db.record_count());