From 259c730bb06f0c45ae8050ea281507c5b390094e Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 17 Jul 2019 20:15:47 +0200 Subject: [PATCH] exit(EXIT_FAILURE) if a port was specified to the client and no pm3 is usable --- client/proxmark3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/proxmark3.c b/client/proxmark3.c index 480f39fa3..1d3a0e8b5 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -503,6 +503,9 @@ int main(int argc, char *argv[]) { CloseProxmark(); } + if ((port != NULL) && (!session.pm3_present)) + exit(EXIT_FAILURE); + if (!session.pm3_present) PrintAndLogEx(INFO, "Running in " _YELLOW_("OFFLINE") "mode. Check \"%s -h\" if it's not what you want.\n", exec_name); @@ -531,5 +534,5 @@ int main(int argc, char *argv[]) { CloseProxmark(); } - exit(0); + exit(EXIT_SUCCESS); }