]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhftopaz.c
FIX: an extra break inside "Hf mf cgetsc" made it not read the fourth block in the...
[proxmark3-svn] / client / cmdhftopaz.c
index 466af7c0faf6d5830af029f46d203df439489fce..462cbec51583ce6942fc8734b94e4ec10bc75fbf 100644 (file)
@@ -188,7 +188,7 @@ static bool topaz_print_lock_control_TLVs(uint8_t *memory)
                if (tag == 0x01) {                      // the Lock Control TLV
                        uint8_t pages_addr = value[0] >> 4;
                        uint8_t byte_offset = value[0] & 0x0f;
                if (tag == 0x01) {                      // the Lock Control TLV
                        uint8_t pages_addr = value[0] >> 4;
                        uint8_t byte_offset = value[0] & 0x0f;
-                       uint8_t size_in_bits = value[1] ? value[1] : 256;
+                       uint8_t size_in_bits = value[1] ? value[1] : 255;
                        uint8_t bytes_per_page = 1 << (value[2] & 0x0f);
                        uint8_t bytes_locked_per_bit = 1 << (value[2] >> 4);
                        PrintAndLog("Lock Area of %d bits at byte offset 0x%02x. Each Lock Bit locks %d bytes.", 
                        uint8_t bytes_per_page = 1 << (value[2] & 0x0f);
                        uint8_t bytes_locked_per_bit = 1 << (value[2] >> 4);
                        PrintAndLog("Lock Area of %d bits at byte offset 0x%02x. Each Lock Bit locks %d bytes.", 
@@ -222,7 +222,7 @@ static int topaz_print_reserved_memory_control_TLVs(uint8_t *memory)
                if (tag == 0x02) {                      // the Reserved Memory Control TLV
                        uint8_t pages_addr = value[0] >> 4;
                        uint8_t byte_offset = value[0] & 0x0f;
                if (tag == 0x02) {                      // the Reserved Memory Control TLV
                        uint8_t pages_addr = value[0] >> 4;
                        uint8_t byte_offset = value[0] & 0x0f;
-                       uint8_t size_in_bytes = value[1] ? value[1] : 256;
+                       uint8_t size_in_bytes = value[1] ? value[1] : 255;
                        uint8_t bytes_per_page = 1 << (value[2] & 0x0f);
                        PrintAndLog("Reserved Memory of %d bytes at byte offset 0x%02x.", 
                                                size_in_bytes,
                        uint8_t bytes_per_page = 1 << (value[2] & 0x0f);
                        PrintAndLog("Reserved Memory of %d bytes at byte offset 0x%02x.", 
                                                size_in_bytes,
@@ -396,8 +396,9 @@ static command_t CommandTable[] =
 
 int CmdHFTopaz(const char *Cmd) {
        // flush
 
 int CmdHFTopaz(const char *Cmd) {
        // flush
-       WaitForResponseTimeout(CMD_ACK,NULL,100);
-
+       //WaitForResponseTimeout(CMD_ACK,NULL,100);
+       clearCommandBuffer();
+       
        // parse
        CmdsParse(CommandTable, Cmd);
        return 0;
        // parse
        CmdsParse(CommandTable, Cmd);
        return 0;
Impressum, Datenschutz