]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
implemented output of received octets in 'hf 15 cmd raw'
authordn337t@gmail.com <dn337t@gmail.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Fri, 18 May 2012 12:26:50 +0000 (12:26 +0000)
committerdn337t@gmail.com <dn337t@gmail.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Fri, 18 May 2012 12:26:50 +0000 (12:26 +0000)
client/cmdhf15.c

index 0b8680c0667aff55f572ac9e0ae5089709976795..031075092a9af418bb98948b149a670d42d8c38d 100644 (file)
@@ -445,6 +445,7 @@ int CmdHF15CmdRaw (const char *cmd) {
        int i=0;
        uint8_t data[100];
        unsigned int datalen=0, temp;
+       char *hexout;
 
        
        if (strlen(cmd)<3) {
@@ -514,7 +515,14 @@ int CmdHF15CmdRaw (const char *cmd) {
                if (r!=NULL) {
                        recv = r->d.asBytes;
                        PrintAndLog("received %i octets",r->arg[0]);
-                       // TODO: output
+                       hexout = (char *)malloc(r->arg[0] * 3 + 1);
+                       if (hexout != NULL) {
+                               for (int i = 0; i < r->arg[0]; i++) { // data in hex
+                                       sprintf(&hexout[i * 3], "%02hX ", recv[i]);
+                               }
+                               PrintAndLog("%s", hexout);
+                               free(hexout);
+                       }
                } else {
                        PrintAndLog("timeout while waiting for reply.");
                }
Impressum, Datenschutz