]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhftopaz.c
FIX: lf hitag : Mea culpa, simulation should not have reader_field on. thanks to...
[proxmark3-svn] / client / cmdhftopaz.c
index 271f41b0604c32c4a74ebe6dd53450d5da5654f5..2f9bc3dc0102ddf1bbbe4c199726eb3d3ccc7d04 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;
-                       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.", 
@@ -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;
-                       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,
@@ -258,11 +258,15 @@ int CmdHFTopazReader(const char *Cmd) {
        uint8_t rid_response[8];
        uint8_t *uid_echo = &rid_response[2];
        uint8_t rall_response[130];
+       bool verbose = TRUE;
+
+       char ctmp = param_getchar(Cmd, 0);
+       if ( ctmp == 'S' || ctmp == 's') verbose = FALSE;
        
        status = topaz_select(atqa, rid_response);
-       
+
        if (status == -1) {
-               PrintAndLog("Error: couldn't receive ATQA");
+               if (verbose) PrintAndLog("Error: couldn't receive ATQA");
                return -1;
        }
 
@@ -306,6 +310,7 @@ int CmdHFTopazReader(const char *Cmd) {
                        topaz_tag.uid[2], 
                        topaz_tag.uid[1], 
                        topaz_tag.uid[0]);
+                       
        PrintAndLog("       UID[6] (Manufacturer Byte) = %02x, Manufacturer: %s", 
                        topaz_tag.uid[6], 
                        getTagInfo(topaz_tag.uid[6]));
Impressum, Datenschutz