示例#1
0
 def is_interface_wiiu_compatible(cls, interface):
     if not OsUtil.is_linux():
         Logger.extra("Ignoring interface compatibility check for %s",
                      interface)
         return False
     frequency_info = ProcessUtil.get_output(
         ["iwlist", interface, "frequency"])
     return "5." in frequency_info
示例#2
0
 def wpa_cli(command):
     """
     Makes a system call to wpa_cli_drc
     :param command: command to pass to wpa_cli_drc
     :return: command output
     """
     if isinstance(command, str):
         command = [command]
     return ProcessUtil.get_output(
         ["wpa_cli_drc", "-p", "/var/run/wpa_supplicant_drc"] + command,
         silent=True)
示例#3
0
 def get_device_unmanaged_entry(cls, interface):
     # Ubuntu 17.04+ and any other Distro after 2017 randomizes the MAC address of the device each time network manager restarts.
     # No Python Library is able to get the Hardware Address so I needed to use a Linux Command
     hwaddress = ProcessUtil.get_output(["ethtool", "-P", interface])
     hwaddressstr = hwaddress[-18:]
     return "interface-name:" + interface + ";mac:" + hwaddressstr