mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 19:04:02 -05:00
tests: Use hostapd.remove_bss() instead of HostapdGlobal() (WPS)
This makes ap_wps_twice more usable for testing with remote hosts. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
This commit is contained in:
parent
84f3f3a5e6
commit
01703a9f2f
@ -292,8 +292,7 @@ def test_ap_wps_twice(dev, apdev):
|
|||||||
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
params = { "ssid": ssid, "eap_server": "1", "wps_state": "2",
|
||||||
"wpa_passphrase": "12345678", "wpa": "2",
|
"wpa_passphrase": "12345678", "wpa": "2",
|
||||||
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" }
|
"wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" }
|
||||||
hostapd.add_ap(apdev[0], params)
|
hapd = hostapd.add_ap(apdev[0], params)
|
||||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
||||||
logger.info("WPS provisioning step")
|
logger.info("WPS provisioning step")
|
||||||
hapd.request("WPS_PBC")
|
hapd.request("WPS_PBC")
|
||||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||||
@ -303,11 +302,9 @@ def test_ap_wps_twice(dev, apdev):
|
|||||||
dev[0].request("DISCONNECT")
|
dev[0].request("DISCONNECT")
|
||||||
|
|
||||||
logger.info("Restart AP with different passphrase and re-run WPS")
|
logger.info("Restart AP with different passphrase and re-run WPS")
|
||||||
hapd_global = hostapd.HostapdGlobal()
|
hostapd.remove_bss(apdev[0])
|
||||||
hapd_global.remove(apdev[0]['ifname'])
|
|
||||||
params['wpa_passphrase'] = 'another passphrase'
|
params['wpa_passphrase'] = 'another passphrase'
|
||||||
hostapd.add_ap(apdev[0], params)
|
hapd = hostapd.add_ap(apdev[0], params)
|
||||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
||||||
logger.info("WPS provisioning step")
|
logger.info("WPS provisioning step")
|
||||||
hapd.request("WPS_PBC")
|
hapd.request("WPS_PBC")
|
||||||
dev[0].dump_monitor()
|
dev[0].dump_monitor()
|
||||||
|
Loading…
Reference in New Issue
Block a user