Skip to content

Commit

Permalink
WSL: detect auth problems to run wmic
Browse files Browse the repository at this point in the history
  • Loading branch information
doegox committed Sep 24, 2019
1 parent 7870dd6 commit e95186e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 7 additions & 0 deletions pm3
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit e95186e

Please sign in to comment.