This is needed for python3.
Signed-off-by: Jouni Malinen <j@w1.fi>
# eloop before reading process memory.
time.sleep(1)
dev[0].ping()
+ password = password.encode()
buf = read_process_memory(pid, password)
dev[0].request("DISCONNECT")
buf = bytes()
logger.info("Reading process memory (pid=%d)" % pid)
with open('/proc/%d/maps' % pid, 'r') as maps, \
- open('/proc/%d/mem' % pid, 'r') as mem:
+ open('/proc/%d/mem' % pid, 'rb') as mem:
for l in maps.readlines():
m = re.match(r'([0-9a-f]+)-([0-9a-f]+) ([-r][-w][-x][-p])', l)
if not m:
return
prefix = 2048 if pos > 2048 else pos
- with open(fname + keyname, 'w') as f:
+ with open(fname + keyname, 'wb') as f:
f.write(buf[pos - prefix:pos + 2048])
raise Exception(keyname + " found after disassociation")
# EAP Re-authentication Protocol (ERP) tests
-# Copyright (c) 2014-2015, Jouni Malinen <j@w1.fi>
+# Copyright (c) 2014-2019, Jouni Malinen <j@w1.fi>
#
# This software may be distributed under the terms of the BSD license.
# See README for more details.
# eloop before reading process memory.
time.sleep(1)
dev[0].ping()
+ password = password.encode()
buf = read_process_memory(pid, password)
dev[0].request("DISCONNECT")
# eloop before reading process memory.
time.sleep(1)
dev[0].ping()
+ password = password.encode()
buf = read_process_memory(pid, password)
dev[0].request("DISCONNECT")