#mac-address #mac #bluetooth #address #networking #interface

mac_conditions

Obtain the MAC address by matching the conditions

1 stable release

1.0.0 May 22, 2024

#10 in #mac-address

Download history 138/week @ 2024-05-19 2/week @ 2024-05-26

140 downloads per month

MIT/Apache

6KB
88 lines

mac_conditions

Supported platforms: Any version of Windows that supports WMIC.

Example

use mac_conditions;

fn main() {
    let (wired_mac, wireless_mac, bluetooth_mac) = mac_conditions::get_mac_addresses();
    println!("wired_mac: {:?}", wired_mac);
    println!("wireless_mac: {:?}", wireless_mac);
    println!("bluetooth_mac: {:?}", bluetooth_mac);
}

conditions.yaml

conditions:  
  - adapter_type: wired  
    keywords:  
      - ["gbe", "true"]  
  - adapter_type: wireless  
    keywords:  
      - ["wi-fi", "true"]  
      - ["wi-fi", "ax"]  
      - ["wireless", "true"]  
  - adapter_type: bluetooth  
    keywords:  
      - ["bluetooth", "true"]

License

mac_conditions is licensed under both MIT and Apache 2.0

Dependencies

~4–6MB
~109K SLoC