WSL: detect auth problems to run wmic

This commit is contained in:
Philippe Teuwen 2019-09-24 11:45:38 +02:00
parent 7870dd6fc0
commit e95186e5c7
2 changed files with 9 additions and 0 deletions

View file

@ -68,6 +68,8 @@ Install WSL with e.g. the standard Ubuntu.
For WSL configuration, see [Manage and configure Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/wsl-config).
Make sure your WSL can launch Windows processes to get the `pm3` scripts working (cf `interop` in the WSL settings).
## X Server Installation
If you want to run the graphical components of the Proxmark3 client, you need to install a X Server such as [VcXsrv](https://sourceforge.net/projects/vcxsrv/) or [Xming](https://sourceforge.net/projects/xming/) and launch it, e.g. by executing XLaunch.

7
pm3
View file

@ -54,6 +54,13 @@ function wait4proxmark_Windows {
}
function wait4proxmark_WSL {
# Test presence of wmic
wmic.exe computersystem get name >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "[!] Cannot run wmic.exe, are you sure your WSL is authorized to run Windows processes? (cf WSL interop flag)"
exit 1
fi
echo >&2 "[=] Waiting for Proxmark3 to appear..."
while true; do
device=$(wmic.exe path Win32_SerialPort where "PNPDeviceID like '%VID_9AC4&PID_4B8F%'" get DeviceID,PNPDeviceID 2>/dev/null | awk 'NR==2')