X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/d0f3338e0c168f44512cec3c225ebc5648e68363..6799b193741ead38211998950b10fb03fbf69d90:/client/cmdhfepa.c diff --git a/client/cmdhfepa.c b/client/cmdhfepa.c index 44a539c8..ed903cf6 100644 --- a/client/cmdhfepa.c +++ b/client/cmdhfepa.c @@ -29,9 +29,9 @@ int CmdHFEPACollectPACENonces(const char *Cmd) unsigned int n = 0; // delay between requests unsigned int d = 0; - + sscanf(Cmd, "%u %u %u", &m, &n, &d); - + // values are expected to be > 0 m = m > 0 ? m : 1; n = n > 0 ? n : 1; @@ -44,7 +44,7 @@ int CmdHFEPACollectPACENonces(const char *Cmd) UsbCommand c = {CMD_EPA_PACE_COLLECT_NONCE, {(int)m, 0, 0}}; SendCommand(&c); UsbCommand resp; - + WaitForResponse(CMD_ACK,&resp); // check if command failed @@ -58,13 +58,13 @@ int CmdHFEPACollectPACENonces(const char *Cmd) } // print nonce PrintAndLog("Length: %d, Nonce: %s", nonce_length, nonce); + free(nonce); } if (i < n - 1) { sleep(d); } } PrintAndLog("End: %u", time(NULL)); - return 1; } @@ -178,7 +178,7 @@ int CmdHFEPAPACEReplay(const char *Cmd) // UI-related stuff -static const command_t CommandTable[] = +static const command_t CommandTable[] = { {"help", CmdHelp, 1, "This help"}, {"cnonces", CmdHFEPACollectPACENonces, 0,