]>
cvs.zerfleddert.de Git - proxmark3-svn/blob - client/cmdlfawid26.c
63b35fdde6f82b92dfaa5ae38e5b53ef682dd9ea
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 AWID26 commands
8 //-----------------------------------------------------------------------------
13 #include "proxmark3.h"
17 #include "cmdparser.h"
20 #include "cmdlfawid26.h"
25 static int CmdHelp(const char *Cmd
);
27 int CmdClone(const char *Cmd
)
29 char cmdp
= param_getchar(Cmd
, 0);
31 if (strlen(Cmd
) < 1 || cmdp
== 'h' || cmdp
== 'H') {
32 PrintAndLog("Usage: lf awid26 write []");
35 PrintAndLog(" sample: lf awid26 write 26 2233");
36 PrintAndLog(" : lf awid26 write 26 15 2233");
40 //sscanf(Cmd, "%d %d", &facilitycode, &cardno);
42 // char block0 = "00107060";
43 // char block1 = "00107060";
44 // char block2 = "00107060";
45 // char block3 = "00107060";
49 // PrintAndLog("Writing block %d with data %08X", Block, Data);
53 // int CmdReadTrace(const char *Cmd)
56 // uint8_t bits[LF_BITSSTREAM_LEN] = {0x00};
57 // uint8_t * bitstream = bits;
60 // uint32_t bl0 = PackBits(si, 32, bitstream);
61 // uint32_t bl1 = PackBits(si+32, 32, bitstream);
63 // uint32_t acl = PackBits(si, 8, bitstream); si += 8;
64 // uint32_t mfc = PackBits(si, 8, bitstream); si += 8;
65 // uint32_t cid = PackBits(si, 5, bitstream); si += 5;
66 // uint32_t icr = PackBits(si, 3, bitstream); si += 3;
67 // uint32_t year = PackBits(si, 4, bitstream); si += 4;
68 // uint32_t quarter = PackBits(si, 2, bitstream); si += 2;
69 // uint32_t lotid = PackBits(si, 12, bitstream); si += 12;
70 // uint32_t wafer = PackBits(si, 5, bitstream); si += 5;
71 // uint32_t dw = PackBits(si, 15, bitstream);
74 // PrintAndLog("-- T55xx Trace Information ----------------------------------");
75 // PrintAndLog("-------------------------------------------------------------");
76 // PrintAndLog(" ACL Allocation class (ISO/IEC 15963-1) : 0x%02X (%d)", acl, acl);
77 // PrintAndLog(" MFC Manufacturer ID (ISO/IEC 7816-6) : 0x%02X (%d)", mfc, mfc);
78 // PrintAndLog(" CID : 0x%02X (%d)", cid, cid);
79 // PrintAndLog(" ICR IC Revision : %d",icr );
85 static command_t CommandTable
[] =
87 {"help", CmdHelp
, 1, "This help"},
88 {"clone", CmdClone
, 0, "<facility> <id> -- clone to a t55xx tag"},
92 int CmdLFAWID26(const char *Cmd
)
94 CmdsParse(CommandTable
, Cmd
);
98 int CmdHelp(const char *Cmd
)
100 CmdsHelp(CommandTable
);