]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Added the new SRIX4K reading routine, thanks to jonor. Regression tested against...
authoredouard@lafargue.name <edouard@lafargue.name@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Mon, 23 Nov 2009 09:34:57 +0000 (09:34 +0000)
committeredouard@lafargue.name <edouard@lafargue.name@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Mon, 23 Nov 2009 09:34:57 +0000 (09:34 +0000)
but I do not have SRIX4K tags to test this with.

armsrc/appmain.c
armsrc/apps.h
armsrc/iso14443.c
include/usb_cmd.h
linux/proxguiqt.cpp
winsrc/command.cpp

index 4077e4ef09ed7ba2bdcc5e8ec4ece80fcac850d7..81ef407a04d3e94f5caafe94e34143a9d2fabe10 100644 (file)
@@ -582,6 +582,9 @@ void UsbPacketReceived(BYTE *packet, int len)
                case CMD_READ_SRI512_TAG:\r
                        ReadSRI512Iso14443(c->ext1);\r
                        break;\r
+               case CMD_READ_SRIX4K_TAG:
+                       ReadSRIX4KIso14443(c->ext1);
+                       break;
 #endif\r
 \r
 #ifdef WITH_ISO14443a\r
index 040737e7d5653c5448b311209f28a9b381870ba6..43324a5bda6ab9c2a98537ee64f6ecb62ba9da25 100644 (file)
@@ -81,6 +81,8 @@ void SimulateTagLowFrequencyBidir(int divisor, int max_bitlen);
 void SimulateIso14443Tag(void);\r
 void AcquireRawAdcSamplesIso14443(DWORD parameter);\r
 void ReadSRI512Iso14443(DWORD parameter);\r
+void ReadSRIX4KIso14443(DWORD parameter);
+void ReadSTMemoryIso14443(DWORD parameter,DWORD dwLast);
 void SnoopIso14443(void);\r
 \r
 /// iso14443a.h\r
index fab7336bc1bb73484bc14dbdc4c2eb816d3fb392..fbc3a6d40009b1eca639705548704e613df0412b 100644 (file)
@@ -873,6 +873,15 @@ void AcquireRawAdcSamplesIso14443(DWORD parameter)
 //-----------------------------------------------------------------------------\r
 void ReadSRI512Iso14443(DWORD parameter)\r
 {\r
+     ReadSTMemoryIso14443(parameter,0x0F);
+}
+void ReadSRIX4KIso14443(DWORD parameter)
+{
+     ReadSTMemoryIso14443(parameter,0x7F);
+}
+
+void ReadSTMemoryIso14443(DWORD parameter,DWORD dwLast)
+{
     BYTE i = 0x00;\r
 \r
     // Make sure that we start from off, since the tags are stateful;\r
@@ -961,8 +970,9 @@ void ReadSRI512Iso14443(DWORD parameter)
     DbpString("Tag memory dump, block 0 to 15");\r
     cmd1[0] = 0x08;\r
     i = 0x00;\r
+    dwLast++;
     for (;;) {\r
-           if (i == 0x10) {\r
+           if (i == dwLast) {
                    DbpString("System area block (0xff):");\r
                    i = 0xff;\r
            }\r
index 6932e45dcf16f36fc6947753598835de5efe3809..76b543f6effa971a029f71e14d2084277f9a3ade 100644 (file)
@@ -60,7 +60,8 @@ typedef struct {
 #define CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443                                  0x0301\r
 #define CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM                      0x0302\r
 #define CMD_READ_SRI512_TAG                                                                                                            0x0303\r
-#define CMD_READER_ISO_15693                                                                                                   0x0310\r
+#define CMD_READ_SRIX4K_TAG                                                    0x0304\r
+#define CMD_READER_ISO_15693                                                                                                   0x0310
 #define CMD_SIMTAG_ISO_15693                                                                                                   0x0311\r
 #define CMD_SIMULATE_TAG_HF_LISTEN                                                                             0x0380\r
 #define CMD_SIMULATE_TAG_ISO_14443                                                                             0x0381\r
index 2be3f68228ec26cf1658cee0c02ced2b8685414f..70c64fbdfc869d1736dd1ac2a21389852acdd1dd 100644 (file)
@@ -8,6 +8,7 @@
 #include <QKeyEvent>
 #include <math.h>
 #include <limits.h>
+#include <stdio.h>
 #include "proxguiqt.h"
 #include "proxgui.h"
 
index 5892a8e551b50b91c089448d5aa83c8385400d1e..456830749c6e29ced7f6f9899bfc9dc034556961 100644 (file)
@@ -107,6 +107,20 @@ static void CmdSri512read(char *str)
        c.ext1 = atoi(str);\r
        SendCommand(&c, FALSE);\r
 }\r
+
+/* New command to read the contents of a SRIX4K tag
+ * SRIX4K tags are ISO14443-B modulated memory tags,
+ * this command just dumps the contents of the memory/
+ */
+static void CmdSrix4kread(char *str)
+{
+        UsbCommand c;
+        c.cmd = CMD_READ_SRIX4K_TAG;
+        c.ext1 = atoi(str);
+        SendCommand(&c, FALSE);
+}
+
+
 \r
 // ## New command\r
 static void CmdHi14areader(char *str)\r
@@ -2935,6 +2949,7 @@ static struct {
        {"setlfdivisor",        CmdSetDivisor,                  0, "<19 - 255> -- Drive LF antenna at 12Mhz/(divisor+1)"},\r
        {"setmux",              CmdSetMux,                      0, "<loraw|hiraw|lopkd|hipkd> -- Set the ADC mux to a specific value"},\r
        {"sri512read",          CmdSri512read,                  0, "<int> -- Read contents of a SRI512 tag"},\r
+       {"srix4kread",          CmdSrix4kread,                  0, "<int> -- Read contents of a SRIX4K tag"},
        {"tidemod",                             CmdTIDemod,                                     1, "Demodulate raw bits for TI-type LF tag"},\r
        {"tiread",                              CmdTIRead,                                      0, "Read and decode a TI 134 kHz tag"},\r
        {"tiwrite",                             CmdTIWrite,                                     0, "Write new data to a r/w TI 134 kHz tag"},\r
Impressum, Datenschutz