I forked the wifiscanner crate and removed all CLI dependencies
Hi,
I recently forked the wifiscanner crate, which lets users scan for WiFi hotspots. It has more than 220k downloads on crates.io but depends on command-line utilities on all platforms (iw on Linux, netsh on Windows, and airport on macOS). This caused a lot of issues: Windows had to be set to English, Linux didn’t report network security, and the airport tool on macOS had been removed more than 2 years ago. Also, the output of those utilities could be changed at any time which would completely break the library.
So, for a Hackathon organized by Hack Club, I decided to fork the library and improve it.
For Windows, macOS and Linux, I completely removed the dependency on external command-line tools and switched to native system interfaces.
- On Windows, I use win32_wlan together with libwifi.
- On Linux, I use nl80211-rs and netlink-rs to talk directly to the kernel.
- On macOS, I’m using objc2-core-wlan, but it still has a major issue where it cannot show the BSSID or SSID of networks (to prevent programs from locating the machine).
My fork is called wifi_scan, you can find it on GitHub or crates.io. Feedback and any help, especially with improving macOS support, is very welcome.