Enhanced BASH scripts to detect either pm3-x or ttyACMx style devices.
This commit is contained in:
parent
c73ad5b4da
commit
15aa741bdc
10
proxmark3.sh
10
proxmark3.sh
@@ -1,12 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
function wait4proxmark {
|
||||
echo "Waiting for Proxmark to appear..."
|
||||
while [ ! -e /dev/ttyACM? ]; do
|
||||
echo >&2 "Waiting for Proxmark to appear..."
|
||||
while [ ! -c /dev/ttyACM? -a ! -L /dev/pm3-? ]; do
|
||||
sleep .1
|
||||
done
|
||||
local PM3=`ls -1 /dev/pm3-? /dev/ttyACM? 2>/dev/null | head -1`
|
||||
echo >&2 -e "Found proxmark on ${PM3}\n"
|
||||
echo $PM3
|
||||
}
|
||||
|
||||
# start proxmark with first detected interface
|
||||
wait4promark
|
||||
client/proxmark3 /dev/ttyACM?
|
||||
client/proxmark3 $(wait4proxmark)
|
||||
|
||||
13
update.sh
13
update.sh
@@ -1,16 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
function wait4proxmark {
|
||||
echo "Waiting for Proxmark to appear..."
|
||||
while [ ! -e /dev/ttyACM? ]; do
|
||||
echo >&2 "Waiting for Proxmark to appear..."
|
||||
while [ ! -c /dev/ttyACM? -a ! -L /dev/pm3-? ]; do
|
||||
sleep .1
|
||||
done
|
||||
local PM3=`ls -1 /dev/pm3-? /dev/ttyACM? 2>/dev/null | head -1`
|
||||
echo >&2 -e "Found proxmark on ${PM3}\n"
|
||||
echo $PM3
|
||||
}
|
||||
|
||||
# flash bootroom
|
||||
wait4proxmark
|
||||
client/flasher /dev/ttyACM? -b bootrom/obj/bootrom.elf
|
||||
client/flasher $(wait4proxmark) -b bootrom/obj/bootrom.elf
|
||||
|
||||
# flash system image
|
||||
wait4proxmark
|
||||
client/flasher /dev/ttyACM? armsrc/obj/fullimage.elf
|
||||
client/flasher $(wait4proxmark) armsrc/obj/fullimage.elf
|
||||
|
||||
Reference in New Issue
Block a user