From 5fbbbc30ba13cf15832e72f6d94a83ccd6f8914d Mon Sep 17 00:00:00 2001 From: slurdge Date: Sat, 6 Jul 2019 15:31:32 +0200 Subject: [PATCH] Fix #224 --- proxmark3.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmark3.sh b/proxmark3.sh index ef056752b..b4aa51ffb 100755 --- a/proxmark3.sh +++ b/proxmark3.sh @@ -31,8 +31,8 @@ function wait4proxmark_macOS { function wait4proxmark_Windows { echo >&2 "Waiting for Proxmark to appear..." while true; do - device=$(wmic path Win32_SerialPort get DeviceID,PNPDeviceID 2>/dev/null | awk 'NR==2') - if [[ $device =~ VID_9AC4\&PID_4B8F ]]; then + device=$(wmic path Win32_SerialPort where "PNPDeviceID like '%VID_9AC4&PID_4B8F%'" get DeviceID,PNPDeviceID 2>/dev/null | awk 'NR==2') + if [[ $device != "" ]]; then PM3=${device/ */} break fi