1 //-----------------------------------------------------------------------------
3 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
4 // at your option, any later version. See the LICENSE.txt file for the text of
6 //-----------------------------------------------------------------------------
7 // Low frequency T55xx commands
8 //-----------------------------------------------------------------------------
13 #include "proxmark3.h"
17 #include "cmdparser.h"
20 #include "cmdlft55xx.h"
24 #include "../common/crc.h"
25 #include "../common/iso14443crc.h"
27 // Default configuration
28 t55xx_conf_block_t config
= { .modulation
= DEMOD_ASK
, .inversed
= FALSE
, .offset
= 0x00, .block0
= 0x00};
30 int usage_t55xx_config(){
31 PrintAndLog("Usage: lf t55xx config [d <demodulation>] [i 1] [o <offset>]");
32 PrintAndLog("Options: ");
33 PrintAndLog(" h This help");
34 PrintAndLog(" d <FSK|ASK|PSK|NZ|BI> Set demodulation FSK / ASK / PSK / NZ / Biphase");
35 PrintAndLog(" i [1] Inverse data signal, defaults to normal");
36 PrintAndLog(" o [offset] Set offset, where data should start decode in bitstream");
38 PrintAndLog("Examples:");
39 PrintAndLog(" lf t55xx config d FSK - FSK demodulation");
40 PrintAndLog(" lf t55xx config d FSK i 1 - FSK demodulation, inverse data");
41 PrintAndLog(" lf t55xx config d FSK i 1 o 3 - FSK demodulation, inverse data, offset=3,start from bitpos 3 to decode data");
45 int usage_t55xx_read(){
46 PrintAndLog("Usage: lf t55xx read <block> <password>");
47 PrintAndLog(" <block>, block number to read. Between 0-7");
48 PrintAndLog(" <password>, OPTIONAL password (8 hex characters)");
50 PrintAndLog("Examples:");
51 PrintAndLog(" lf t55xx read 0 - read data from block 0");
52 PrintAndLog(" lf t55xx read 0 feedbeef - read data from block 0 password feedbeef");
56 int usage_t55xx_write(){
57 PrintAndLog("Usage: lf t55xx wr <block> <data> [password]");
58 PrintAndLog(" <block>, block number to read. Between 0-7");
59 PrintAndLog(" <data>, 4 bytes of data to write (8 hex characters)");
60 PrintAndLog(" [password], OPTIONAL password 4bytes (8 hex characters)");
62 PrintAndLog("Examples:");
63 PrintAndLog(" lf t55xx wd 3 11223344 - write 11223344 to block 3");
64 PrintAndLog(" lf t55xx wd 3 11223344 feedbeef - write 11223344 to block 3 password feedbeef");
68 int usage_t55xx_trace() {
69 PrintAndLog("Usage: lf t55xx trace [1]");
70 PrintAndLog(" [graph buffer data], if set, use Graphbuffer otherwise read data from tag.");
72 PrintAndLog("Examples:");
73 PrintAndLog(" lf t55xx trace");
74 PrintAndLog(" lf t55xx trace 1");
78 int usage_t55xx_info() {
79 PrintAndLog("Usage: lf t55xx info [1]");
80 PrintAndLog(" [graph buffer data], if set, use Graphbuffer otherwise read data from tag.");
82 PrintAndLog("Examples:");
83 PrintAndLog(" lf t55xx info");
84 PrintAndLog(" lf t55xx info 1");
88 int usage_t55xx_dump(){
89 PrintAndLog("Usage: lf t55xx dump <password>");
90 PrintAndLog(" <password>, OPTIONAL password 4bytes (8 hex symbols)");
92 PrintAndLog("Examples:");
93 PrintAndLog(" lf t55xx dump");
94 PrintAndLog(" lf t55xx dump feedbeef");
98 int usage_t55xx_detect(){
99 PrintAndLog("Usage: lf t55xx detect");
101 PrintAndLog("Examples:");
102 PrintAndLog(" lf t55xx detect");
103 PrintAndLog(" lf t55xx detect 1");
108 static int CmdHelp(const char *Cmd
);
110 int CmdT55xxSetConfig(const char *Cmd
){
115 char modulation
[4] = {0x00};
118 while(param_getchar(Cmd
, cmdp
) != 0x00 && !errors
)
120 tmp
= param_getchar(Cmd
, cmdp
);
125 return usage_t55xx_config();
127 param_getstr(Cmd
, cmdp
+1, modulation
);
130 if ( strcmp(modulation
, "FSK" ) == 0) config
.modulation
= DEMOD_FSK
;
131 else if ( strcmp(modulation
, "ASK" ) == 0) config
.modulation
= DEMOD_ASK
;
132 else if ( strcmp(modulation
, "PSK" ) == 0) config
.modulation
= DEMOD_PSK
;
133 else if ( strcmp(modulation
, "NZ" ) == 0) config
.modulation
= DEMOD_NZR
;
134 else if ( strcmp(modulation
, "BI" ) == 0) config
.modulation
= DEMOD_BI
;
136 PrintAndLog("Unknown modulation '%s'", modulation
);
141 config
.inversed
= param_getchar(Cmd
,cmdp
+1) == '1';
145 errors
|= param_getdec(Cmd
, cmdp
+1,&offset
);
147 config
.offset
= offset
;
151 PrintAndLog("Unknown parameter '%c'", param_getchar(Cmd
, cmdp
));
156 PrintAndLog(" %c %d [%d]", param_getchar(Cmd
, cmdp
) , errors
, cmdp
);
160 printConfiguration( config
);
165 return usage_t55xx_config();
168 printConfiguration( config
);
172 int CmdT55xxReadBlock(const char *Cmd
)
175 int password
= 0xFFFFFFFF; //default to blank Block 7
177 char cmdp
= param_getchar(Cmd
, 0);
178 if (cmdp
== 'h' || cmdp
== 'H')
179 return usage_t55xx_read();
181 int res
= sscanf(Cmd
, "%d %x", &block
, &password
);
183 if ( res
< 1 || res
> 2 )
184 return usage_t55xx_read();
187 if ((block
< 0) | (block
> 7)) {
188 PrintAndLog("Block must be between 0 and 7");
192 UsbCommand c
= {CMD_T55XX_READ_BLOCK
, {0, block
, 0}};
193 c
.d
.asBytes
[0] = 0x0;
198 c
.d
.asBytes
[0] = 0x1;
202 if ( !WaitForResponseTimeout(CMD_ACK
,NULL
,2500) ) {
203 PrintAndLog("command execution time out");
208 GetFromBigBuf(got
,sizeof(got
),0);
209 WaitForResponse(CMD_ACK
,NULL
);
210 setGraphBuf(got
, 12000);
217 void DecodeT55xxBlock(){
219 char buf
[6] = {0x00};
222 // clearing the DemodBuffer.
223 DemodBufferLen
= 0x00;
225 // use the configuration
226 switch( config
.modulation
){
228 sprintf(cmdStr
,"0 %d", config
.inversed
);
229 FSKrawDemod(cmdStr
, FALSE
);
232 sprintf(cmdStr
,"0 %d 1", config
.inversed
);
233 ASKmanDemod(cmdStr
, FALSE
, FALSE
);
236 sprintf(cmdStr
,"0 %d 1", config
.inversed
);
237 PSKDemod(cmdStr
, FALSE
);
240 sprintf(cmdStr
,"0 %d 1", config
.inversed
);
241 NRZrawDemod(cmdStr
, FALSE
);
244 //BiphaseRawDecode("0",FALSE);
251 int CmdT55xxDetect(const char *Cmd
){
252 char cmdp
= param_getchar(Cmd
, 0);
253 if (cmdp
== 'h' || cmdp
== 'H')
254 return usage_t55xx_detect();
256 // read block 0, Page 0. Configuration.
257 UsbCommand c
= {CMD_T55XX_READ_BLOCK
, {0, 0, 0}};
258 c
.d
.asBytes
[0] = 0x0;
262 // c.arg[2] = password;
263 // c.d.asBytes[0] = 0x1;
267 if ( !WaitForResponseTimeout(CMD_ACK
,NULL
,2500) ) {
268 PrintAndLog("command execution time out");
273 GetFromBigBuf(got
,sizeof(got
),0);
274 WaitForResponse(CMD_ACK
,NULL
);
275 setGraphBuf(got
, 12000);
277 if ( !tryDetectModulation() ){
278 PrintAndLog("Could not detect modulation automatically. Try setting it manually with \'lf t55xx config\'");
283 // detect configuration?
284 bool tryDetectModulation(){
287 t55xx_conf_block_t tests
[10];
289 if (GetFskClock("", FALSE
, FALSE
)){
290 if ( FSKrawDemod("0 0", FALSE
) && test()){
291 tests
[hits
].modulation
= DEMOD_FSK
;
292 tests
[hits
].inversed
= FALSE
;
295 if ( FSKrawDemod("0 1", FALSE
) && test()) {
296 tests
[hits
].modulation
= DEMOD_FSK
;
297 tests
[hits
].inversed
= TRUE
;
301 if ( ASKmanDemod("0 0 1", FALSE
, FALSE
) && test()) {
302 tests
[hits
].modulation
= DEMOD_ASK
;
303 tests
[hits
].inversed
= FALSE
;
307 if ( ASKmanDemod("0 1 1", FALSE
, FALSE
) && test()) {
308 tests
[hits
].modulation
= DEMOD_ASK
;
309 tests
[hits
].inversed
= TRUE
;
313 if ( NRZrawDemod("0 0 1", FALSE
) && test()) {
314 tests
[hits
].modulation
= DEMOD_NZR
;
315 tests
[hits
].inversed
= FALSE
;
319 if ( NRZrawDemod("0 1 1", FALSE
) && test()) {
320 tests
[hits
].modulation
= DEMOD_NZR
;
321 tests
[hits
].inversed
= TRUE
;
325 if ( PSKDemod("0 0 1", FALSE
) && test()) {
326 tests
[hits
].modulation
= DEMOD_PSK
;
327 tests
[hits
].inversed
= FALSE
;
331 if ( PSKDemod("0 1 1", FALSE
) && test()) {
332 tests
[hits
].modulation
= DEMOD_PSK
;
333 tests
[hits
].inversed
= TRUE
;
337 // if (!BiphaseRawDecode("0",FALSE) && test()) {
338 // tests[++hits].modulation = DEMOD_BI;
339 // tests[hits].inversed = FALSE;
341 // if (!BiphaseRawDecode("1",FALSE) && test()) {
342 // tests[++hits].modulation = DEMOD_BI;
343 // tests[hits].inversed = TRUE;
347 config
.modulation
= tests
[0].modulation
;
348 config
.inversed
= tests
[0].inversed
;
349 printConfiguration( config
);
354 PrintAndLog("Found [%d] possible matches for modulation.",hits
);
355 for(int i
=0; i
<hits
; ++i
){
356 PrintAndLog("--[%d]---------------", i
+1);
357 printConfiguration( tests
[i
] );
365 if ( !DemodBufferLen
)
368 if ( PackBits(0, 32, DemodBuffer
) == 0x00 )
373 uint8_t safer
= PackBits(si
, 4, DemodBuffer
); si
+= 4;
374 uint8_t resv
= PackBits(si
, 7, DemodBuffer
); si
+= 7+3;
375 uint8_t extend
= PackBits(si
, 1, DemodBuffer
); si
+= 1;
377 //PrintAndLog("test: %X %X %X ", safer, resv, extend);
379 // 2nibble must be zeroed.
380 if ( resv
> 0x00) return FALSE
;
382 if ( safer
== 0x6 || safer
== 0x9){
386 if ( resv
== 0x00) return TRUE
;
390 void printT55xxBlock(const char *demodStr
){
392 uint32_t blockData
= 0;
393 uint8_t bits
[64] = {0x00};
395 if ( !DemodBufferLen
)
398 if ( config
.offset
> DemodBufferLen
){
399 PrintAndLog("The configured offset is to big. (%d > %d)", config
.offset
, DemodBufferLen
);
403 int i
= config
.offset
;
404 int pos
= 32 + config
.offset
;
406 bits
[i
- config
.offset
]=DemodBuffer
[i
];
408 blockData
= PackBits(0, 32, bits
);
409 PrintAndLog("0x%08X %s [%s]", blockData
, sprint_bin(bits
,32), demodStr
);
412 int special(const char *Cmd
) {
413 uint32_t blockData
= 0;
414 uint8_t bits
[32] = {0x00};
416 PrintAndLog("[OFFSET] [DATA] [BINARY]");
417 PrintAndLog("----------------------------------------------------");
419 for (; j
< 128; ++j
){
421 for (i
= 0; i
< 32; ++i
)
422 bits
[i
]=DemodBuffer
[j
+i
];
424 blockData
= PackBits(0, 32, bits
);
425 PrintAndLog("[%d] 0x%08X %s",j
, blockData
, sprint_bin(bits
,32));
431 void printConfiguration( t55xx_conf_block_t b
){
432 PrintAndLog("Modulation : %s", GetSelectedModulationStr(b
.modulation
) );
433 PrintAndLog("Inverted : %s", (b
.inversed
) ? "Yes" : "No" );
434 PrintAndLog("Offset : %d", b
.offset
);
435 PrintAndLog("Block0 : %08X", b
.block0
);
439 int CmdT55xxWriteBlock(const char *Cmd
)
441 int block
= 8; //default to invalid block
442 int data
= 0xFFFFFFFF; //default to blank Block
443 int password
= 0xFFFFFFFF; //default to blank Block 7
445 char cmdp
= param_getchar(Cmd
, 0);
446 if (cmdp
== 'h' || cmdp
== 'H') {
451 int res
= sscanf(Cmd
, "%d %x %x",&block
, &data
, &password
);
453 if ( res
< 2 || res
> 3) {
459 PrintAndLog("Block must be between 0 and 7");
463 UsbCommand c
= {CMD_T55XX_WRITE_BLOCK
, {data
, block
, 0}};
464 c
.d
.asBytes
[0] = 0x0;
466 PrintAndLog("Writing to T55x7");
467 PrintAndLog("block : %d", block
);
468 PrintAndLog("data : 0x%08X", data
);
473 c
.d
.asBytes
[0] = 0x1;
474 PrintAndLog("pwd : 0x%08X", password
);
480 int CmdT55xxReadTrace(const char *Cmd
)
482 char cmdp
= param_getchar(Cmd
, 0);
484 if (strlen(Cmd
) > 1 || cmdp
== 'h' || cmdp
== 'H')
485 return usage_t55xx_trace();
487 if ( strlen(Cmd
)==0){
489 UsbCommand c
= {CMD_T55XX_READ_TRACE
, {0, 0, 0}};
491 if ( !WaitForResponseTimeout(CMD_ACK
,NULL
,2500) ) {
492 PrintAndLog("command execution time out");
497 GetFromBigBuf(got
,sizeof(got
),0);
498 WaitForResponse(CMD_ACK
,NULL
);
499 setGraphBuf(got
, 12000);
504 if ( !DemodBufferLen
)
507 RepaintGraphWindow();
509 uint8_t si
= config
.offset
;
510 uint32_t bl0
= PackBits(si
, 32, DemodBuffer
);
511 uint32_t bl1
= PackBits(si
+32, 32, DemodBuffer
);
513 uint32_t acl
= PackBits(si
, 8, DemodBuffer
); si
+= 8;
514 uint32_t mfc
= PackBits(si
, 8, DemodBuffer
); si
+= 8;
515 uint32_t cid
= PackBits(si
, 5, DemodBuffer
); si
+= 5;
516 uint32_t icr
= PackBits(si
, 3, DemodBuffer
); si
+= 3;
517 uint32_t year
= PackBits(si
, 4, DemodBuffer
); si
+= 4;
518 uint32_t quarter
= PackBits(si
, 2, DemodBuffer
); si
+= 2;
519 uint32_t lotid
= PackBits(si
, 12, DemodBuffer
); si
+= 12;
520 uint32_t wafer
= PackBits(si
, 5, DemodBuffer
); si
+= 5;
521 uint32_t dw
= PackBits(si
, 15, DemodBuffer
);
526 PrintAndLog("-- T55xx Trace Information ----------------------------------");
527 PrintAndLog("-------------------------------------------------------------");
528 PrintAndLog(" ACL Allocation class (ISO/IEC 15963-1) : 0x%02X (%d)", acl
, acl
);
529 PrintAndLog(" MFC Manufacturer ID (ISO/IEC 7816-6) : 0x%02X (%d)", mfc
, mfc
);
530 PrintAndLog(" CID : 0x%02X (%d)", cid
, cid
);
531 PrintAndLog(" ICR IC Revision : %d",icr
);
532 PrintAndLog(" Manufactured");
533 PrintAndLog(" Year/Quarter : %d/%d",year
, quarter
);
534 PrintAndLog(" Lot ID : %d", lotid
);
535 PrintAndLog(" Wafer number : %d", wafer
);
536 PrintAndLog(" Die Number : %d", dw
);
537 PrintAndLog("-------------------------------------------------------------");
538 PrintAndLog(" Raw Data - Page 1");
539 PrintAndLog(" Block 0 : 0x%08X %s", bl0
, sprint_bin(DemodBuffer
+5,32) );
540 PrintAndLog(" Block 1 : 0x%08X %s", bl1
, sprint_bin(DemodBuffer
+37,32) );
541 PrintAndLog("-------------------------------------------------------------");
545 1-8 ACL Allocation class (ISO/IEC 15963-1) 0xE0
546 9-16 MFC Manufacturer ID (ISO/IEC 7816-6) 0x15 Atmel Corporation
547 17-21 CID 0x1 = Atmel ATA5577M1 0x2 = Atmel ATA5577M2
548 22-24 ICR IC revision
549 25-28 YEAR (BCD encoded) 9 (= 2009)
550 29-30 QUARTER 1,2,3,4
556 18-32 DW, die number sequential
562 int CmdT55xxInfo(const char *Cmd
){
564 Page 0 Block 0 Configuration data.
568 char cmdp
= param_getchar(Cmd
, 0);
570 if (cmdp
== 'h' || cmdp
== 'H')
571 return usage_t55xx_info();
575 // read block 0, Page 0. Configuration.
576 UsbCommand c
= {CMD_T55XX_READ_BLOCK
, {0, 0, 0}};
577 c
.d
.asBytes
[0] = 0x0;
581 // c.arg[2] = password;
582 // c.d.asBytes[0] = 0x1;
586 if ( !WaitForResponseTimeout(CMD_ACK
,NULL
,2500) ) {
587 PrintAndLog("command execution time out");
592 GetFromBigBuf(got
,sizeof(got
),0);
593 WaitForResponse(CMD_ACK
,NULL
);
594 setGraphBuf(got
, 12000);
599 if ( !DemodBufferLen
)
603 uint8_t si
= config
.offset
;
604 uint32_t bl0
= PackBits(si
, 32, DemodBuffer
);
606 uint32_t safer
= PackBits(si
, 4, DemodBuffer
); si
+= 4;
607 uint32_t resv
= PackBits(si
, 7, DemodBuffer
); si
+= 7;
608 uint32_t dbr
= PackBits(si
, 3, DemodBuffer
); si
+= 3;
609 uint32_t extend
= PackBits(si
, 1, DemodBuffer
); si
+= 1;
610 uint32_t datamod
= PackBits(si
, 5, DemodBuffer
); si
+= 5;
611 uint32_t pskcf
= PackBits(si
, 2, DemodBuffer
); si
+= 2;
612 uint32_t aor
= PackBits(si
, 1, DemodBuffer
); si
+= 1;
613 uint32_t otp
= PackBits(si
, 1, DemodBuffer
); si
+= 1;
614 uint32_t maxblk
= PackBits(si
, 3, DemodBuffer
); si
+= 3;
615 uint32_t pwd
= PackBits(si
, 1, DemodBuffer
); si
+= 1;
616 uint32_t sst
= PackBits(si
, 1, DemodBuffer
); si
+= 1;
617 uint32_t fw
= PackBits(si
, 1, DemodBuffer
); si
+= 1;
618 uint32_t inv
= PackBits(si
, 1, DemodBuffer
); si
+= 1;
619 uint32_t por
= PackBits(si
, 1, DemodBuffer
); si
+= 1;
622 PrintAndLog("-- T55xx Configuration & Tag Information --------------------");
623 PrintAndLog("-------------------------------------------------------------");
624 PrintAndLog(" Safer key : %s", GetSaferStr(safer
));
625 PrintAndLog(" reserved : %d", resv
);
626 PrintAndLog(" Data bit rate : %s", GetBitRateStr(dbr
));
627 PrintAndLog(" eXtended mode : %s", (extend
) ? "Yes - Warning":"No");
628 PrintAndLog(" Modulation : %s", GetModulationStr(datamod
));
629 PrintAndLog(" PSK clock freq : %d", pskcf
);
630 PrintAndLog(" AOR - Answer on Request : %s", (aor
) ? "Yes":"No");
631 PrintAndLog(" OTP - One Time Pad : %s", (otp
) ? "Yes - Warning":"No" );
632 PrintAndLog(" Max block : %d", maxblk
);
633 PrintAndLog(" Password mode : %s", (pwd
) ? "Yes":"No");
634 PrintAndLog(" Sequence Start Terminator : %s", (sst
) ? "Yes":"No");
635 PrintAndLog(" Fast Write : %s", (fw
) ? "Yes":"No");
636 PrintAndLog(" Inverse data : %s", (inv
) ? "Yes":"No");
637 PrintAndLog(" POR-Delay : %s", (por
) ? "Yes":"No");
638 PrintAndLog("-------------------------------------------------------------");
639 PrintAndLog(" Raw Data - Page 0");
640 PrintAndLog(" Block 0 : 0x%08X %s", bl0
, sprint_bin(DemodBuffer
+5,32) );
641 PrintAndLog("-------------------------------------------------------------");
646 int CmdT55xxDump(const char *Cmd
){
649 uint8_t pwd
[4] = {0x00};
651 char cmdp
= param_getchar(Cmd
, 0);
652 if ( cmdp
== 'h' || cmdp
== 'H') {
657 bool hasPwd
= ( strlen(Cmd
) > 0);
659 if (param_gethex(Cmd
, 0, pwd
, 8)) {
660 PrintAndLog("password must include 8 HEX symbols");
665 for ( int i
= 0; i
<8; ++i
){
666 memset(s
,0,sizeof(s
));
668 sprintf(s
,"%d %02x%02x%02x%02x", i
, pwd
[0],pwd
[1],pwd
[2],pwd
[3]);
672 CmdT55xxReadBlock(s
);
677 char * GetBitRateStr(uint32_t id
){
682 sprintf(retStr
,"%d - RF/8",id
);
685 sprintf(retStr
,"%d - RF/16",id
);
688 sprintf(retStr
,"%d - RF/32",id
);
691 sprintf(retStr
,"%d - RF/40",id
);
694 sprintf(retStr
,"%d - RF/50",id
);
697 sprintf(retStr
,"%d - RF/64",id
);
700 sprintf(retStr
,"%d - RF/100",id
);
703 sprintf(retStr
,"%d - RF/128",id
);
706 sprintf(retStr
,"%d - (Unknown)",id
);
713 char * GetSaferStr(uint32_t id
){
717 sprintf(retStr
,"%d",id
);
719 sprintf(retStr
,"%d - passwd",id
);
722 sprintf(retStr
,"%d - testmode",id
);
727 char * GetModulationStr( uint32_t id
){
733 sprintf(retStr
,"%d - DIRECT (ASK/NRZ)",id
);
736 sprintf(retStr
,"%d - PSK 1 phase change when input changes",id
);
739 sprintf(retStr
,"%d - PSK 2 phase change on bitclk if input high",id
);
742 sprintf(retStr
,"%d - PSK 3 phase change on rising edge of input",id
);
745 sprintf(retStr
,"%d - FSK 1 RF/8 RF/5",id
);
748 sprintf(retStr
,"%d - FSK 2 RF/8 RF/10",id
);
751 sprintf(retStr
,"%d - FSK 1a RF/5 RF/8",id
);
754 sprintf(retStr
,"%d - FSK 2a RF/10 RF/8",id
);
757 sprintf(retStr
,"%d - Manschester",id
);
760 sprintf(retStr
,"%d - Biphase",id
);
763 sprintf(retStr
,"%d - Reserved",id
);
766 sprintf(retStr
,"0x%02X (Unknown)",id
);
772 char * GetSelectedModulationStr( uint8_t id
){
779 sprintf(retStr
,"FSK (%d)",id
);
782 sprintf(retStr
,"ASK (%d)",id
);
785 sprintf(retStr
,"DIRECT/NRZ (%d)",id
);
788 sprintf(retStr
,"PSK (%d)",id
);
791 sprintf(retStr
,"BIPHASE (%d)",id
);
794 sprintf(retStr
,"(Unknown)");
800 uint32_t PackBits(uint8_t start
, uint8_t len
, uint8_t* bits
){
808 for (; j
>= 0; --j
, ++i
){
814 static command_t CommandTable
[] =
816 {"help", CmdHelp
, 1, "This help"},
817 {"config", CmdT55xxSetConfig
, 1, "Set T55XX config for modulation, inversed data"},
818 {"detect", CmdT55xxDetect
, 0, "Try detecting the tag modulation from reading the configuration block."},
819 {"read", CmdT55xxReadBlock
, 0, "<block> [password] -- Read T55xx block data (page 0) [optional password]"},
820 {"write", CmdT55xxWriteBlock
,0, "<block> <data> [password] -- Write T55xx block data (page 0) [optional password]"},
821 {"trace", CmdT55xxReadTrace
, 0, "[1] Show T55xx traceability data (page 1/ blk 0-1)"},
822 {"info", CmdT55xxInfo
, 0, "[1] Show T55xx configuration data (page 0/ blk 0)"},
823 {"dump", CmdT55xxDump
, 0, "[password] Dump T55xx card block 0-7. [optional password]"},
824 {"special", special
, 0, "Shows how a datablock changes with 32 different offsets"},
825 {NULL
, NULL
, 0, NULL
}
828 int CmdLFT55XX(const char *Cmd
)
830 CmdsParse(CommandTable
, Cmd
);
834 int CmdHelp(const char *Cmd
)
836 CmdsHelp(CommandTable
);