mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
tests: python3 compatible str/bytes ord()
Need to skip ord() for python3 when going through bytes object (instead of str object in python2). Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
95d013f530
commit
c45b969d6a
@ -8,6 +8,7 @@ from remotehost import remote_compatible
|
|||||||
import logging
|
import logging
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
import struct
|
import struct
|
||||||
|
import sys
|
||||||
|
|
||||||
import hwsim_utils
|
import hwsim_utils
|
||||||
import hostapd
|
import hostapd
|
||||||
@ -201,7 +202,8 @@ def test_tspec_protocol(dev, apdev):
|
|||||||
msg['sa'] = apdev[0]['bssid']
|
msg['sa'] = apdev[0]['bssid']
|
||||||
|
|
||||||
# modified parameters
|
# modified parameters
|
||||||
msg['payload'] = struct.pack('BBBB', 17, 1, dialog, 1) + payload[4:12] + struct.pack('B', ord(payload[12]) & ~0x60) + payload[13:]
|
p12int = payload[12] if sys.version_info[0] > 2 else ord(payload[12])
|
||||||
|
msg['payload'] = struct.pack('BBBB', 17, 1, dialog, 1) + payload[4:12] + struct.pack('B', p12int & ~0x60) + payload[13:]
|
||||||
hapd.mgmt_tx(msg)
|
hapd.mgmt_tx(msg)
|
||||||
|
|
||||||
# reject request
|
# reject request
|
||||||
|
Loading…
Reference in New Issue
Block a user