]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdmain.c
Check keys in hf mf nested and hf mf chk (#414)
[proxmark3-svn] / client / cmdmain.c
index f407cee4bf601e883206bfbaf4bbe453d8153306..db88b3ac8ec90ccf653db04e938cb7857878aa8c 100644 (file)
@@ -139,7 +139,7 @@ int getCommand(UsbCommand* response)
  * @param ms_timeout
  * @return true if command was returned, otherwise false
  */
  * @param ms_timeout
  * @return true if command was returned, otherwise false
  */
-bool WaitForResponseTimeout(uint32_t cmd, UsbCommand* response, size_t ms_timeout) {
+bool WaitForResponseTimeoutW(uint32_t cmd, UsbCommand* response, size_t ms_timeout, bool show_warning) {
   
        UsbCommand resp;
        
   
        UsbCommand resp;
        
@@ -155,7 +155,7 @@ bool WaitForResponseTimeout(uint32_t cmd, UsbCommand* response, size_t ms_timeou
                        }
                }
                msleep(10); // XXX ugh
                        }
                }
                msleep(10); // XXX ugh
-               if (dm_seconds == 200) { // Two seconds elapsed
+               if (dm_seconds == 200 && show_warning) { // Two seconds elapsed
                        PrintAndLog("Waiting for a response from the proxmark...");
                        PrintAndLog("Don't forget to cancel its operation first by pressing on the button");
                }
                        PrintAndLog("Waiting for a response from the proxmark...");
                        PrintAndLog("Don't forget to cancel its operation first by pressing on the button");
                }
@@ -163,9 +163,12 @@ bool WaitForResponseTimeout(uint32_t cmd, UsbCommand* response, size_t ms_timeou
        return false;
 }
 
        return false;
 }
 
+bool WaitForResponseTimeout(uint32_t cmd, UsbCommand* response, size_t ms_timeout) {
+       return WaitForResponseTimeoutW(cmd, response, ms_timeout, true);
+}
 
 bool WaitForResponse(uint32_t cmd, UsbCommand* response) {
 
 bool WaitForResponse(uint32_t cmd, UsbCommand* response) {
-       return WaitForResponseTimeout(cmd,response,-1);
+       return WaitForResponseTimeoutW(cmd, response, -1, true);
 }
 
 
 }
 
 
Impressum, Datenschutz