proxmark3.sh for WSL: handle case when chmod is needed

This commit is contained in:
Philippe Teuwen 2019-07-14 17:58:47 +02:00
parent 55602bf833
commit d746847d13
2 changed files with 5 additions and 0 deletions

View file

@ -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.

View file

@ -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
}