pm3: test access to /dev/ttyXXX files as prerequisite for linux

This commit is contained in:
Philippe Teuwen 2020-05-18 01:05:49 +02:00
commit 11f02967bc

4
pm3
View file

@ -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