mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-26 17:16:22 +08:00
Added the original VID and PID values
This commit is contained in:
parent
abbbbcebc9
commit
59ab2f3387
1 changed files with 24 additions and 0 deletions
24
pm3
24
pm3
|
@ -155,6 +155,15 @@ function get_pm3_list_Windows {
|
|||
return
|
||||
fi
|
||||
done
|
||||
|
||||
# Original SERIAL PORTS (COM)
|
||||
for DEV in $(wmic /locale:ms_409 path Win32_SerialPort Where "PNPDeviceID LIKE '%VID_2D2D&PID_504D%'" Get DeviceID 2>/dev/null | awk -b '/^COM/{print $1}'); do
|
||||
DEV=${DEV/ */}
|
||||
PM3LIST+=("$DEV")
|
||||
if [ ${#PM3LIST[*]} -ge "$N" ]; then
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
#white BT dongle SERIAL PORTS (COM)
|
||||
if $FINDBTDONGLE; then
|
||||
|
@ -205,6 +214,21 @@ function get_pm3_list_WSL {
|
|||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Original SERIAL PORTS (COM)
|
||||
for DEV in $($PSHEXE -command "Get-CimInstance -ClassName Win32_serialport | Where-Object PNPDeviceID -like '*VID_2D2D&PID_504D*' | Select DeviceID" 2>/dev/null | sed -nr 's#^COM([0-9]+)\b#/dev/ttyS\1#p'); do
|
||||
# ttyS counterpart takes some more time to appear
|
||||
if [ -e "$DEV" ]; then
|
||||
PM3LIST+=("$DEV")
|
||||
if [ ! -w "$DEV" ]; then
|
||||
echo "[!] Let's give users read/write access to $DEV"
|
||||
sudo chmod 666 "$DEV"
|
||||
fi
|
||||
if [ ${#PM3LIST[*]} -ge "$N" ]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
#white BT dongle SERIAL PORTS (COM)
|
||||
if $FINDBTDONGLE; then
|
||||
|
|
Loading…
Reference in a new issue