mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
detect serial port
This commit is contained in:
parent
9e224b011b
commit
6f316b8e29
2 changed files with 90 additions and 24 deletions
45
pm3
45
pm3
|
@ -14,27 +14,32 @@ PM3PATH=$(dirname "$0")
|
|||
EVALENV=""
|
||||
FULLIMAGE="fullimage.elf"
|
||||
BOOTIMAGE="bootrom.elf"
|
||||
# try pm3 dirs in current repo workdir
|
||||
if [ -d "$PM3PATH/client/" ]; then
|
||||
if [ -x "$PM3PATH/client/proxmark3" ]; then
|
||||
CLIENT="$PM3PATH/client/proxmark3"
|
||||
elif [ -x "$PM3PATH/client/build/proxmark3" ]; then
|
||||
CLIENT="$PM3PATH/client/build/proxmark3"
|
||||
else
|
||||
echo >&2 "[!!] In devel workdir but no executable found, did you compile it?"
|
||||
exit 1
|
||||
fi
|
||||
# Devel mode: point to workdir pm3.py module
|
||||
EVALENV+=" PYTHONPATH=$PM3PATH/client/src"
|
||||
# try install dir
|
||||
elif [ -x "$PM3PATH/proxmark3" ]; then
|
||||
CLIENT="$PM3PATH/proxmark3"
|
||||
EVALENV+=" PYTHONPATH=$PM3PATH/../share/proxmark3/pyscripts/"
|
||||
# or /usr/[local/]lib/python3/dist-packages/pm3.py ?
|
||||
else
|
||||
# hope it's installed somehow, still not sure where fw images and pm3.py are...
|
||||
CLIENT="proxmark3"
|
||||
|
||||
#Skip check if --list is used
|
||||
if [ ! "$1" == "--list" ]; then
|
||||
# try pm3 dirs in current repo workdir
|
||||
if [ -d "$PM3PATH/client/" ]; then
|
||||
if [ -x "$PM3PATH/client/proxmark3" ]; then
|
||||
CLIENT="$PM3PATH/client/proxmark3"
|
||||
elif [ -x "$PM3PATH/client/build/proxmark3" ]; then
|
||||
CLIENT="$PM3PATH/client/build/proxmark3"
|
||||
else
|
||||
echo >&2 "[!!] In devel workdir but no executable found, did you compile it?"
|
||||
exit 1
|
||||
fi
|
||||
# Devel mode: point to workdir pm3.py module
|
||||
EVALENV+=" PYTHONPATH=$PM3PATH/client/src"
|
||||
# try install dir
|
||||
elif [ -x "$PM3PATH/proxmark3" ]; then
|
||||
CLIENT="$PM3PATH/proxmark3"
|
||||
EVALENV+=" PYTHONPATH=$PM3PATH/../share/proxmark3/pyscripts/"
|
||||
# or /usr/[local/]lib/python3/dist-packages/pm3.py ?
|
||||
else
|
||||
# hope it's installed somehow, still not sure where fw images and pm3.py are...
|
||||
CLIENT="proxmark3"
|
||||
fi
|
||||
fi
|
||||
|
||||
# LeakSanitizer suppressions
|
||||
if [ -e .lsan_suppressions ]; then
|
||||
EVALENV+=" LSAN_OPTIONS=suppressions=.lsan_suppressions"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue