From d746847d134f9272c4c7565e9242c38b32e990a3 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 14 Jul 2019 17:58:47 +0200 Subject: [PATCH] proxmark3.sh for WSL: handle case when chmod is needed --- .../Windows-Installation-Instructions.md | 1 + proxmark3.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/md/Installation_Instructions/Windows-Installation-Instructions.md b/doc/md/Installation_Instructions/Windows-Installation-Instructions.md index eacdc4b62..db9a9084f 100644 --- a/doc/md/Installation_Instructions/Windows-Installation-Instructions.md +++ b/doc/md/Installation_Instructions/Windows-Installation-Instructions.md @@ -166,3 +166,4 @@ Or, by specifying the COM port manually: client/proxmark3 /dev/ttySX ``` +Note that it may take a quite long time for a freshly plugged Proxmark3 to be visible on a WSL /dev/ttySX port. diff --git a/proxmark3.sh b/proxmark3.sh index 39eb80779..b45887a23 100755 --- a/proxmark3.sh +++ b/proxmark3.sh @@ -51,6 +51,10 @@ function wait4proxmark_WSL { fi sleep .1 done + if [ -e "$PM3" ] && ! [ -w "$PM3" ]; then + echo "We need to give current user read/write access to $PM3" + sudo chmod 666 "$PM3" + fi echo $PM3 }