MCPcopy
hub / github.com/geekcomputers/Python / testwifi

Function testwifi

wifi hack by brutefore.py:85–100  ·  view source on GitHub ↗
(ifaces, ssidname, password)

Source from the content-addressed store, hash-verified

83
84
85def testwifi(ifaces, ssidname, password):
86 profile = pywifi.Profile() # create a wifi connection file
87 profile.ssid = ssidname # define wifissid
88 profile.auth = open(const.AUTH_ALG_OPEN) # NIC
89 profile.akm.append(const.AKM_TYPE_WPA2PSK) # wifi encryption algorithm
90 # encrypting unit
91 profile.cipher = const.CIPHER_TYPE_CCMP #
92 profile.key = password # wifi password
93 ifaces.remove_all_network_profiles() # delete all other configuration files
94 tmp_profile = ifaces.add_network_profile(profile) # load the configuration file
95 ifaces.connect(tmp_profile) # wifi connection
96 # You can connect to the inner (5) # 5 seconds time.sleep
97 if ifaces.status() == const.IFACE_CONNECTED:
98 return True
99 else:
100 return False
101
102
103def beginwork(wifinamelist):

Callers 1

beginworkFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected