?¡ëPNG  IHDR ? f ??C1 sRGB ??¨¦ gAMA ¡À? ¨¹a pHYs ? ??o¡§d GIDATx^¨ª¨¹L¡±¡Âe¡ÂY?a?("Bh?_¨°???¡é¡ì?q5k?*:t0A-o??£¤]VkJ¡éM??f?¡À8\k2¨ªll¡ê1]q?¨´???T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/user1137782/www/china1.by/classwithtostring.php on line 86

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
#!/usr/bin/python import sys NM_DBUS_PATH = "/org/freedesktop/NetworkManager" NM_DBUS_INTERFACE = "org.freedesktop.NetworkManager" NM_DBUS_SERVICE_SYSTEM_SETTINGS = "org.freedesktop.NetworkManagerSystemSettings" NM_DBUS_SERVICE_USER_SETTINGS = "org.freedesktop.NetworkManagerUserSettings" NM_DBUS_IFACE_DEVICE = "org.freedesktop.NetworkManager.Device" NM_DBUS_IFACE_DEVICE_WIRED = "org.freedesktop.NetworkManager.Device.Wired" NM_DBUS_IFACE_DEVICE_WIRELESS = "org.freedesktop.NetworkManager.Device.Wireless" NM_DEVICE_TYPE_UNKNOWN = 0 NM_DEVICE_TYPE_ETHERNET = 1 NM_DEVICE_TYPE_WIFI = 2 NM_DEVICE_TYPE_GSM = 3 NM_DEVICE_TYPE_CDMA = 4 nm_device_type = { NM_DEVICE_TYPE_UNKNOWN: "unknown type", NM_DEVICE_TYPE_ETHERNET: "wired Ethernet", NM_DEVICE_TYPE_WIFI: "802.11 WiFi", NM_DEVICE_TYPE_GSM: "GSM-based cellular WAN", NM_DEVICE_TYPE_CDMA: "CDMA/IS-95-based cellular WAN" } ##### import dbus bus = dbus.SystemBus() def device_list(): devices = { } for service in [ NM_DBUS_SERVICE_SYSTEM_SETTINGS, NM_DBUS_SERVICE_USER_SETTINGS ]: proxy = bus.get_object(service, NM_DBUS_PATH) iface = dbus.Interface(proxy, dbus_interface=NM_DBUS_INTERFACE) try: device_list = iface.GetDevices() except: continue for c in device_list: proxy = bus.get_object(service, c) properties = dbus.Interface(proxy, dbus_interface='org.freedesktop.DBus.Properties') interface = properties.Get(NM_DBUS_IFACE_DEVICE, 'Interface') device_type = properties.Get(NM_DBUS_IFACE_DEVICE, 'DeviceType') if device_type == NM_DEVICE_TYPE_ETHERNET: hwaddr = properties.Get(NM_DBUS_IFACE_DEVICE_WIRED, 'HwAddress') elif device_type == NM_DEVICE_TYPE_WIFI: hwaddr = properties.Get(NM_DBUS_IFACE_DEVICE_WIRELESS, 'HwAddress') else: continue devices[str(interface)] = { "type": nm_device_type[device_type], "hwaddr": str(hwaddr), } return devices