mac_conditions

Obtain the MAC address by matching the conditions

1 stable release

1.0.0 May 22, 2024

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–5.5MB
~107K SLoC