From: Martin Holst Swende Date: Fri, 16 Jan 2015 21:48:30 +0000 (+0100) Subject: Bugfix 'hf list 14b' and 'hf list raw' X-Git-Tag: v2.0.0-rc1~45 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/b689b842b68c061340f18ff595ffdabf34bdc4f0?ds=sidebyside;hp=-c Bugfix 'hf list 14b' and 'hf list raw' --- b689b842b68c061340f18ff595ffdabf34bdc4f0 diff --git a/client/cmdhf.c b/client/cmdhf.c index 20ca057b..9acc9825 100644 --- a/client/cmdhf.c +++ b/client/cmdhf.c @@ -519,9 +519,9 @@ int CmdHFList(const char *Cmd) int tlen = param_getstr(Cmd,0,type); char param = param_getchar(Cmd, 1); bool errors = false; - uint8_t protocol = false; + uint8_t protocol = 0; //Validate params - if(tlen == 0 || (strcmp(type, "iclass") != 0 && strcmp(type,"14a") != 0)) + if(tlen == 0) { errors = true; } @@ -529,6 +529,25 @@ int CmdHFList(const char *Cmd) { errors = true; } + if(!errors) + { + if(strcmp(type, "iclass") == 0) + { + protocol = ICLASS; + }else if(strcmp(type, "14a") == 0) + { + protocol = ISO_14443A; + } + else if(strcmp(type, "14b") == 0) + { + protocol = ISO_14443B; + }else if(strcmp(type,"raw")== 0) + { + protocol = -1;//No crc, no annotations + }else{ + errors = true; + } + } if (errors) { PrintAndLog("List protocol data in trace buffer."); @@ -543,20 +562,7 @@ int CmdHFList(const char *Cmd) PrintAndLog("example: hf list iclass"); return 0; } - if(strcmp(type, "iclass") == 0) - { - protocol = ICLASS; - }else if(strcmp(type, "14a") == 0) - { - protocol = ISO_14443A; - } - else if(strcmp(type, "14b") == 0) - { - protocol = ISO_14443B; - }else if(strcmp(type,"raw")== 0) - { - protocol = -1;//No crc, no annotations - } + if (param == 'f') { showWaitCycles = true;