X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/ba4ad25b37aa314fd2588b171f0f8ca73e1c5ef9..22e31cd087b31ca5262261e54a375490a8f50348:/client/cmdhflegic.c?ds=sidebyside diff --git a/client/cmdhflegic.c b/client/cmdhflegic.c index 838a41a2..ccdfa1da 100644 --- a/client/cmdhflegic.c +++ b/client/cmdhflegic.c @@ -14,32 +14,36 @@ static int CmdHelp(const char *Cmd); int usage_legic_calccrc8(void){ PrintAndLog("Calculates the legic crc8/crc16 on the input hexbytes."); PrintAndLog("There must be an even number of hexsymbols as input."); - PrintAndLog("Usage: hf legic crc8 [h] b u "); - PrintAndLog("Options :"); + PrintAndLog("Usage: hf legic crc8 [h] b u c "); + PrintAndLog("Options:"); PrintAndLog(" b : hex bytes"); PrintAndLog(" u : MCC hexbyte"); + PrintAndLog(" c : 8|16 bit crc size"); PrintAndLog(""); - PrintAndLog("Samples :"); + PrintAndLog("Samples:"); PrintAndLog(" hf legic crc8 b deadbeef1122"); - PrintAndLog(" hf legic crc8 b deadbeef1122 u 9A"); + PrintAndLog(" hf legic crc8 b deadbeef1122 u 9A c 16"); return 0; } int usage_legic_load(void){ PrintAndLog("It loads datasamples from the file `filename` to device memory"); PrintAndLog("Usage: hf legic load "); - PrintAndLog(" sample: hf legic load filename"); + PrintAndLog(""); + PrintAndLog("Samples:"); + PrintAndLog(" hf legic load filename"); return 0; } int usage_legic_read(void){ PrintAndLog("Read data from a legic tag."); PrintAndLog("Usage: hf legic read "); - PrintAndLog("Options :"); + PrintAndLog("Options:"); PrintAndLog(" : offset in data array to start download from"); PrintAndLog(" : number of bytes to download"); PrintAndLog(""); - PrintAndLog(" sample: hf legic read"); + PrintAndLog("Samples:"); + PrintAndLog(" hf legic read"); return 0; } @@ -563,7 +567,7 @@ int CmdLegicRfFill(const char *Cmd) { int CmdLegicCalcCrc8(const char *Cmd){ - uint8_t *data; + uint8_t *data = NULL; uint8_t cmdp = 0, uidcrc = 0, type=0; bool errors = false; int len = 0; @@ -621,7 +625,7 @@ int CmdLegicCalcCrc8(const char *Cmd){ break; } - free(data); + if (data != NULL) free(data); return 0; }