003 File Manager
Current Path:
/usr/src/contrib/wpa/wpa_supplicant/examples
usr
/
src
/
contrib
/
wpa
/
wpa_supplicant
/
examples
/
📁
..
📄
60_wpa_supplicant
(267 B)
📄
dbus-listen-preq.py
(1.68 KB)
📄
dpp-qrcode.py
(4.02 KB)
📄
ieee8021x.conf
(269 B)
📄
openCryptoki.conf
(1.12 KB)
📁
p2p
📄
p2p-action-udhcp.sh
(1.68 KB)
📄
p2p-action.sh
(2.63 KB)
📄
p2p-nfc.py
(19.82 KB)
📄
plaintext.conf
(133 B)
📄
udhcpd-p2p.conf
(2.86 KB)
📄
wep.conf
(170 B)
📄
wpa-psk-tkip.conf
(181 B)
📄
wpa2-eap-ccmp.conf
(284 B)
📄
wpas-dbus-new-getall.py
(1.73 KB)
📄
wpas-dbus-new-signals.py
(5.94 KB)
📄
wpas-dbus-new-wps.py
(2.18 KB)
📄
wpas-dbus-new.py
(4.18 KB)
📄
wps-ap-cli
(1.15 KB)
📄
wps-nfc.py
(15.38 KB)
Editing: wpas-dbus-new-getall.py
#!/usr/bin/python import dbus import sys, os import time import gobject def main(): bus = dbus.SystemBus() wpas_obj = bus.get_object("fi.w1.wpa_supplicant1", "/fi/w1/wpa_supplicant1") props = wpas_obj.GetAll("fi.w1.wpa_supplicant1", dbus_interface=dbus.PROPERTIES_IFACE) print("GetAll(fi.w1.wpa_supplicant1, /fi/w1/wpa_supplicant1):") print(props) if len(sys.argv) != 2: os._exit(1) ifname = sys.argv[1] wpas = dbus.Interface(wpas_obj, "fi.w1.wpa_supplicant1") path = wpas.GetInterface(ifname) if_obj = bus.get_object("fi.w1.wpa_supplicant1", path) props = if_obj.GetAll("fi.w1.wpa_supplicant1.Interface", dbus_interface=dbus.PROPERTIES_IFACE) print('') print("GetAll(fi.w1.wpa_supplicant1.Interface, %s):" % (path)) print(props) props = if_obj.GetAll("fi.w1.wpa_supplicant1.Interface.WPS", dbus_interface=dbus.PROPERTIES_IFACE) print('') print("GetAll(fi.w1.wpa_supplicant1.Interface.WPS, %s):" % (path)) print(props) res = if_obj.Get("fi.w1.wpa_supplicant1.Interface", 'BSSs', dbus_interface=dbus.PROPERTIES_IFACE) if len(res) > 0: bss_obj = bus.get_object("fi.w1.wpa_supplicant1", res[0]) props = bss_obj.GetAll("fi.w1.wpa_supplicant1.BSS", dbus_interface=dbus.PROPERTIES_IFACE) print('') print("GetAll(fi.w1.wpa_supplicant1.BSS, %s):" % (res[0])) print(props) res = if_obj.Get("fi.w1.wpa_supplicant1.Interface", 'Networks', dbus_interface=dbus.PROPERTIES_IFACE) if len(res) > 0: net_obj = bus.get_object("fi.w1.wpa_supplicant1", res[0]) props = net_obj.GetAll("fi.w1.wpa_supplicant1.Network", dbus_interface=dbus.PROPERTIES_IFACE) print('') print("GetAll(fi.w1.wpa_supplicant1.Network, %s):" % (res[0])) print(props) if __name__ == "__main__": main()
Upload File
Create Folder