mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-29 11:52:59 +08:00
Add support for automatic COM detection on Windows
This commit is contained in:
parent
b814653eed
commit
f5f9d9f0c0
2 changed files with 16 additions and 0 deletions
|
@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
|
|||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||
|
||||
## [unreleased][unreleased]
|
||||
- Add support for automatic COM detection on Windows (@slurdge)
|
||||
- Add support for compilation on RaspberryPiZero (armv6) (@doegox)
|
||||
- Change: updates to README (@iceman)
|
||||
- Change: hf mf/mfu dbg => hw dbg (@doegox)
|
||||
|
|
15
proxmark3.sh
15
proxmark3.sh
|
@ -28,6 +28,19 @@ function wait4proxmark_macOS {
|
|||
echo $PM3
|
||||
}
|
||||
|
||||
function wait4proxmark_Windows {
|
||||
echo >&2 "Waiting for Proxmark to appear..."
|
||||
while true; do
|
||||
device=$(wmic path Win32_SerialPort get DeviceID,PNPDeviceID 2>/dev/null | awk 'NR==2')
|
||||
if [[ $device =~ VID_9AC4\&PID_4B8F ]]; then
|
||||
PM3=${device/ */}
|
||||
break
|
||||
fi
|
||||
sleep .1
|
||||
done
|
||||
echo $PM3
|
||||
}
|
||||
|
||||
SCRIPT=$(basename -- "$0")
|
||||
|
||||
if [ "$SCRIPT" = "proxmark3.sh" ]; then
|
||||
|
@ -51,6 +64,8 @@ if [ "$HOSTOS" = "LINUX" ]; then
|
|||
PORT=$(wait4proxmark_Linux)
|
||||
elif [ "$HOSTOS" = "DARWIN" ]; then
|
||||
PORT=$(wait4proxmark_macOS)
|
||||
elif [[ "$HOSTOS" =~ MINGW(32|64)_NT* ]]; then
|
||||
PORT=$(wait4proxmark_Windows)
|
||||
else
|
||||
echo "Host OS not recognized, abort: $HOSTOS"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in a new issue