From d11fe800387a603b76e1c8b7d2fa983b2a4f3d2e Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 29 Oct 2022 01:22:49 +0200 Subject: [PATCH] use grep -E instead of egrep --- tools/pm3_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/pm3_tests.sh b/tools/pm3_tests.sh index 42ecb5eb3..f682d3491 100755 --- a/tools/pm3_tests.sh +++ b/tools/pm3_tests.sh @@ -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/}"