From 92917a4bbd6ab315f44423ebebf3223afb327cce Mon Sep 17 00:00:00 2001 From: ZhaoChunsheng <9263377+ChunshengZhao@users.noreply.github.com> Date: Sat, 9 Jun 2018 22:40:51 +0800 Subject: [PATCH] [wpa.py] Fixed TypeError in python3 "TypeError: cannot use a string pattern on a bytes-like object" The exception only happens in python3, python2 is all right. --- wifite/attack/wpa.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wifite/attack/wpa.py b/wifite/attack/wpa.py index 5403c4f..282c762 100755 --- a/wifite/attack/wpa.py +++ b/wifite/attack/wpa.py @@ -187,8 +187,8 @@ class AttackWPA(Attack): current_key = '' while crack_proc.poll() is None: line = crack_proc.pid.stdout.readline() - match_nums = aircrack_nums_re.search(line) - match_keys = aircrack_key_re.search(line) + match_nums = aircrack_nums_re.search(line.decode('utf-8')) + match_keys = aircrack_key_re.search(line.decode('utf-8')) if match_nums: num_tried = int(match_nums.group(1)) num_total = int(match_nums.group(2))