]>
Commit | Line | Data |
---|---|---|
1 | //----------------------------------------------------------------------------- | |
2 | // Copyright (C) 2012 Chalk <chalk.secu at gmail.com> | |
3 | // | |
4 | // This code is licensed to you under the terms of the GNU GPL, version 2 or, | |
5 | // at your option, any later version. See the LICENSE.txt file for the text of | |
6 | // the license. | |
7 | //----------------------------------------------------------------------------- | |
8 | // Low frequency PCF7931 commands | |
9 | //----------------------------------------------------------------------------- | |
10 | ||
11 | #include <stdio.h> | |
12 | #include <string.h> | |
13 | //#include "proxusb.h" | |
14 | #include "proxmark3.h" | |
15 | #include "ui.h" | |
16 | #include "graph.h" | |
17 | #include "cmdparser.h" | |
18 | #include "cmddata.h" | |
19 | #include "cmdmain.h" | |
20 | #include "cmdlf.h" | |
21 | #include "cmdlfpcf7931.h" | |
22 | ||
23 | static int CmdHelp(const char *Cmd); | |
24 | ||
25 | int CmdLFPCF7931Read(const char *Cmd) | |
26 | { | |
27 | UsbCommand c = {CMD_PCF7931_READ}; | |
28 | SendCommand(&c); | |
29 | UsbCommand resp; | |
30 | WaitForResponse(CMD_ACK,&resp); | |
31 | return 0; | |
32 | } | |
33 | ||
34 | static command_t CommandTable[] = | |
35 | { | |
36 | {"help", CmdHelp, 1, "This help"}, | |
37 | {"read", CmdLFPCF7931Read, 1, "Read content of a PCF7931 transponder"}, | |
38 | {NULL, NULL, 0, NULL} | |
39 | }; | |
40 | ||
41 | int CmdLFPCF7931(const char *Cmd) | |
42 | { | |
43 | CmdsParse(CommandTable, Cmd); | |
44 | return 0; | |
45 | } | |
46 | ||
47 | int CmdHelp(const char *Cmd) | |
48 | { | |
49 | CmdsHelp(CommandTable); | |
50 | return 0; | |
51 | } |