]> cvs.zerfleddert.de Git - proxmark3-svn/blame - client/cmdlfawid26.c
ADD: started with adding a LF AWID26 write function. not done yet.
[proxmark3-svn] / client / cmdlfawid26.c
CommitLineData
f5ed4d12 1//-----------------------------------------------------------------------------
2//
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
5// the license.
6//-----------------------------------------------------------------------------
7// Low frequency AWID26 commands
8//-----------------------------------------------------------------------------
9
10#include <stdio.h>
11#include <string.h>
12#include <inttypes.h>
13#include "proxmark3.h"
14#include "ui.h"
15#include "graph.h"
16#include "cmdmain.h"
17#include "cmdparser.h"
18#include "cmddata.h"
19#include "cmdlf.h"
20#include "cmdlfawid26.h"
21#include "util.h"
22#include "data.h"
23
24
25static int CmdHelp(const char *Cmd);
26
27int CmdClone(const char *Cmd)
28{
29 char cmdp = param_getchar(Cmd, 0);
30
31 if (strlen(Cmd) < 1 || cmdp == 'h' || cmdp == 'H') {
32 PrintAndLog("Usage: lf awid26 write []");
33 PrintAndLog(" [], ");
34 PrintAndLog("");
35 PrintAndLog(" sample: lf awid26 write 26 2233");
36 PrintAndLog(" : lf awid26 write 26 15 2233");
37 return 0;
38 }
39
40 //sscanf(Cmd, "%d %d", &facilitycode, &cardno);
41
42 // char block0 = "00107060";
43 // char block1 = "00107060";
44 // char block2 = "00107060";
45 // char block3 = "00107060";
46
47
48
49 // PrintAndLog("Writing block %d with data %08X", Block, Data);
50 return 0;
51}
52
53// int CmdReadTrace(const char *Cmd)
54// {
55
56 // uint8_t bits[LF_BITSSTREAM_LEN] = {0x00};
57 // uint8_t * bitstream = bits;
58
59 // uint8_t si = 5;
60 // uint32_t bl0 = PackBits(si, 32, bitstream);
61 // uint32_t bl1 = PackBits(si+32, 32, bitstream);
62
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);
72
73 // PrintAndLog("");
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 );
80
81
82 // return 0;
83// }
84
85static command_t CommandTable[] =
86{
87 {"help", CmdHelp, 1, "This help"},
88 {"clone", CmdClone, 0, "<facility> <id> -- clone to a t55xx tag"},
89 {NULL, NULL, 0, NULL}
90};
91
92int CmdLFAWID26(const char *Cmd)
93{
94 CmdsParse(CommandTable, Cmd);
95 return 0;
96}
97
98int CmdHelp(const char *Cmd)
99{
100 CmdsHelp(CommandTable);
101 return 0;
102}
Impressum, Datenschutz