From 5e85d53c3e272f280f689d7f38dc2ce48e9aecbb Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 18 Nov 2019 13:11:28 +0100 Subject: [PATCH] pm3 serial detection on OS X more robust Official firmwares < 2018.02 had a different USB Model string (PM3<>proxmark3). Better to detect based on the vendor string (proxmark.org) which is more stable, to ease reflashing devices with old firmwares to the RDV4 firmware. --- pm3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pm3 b/pm3 index a03b3351e..d40fb0a91 100755 --- a/pm3 +++ b/pm3 @@ -29,7 +29,9 @@ function get_pm3_list_Linux { function get_pm3_list_macOS { PM3LIST=() - for DEV in $(ioreg -r -n proxmark3 -l|awk -F '"' '/IODialinDevice/{print $4}'); do + for DEV in $(ioreg -r -c "IOUSBHostDevice" -l|awk -F '"' ' + $2=="USB Vendor Name"{b=($4=="proxmark.org")} + b==1 && $2=="IODialinDevice"{print $4}'); do PM3LIST+=("$DEV") done }