mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
pm3 script for linux: alternative if udevadm is not available (termux)
This commit is contained in:
parent
c8e281cb6b
commit
4edea34b6b
1 changed files with 13 additions and 4 deletions
9
pm3
9
pm3
|
@ -31,12 +31,21 @@ function get_pm3_list_Linux {
|
||||||
N=$1
|
N=$1
|
||||||
PM3LIST=()
|
PM3LIST=()
|
||||||
for DEV in $(find /dev/ttyACM* 2>/dev/null); do
|
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
|
if udevadm info -q property -n "$DEV" | grep -q "ID_VENDOR=proxmark.org"; then
|
||||||
PM3LIST+=("$DEV")
|
PM3LIST+=("$DEV")
|
||||||
if [ ${#PM3LIST[*]} -ge $N ]; then
|
if [ ${#PM3LIST[*]} -ge $N ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
if grep -q "PRODUCT=9ac4/4b8f" "/sys/class/tty/${DEV#/dev/}/../../uevent" 2>/dev/null; then
|
||||||
|
PM3LIST+=("$DEV")
|
||||||
|
if [ ${#PM3LIST[*]} -ge $N ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
if $FINDBTDONGLE; then
|
if $FINDBTDONGLE; then
|
||||||
# check if the HC-06-USB white dongle is present (still, that doesn't tell us if it's paired with a Proxmark3...)
|
# check if the HC-06-USB white dongle is present (still, that doesn't tell us if it's paired with a Proxmark3...)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue