mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 02:27:26 -07:00
Prevent double-enumeration under WSL2
This commit is contained in:
parent
e5adfb0b29
commit
fe98b3821f
1 changed files with 6 additions and 5 deletions
11
pm3
11
pm3
|
@ -68,11 +68,12 @@ function get_pm3_list_Linux {
|
|||
fi
|
||||
fi
|
||||
# WSL2 with usbipd detection - doesn't report same things as WSL1
|
||||
|
||||
if grep -q "proxmark.org" "/sys/class/tty/${DEV#/dev/}/../../../manufacturer" 2>/dev/null; then
|
||||
PM3LIST+=("$DEV")
|
||||
if [ ${#PM3LIST[*]} -ge "$N" ]; then
|
||||
return
|
||||
if !( echo "${PM3LIST[*]}" | grep -q "${DEV}" ); then
|
||||
PM3LIST+=("$DEV")
|
||||
if [ ${#PM3LIST[*]} -ge "$N" ]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
@ -474,7 +475,7 @@ fi
|
|||
|
||||
HOSTOS=$(uname | awk '{print toupper($0)}')
|
||||
if [ "$HOSTOS" = "LINUX" ]; then
|
||||
if uname -a|grep -qi Microsoft; then
|
||||
if uname -a|grep -q Microsoft; then
|
||||
# First try finding it using the PATH environment variable
|
||||
PSHEXE=$(command -v powershell.exe 2>/dev/null)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue