From 11f02967bcae43f27912e1266e1c82db399268ea Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 18 May 2020 01:05:49 +0200 Subject: [PATCH] pm3: test access to /dev/ttyXXX files as prerequisite for linux --- pm3 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pm3 b/pm3 index 19399f0bd..7d2c5e5f7 100755 --- a/pm3 +++ b/pm3 @@ -30,6 +30,10 @@ SHOWLIST=false function get_pm3_list_Linux { N=$1 PM3LIST=() + if [ ! -c "/dev/tty0" ]; then + echo >&2 "[!!] Script cannot access /dev/ttyXXX files, insufficient privileges" + exit 1 + fi for DEV in $(find /dev/ttyACM* 2>/dev/null); do if which udevadm >/dev/null; then if udevadm info -q property -n "$DEV" | grep -q "ID_VENDOR=proxmark.org"; then