mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
pm3: add option -o/--offline, more convenient than having to call directly the client bin
This commit is contained in:
parent
73a9dff8db
commit
4200bb1376
1 changed files with 24 additions and 10 deletions
34
pm3
34
pm3
|
@ -263,6 +263,7 @@ Description:
|
||||||
Usage:
|
Usage:
|
||||||
$SCRIPT [-n <N>] [<any other proxmark3 client option>]
|
$SCRIPT [-n <N>] [<any other proxmark3 client option>]
|
||||||
$SCRIPT [--list] [-h|--help] [-hh|--helpclient]
|
$SCRIPT [--list] [-h|--help] [-hh|--helpclient]
|
||||||
|
$SCRIPT [-o|--offline]
|
||||||
|
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
@ -270,7 +271,7 @@ Arguments:
|
||||||
-hh/--helpclient proxmark3 client help (the script will forward these options)
|
-hh/--helpclient proxmark3 client help (the script will forward these options)
|
||||||
--list list all detected com ports
|
--list list all detected com ports
|
||||||
-n <N> connect device referred to the N:th number on the --list output
|
-n <N> connect device referred to the N:th number on the --list output
|
||||||
|
-o/--offline shortcut to use directly the proxmark3 client without guessing ports
|
||||||
|
|
||||||
Samples:
|
Samples:
|
||||||
./$SCRIPT -- Auto detect/ select com port in the following order BT, USB/CDC, BT DONGLE
|
./$SCRIPT -- Auto detect/ select com port in the following order BT, USB/CDC, BT DONGLE
|
||||||
|
@ -383,18 +384,31 @@ else
|
||||||
echo >&2 "[!!] Script ran under unknown name, abort: $SCRIPT"
|
echo >&2 "[!!] Script ran under unknown name, abort: $SCRIPT"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
|
|
||||||
HELP
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" == "-hh" ] || [ "$1" == "--helpclient" ]; then
|
# priority to the help options
|
||||||
CMD "-h"
|
for ARG; do
|
||||||
exit 0
|
if [ "$ARG" == "-h" ] || [ "$ARG" == "--help" ]; then
|
||||||
fi
|
HELP
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if [ "$ARG" == "-hh" ] || [ "$ARG" == "--helpclient" ]; then
|
||||||
|
CMD "-h"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# if offline, bypass the script and forward all other args
|
||||||
|
for ARG; do
|
||||||
|
shift
|
||||||
|
if [ "$ARG" == "-o" ] || [ "$ARG" == "--offline" ]; then
|
||||||
|
CMD "$@"
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
set -- "$@" "$ARG"
|
||||||
|
done
|
||||||
|
|
||||||
# if a port is already provided, let's just run the command as such
|
# if a port is already provided, let's just run the command as such
|
||||||
for ARG in "$@"; do
|
for ARG; do
|
||||||
if [ "$ARG" == "-p" ]; then
|
if [ "$ARG" == "-p" ]; then
|
||||||
CMD "$@"
|
CMD "$@"
|
||||||
exit $?
|
exit $?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue