]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
FIX: spelling misstakes.
authoriceman1001 <iceman@iuse.se>
Sat, 27 Feb 2016 08:21:19 +0000 (09:21 +0100)
committericeman1001 <iceman@iuse.se>
Sat, 27 Feb 2016 08:21:19 +0000 (09:21 +0100)
FIX: output of block number should be two digits for nicer layout
FIX: strange branching in the pyramid demod in cmddata.c,  it will now always print the unknown length message
FIX: another go at the coverity scan bug in proxmark3.c. (resource leak for cmd)

client/cmddata.c
client/cmdlf.c
client/cmdlfpyramid.c
client/proxmark3.c

index 9b8933289dbf57035a576365684db30a76d4a367..8e0668f734dcf030e49ef5d55d158495493744dc 100644 (file)
@@ -1483,10 +1483,7 @@ int CmdFSKdemodPyramid(const char *Cmd)
                PrintAndLog("Pyramid ID Found - BitLength: %d, FC: %d, Card: %d - Raw: %08x%08x%08x%08x", fmtLen, fc, cardnum, rawHi3, rawHi2, rawHi, rawLo);
        } else {
                cardnum = bytebits_to_byte(BitStream+81, 16);
-               if (fmtLen > 32)
-                       PrintAndLog("Pyramid ID Found - BitLength: %d -unknown BitLength- (%d), Raw: %08x%08x%08x%08x", fmtLen, cardnum, rawHi3, rawHi2, rawHi, rawLo);
-               else
-                       PrintAndLog("Pyramid ID Found - BitLength: %d -unknown BitLength- (%d), Raw: %08x%08x%08x%08x", fmtLen, cardnum, rawHi3, rawHi2, rawHi, rawLo);
+               PrintAndLog("Pyramid ID Found - BitLength: %d -unknown BitLength- (%d), Raw: %08x%08x%08x%08x", fmtLen, cardnum, rawHi3, rawHi2, rawHi, rawLo);
        }
        if (checksum == checkCS)
                PrintAndLog("Checksum %02x passed", checksum);
index 8363d2532c924920fc903b5213d491fb6eac9a8d..8469d80dc5e9c7ecbb9701c2eb8f7529f0d620da 100644 (file)
@@ -1218,7 +1218,7 @@ static command_t CommandTable[] =
        {"io",                  CmdLFIO,                        1, "{ IOPROX RFIDs... }"},
        {"pcf7931",     CmdLFPCF7931,       1, "{ PCF7931 RFIDs... }"},
        {"presco",      CmdLFPresco,        1, "{ Presco RFIDs... }"},
-       {"pyramid",             CmdLFPyramid,       1, "{ Farepointe/Pyramid RFIDs... }"},      
+       {"pyramid",             CmdLFPyramid,       1, "{ Farpointe/Pyramid RFIDs... }"},       
        {"ti",          CmdLFTI,            1, "{ TI RFIDs... }"},
        {"t55xx",       CmdLFT55XX,         1, "{ T55xx RFIDs... }"},
        {"viking",      CmdLFViking,        1, "{ Viking RFIDs... }"},
index 0b6fe4dc2a67173a953ee1ed35cbe1565b99a62a..3e94ce44986bf617f61d1950dcc59cc8019d6257 100644 (file)
@@ -12,7 +12,7 @@
 static int CmdHelp(const char *Cmd);
 
 int usage_lf_pyramid_clone(void){
-       PrintAndLog("clone a Farepointe/Pyramid tag to a T55x7 tag.");
+       PrintAndLog("clone a Farpointe/Pyramid tag to a T55x7 tag.");
        PrintAndLog("Per pyramid format, the facility-code is 8-bit and the card number is 16-bit.  Larger values are truncated.");
        PrintAndLog("");
        PrintAndLog("Usage: lf pyramid clone <Facility-Code> <Card-Number>");
@@ -25,7 +25,7 @@ int usage_lf_pyramid_clone(void){
 }
 
 int usage_lf_pyramid_sim(void) {
-       PrintAndLog("Enables simulation of Farepointe/Pyramid card with specified card number.");
+       PrintAndLog("Enables simulation of Farpointe/Pyramid card with specified card number.");
        PrintAndLog("Simulation runs until the button is pressed or another USB command is issued.");
        PrintAndLog("Per pyramid format, the facility-code is 8-bit and the card number is 16-bit.  Larger values are truncated.");
        PrintAndLog("");
@@ -84,7 +84,7 @@ int CmdPyramidClone(const char *Cmd) {
        if (strlen(Cmd) == 0 || cmdp == 'h' || cmdp == 'H') return usage_lf_pyramid_clone();
 
        uint32_t facilitycode=0, cardnumber=0, fc = 0, cn = 0;
-       
+       uint8_t i;
        uint8_t bs[128];
        memset(bs, 0x00, sizeof(bs));
        
@@ -109,16 +109,16 @@ int CmdPyramidClone(const char *Cmd) {
        blocks[3] = bytebits_to_byte(bs+64,32);
        blocks[4] = bytebits_to_byte(bs+96,32);
 
-       PrintAndLog("Preparing to clone Farepointe/Pyramid to T55x7 with Facility Code: %u, Card Number: %u", facilitycode, cardnumber);
+       PrintAndLog("Preparing to clone Farpointe/Pyramid to T55x7 with Facility Code: %u, Card Number: %u", facilitycode, cardnumber);
        PrintAndLog("Blk | Data ");
        PrintAndLog("----+------------");
-       for ( uint8_t i=0; i<5; ++i )
-       PrintAndLog(" %d | %08x",i , blocks[i]);
+       for ( i = 0; i<5; ++i )
+               PrintAndLog(" %02d | %08x", i, blocks[i]);
 
        UsbCommand resp;
        UsbCommand c = {CMD_T55XX_WRITE_BLOCK, {0,0,0}};
 
-       for ( uint8_t i=0; i<5; ++i ) {
+       for ( i = 0; i<5; ++i ) {
                c.arg[0] = blocks[i];
                c.arg[1] = i;
                clearCommandBuffer();
@@ -157,7 +157,7 @@ int CmdPyramidSim(const char *Cmd) {
                return 1;
        }       
 
-       PrintAndLog("Simulating - Facility Code: %u, CardNumber: %u", facilitycode, cardnumber );
+       PrintAndLog("Simulating Farpointe/Pyramid - Facility Code: %u, CardNumber: %u", facilitycode, cardnumber );
        
        UsbCommand c = {CMD_FSK_SIM_TAG, {arg1, arg2, size}};
        memcpy(c.d.asBytes, bs, size);
index edad95212e85048e612a19eb61233d79e11c63e4..0fa554259425274419a0f45bc0836c04ad257259 100644 (file)
@@ -168,9 +168,9 @@ static void *main_loop(void *targ) {
                                // exit or quit
                                if (ret == 99) 
                                        break;
+                       }
                        free(cmd);
                        cmd = 0;
-                       }
                } else {
                        printf("\n");
                        break;
Impressum, Datenschutz