mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-12-01 11:48:23 -05:00
5be9dcbb86
Only run-tests.py is actually executed, so there is no need to specify the interpreter in all the helper files and test script files. Signed-off-by: Jouni Malinen <j@w1.fi>
25 lines
758 B
Python
25 lines
758 B
Python
# Dynamic wpa_supplicant interface
|
|
# Copyright (c) 2013, Jouni Malinen <j@w1.fi>
|
|
#
|
|
# This software may be distributed under the terms of the BSD license.
|
|
# See README for more details.
|
|
|
|
import logging
|
|
logger = logging.getLogger()
|
|
import time
|
|
|
|
import hwsim_utils
|
|
import hostapd
|
|
from wpasupplicant import WpaSupplicant
|
|
|
|
def test_sta_dynamic(dev, apdev):
|
|
"""Dynamically added wpa_supplicant interface"""
|
|
params = hostapd.wpa2_params(ssid="sta-dynamic", passphrase="12345678")
|
|
hostapd.add_ap(apdev[0]['ifname'], params)
|
|
|
|
logger.info("Create a dynamic wpa_supplicant interface and connect")
|
|
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
|
wpas.interface_add("wlan5")
|
|
|
|
wpas.connect("sta-dynamic", psk="12345678", scan_freq="2412")
|