mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-07 16:48:15 +08:00
use grep -E instead of egrep
This commit is contained in:
parent
216858eeba
commit
d11fe80038
1 changed files with 2 additions and 2 deletions
|
@ -193,7 +193,7 @@ function CheckExecute() {
|
|||
for I in $RETRY
|
||||
do
|
||||
RES=$(eval "$2")
|
||||
if echo "$RES" | egrep -q "$3"; then
|
||||
if echo "$RES" | grep -E -q "$3"; then
|
||||
echo -e "[ ${C_GREEN}OK${C_NC} ] ${C_OK}"
|
||||
return $RESULT
|
||||
fi
|
||||
|
@ -315,7 +315,7 @@ while true; do
|
|||
HT2CRACK3NRAR=hitag2_${HT2CRACK3UID}_nrar_${HT2CRACK3N}emul.txt
|
||||
if ! CheckExecute "ht2crack3 gen testfile" "cd $HT2CRACK3PATH; python3 ../hitag2_gen_nRaR.py $HT2CRACK3KEY $HT2CRACK3UID $HT2CRACK3N > $HT2CRACK3NRAR && echo SUCCESS" "SUCCESS"; then break; fi
|
||||
if ! CheckExecute "ht2crack3test test" "cd $HT2CRACK3PATH; ./ht2crack3test $HT2CRACK3NRAR $HT2CRACK3KEY $HT2CRACK3UID|grep -v SUCCESS||echo SUCCESS" "SUCCESS"; then break; fi
|
||||
if ! CheckExecute "ht2crack3 test" "cd $HT2CRACK3PATH; ./ht2crack3 $HT2CRACK3UID $HT2CRACK3NRAR |egrep -v '(trying|partial)'" "key = $HT2CRACK3KEY"; then break; fi
|
||||
if ! CheckExecute "ht2crack3 test" "cd $HT2CRACK3PATH; ./ht2crack3 $HT2CRACK3UID $HT2CRACK3NRAR |grep -E -v '(trying|partial)'" "key = $HT2CRACK3KEY"; then break; fi
|
||||
if ! CheckExecute "ht2crack3 rm testfile" "cd $HT2CRACK3PATH; rm $HT2CRACK3NRAR && echo SUCCESS" "SUCCESS"; then break; fi
|
||||
|
||||
echo -e "\n${C_BLUE}Testing ht2crack4:${C_NC} ${HT2CRACK4PATH:=./tools/hitag2crack/crack4/}"
|
||||
|
|
Loading…
Reference in a new issue