]> cvs.zerfleddert.de Git - proxmark3-svn/blob - client/cmdlfpcf7931.c
fixed cmd malloc strlen()+1 bug
[proxmark3-svn] / client / cmdlfpcf7931.c
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 "ui.h"
15 #include "graph.h"
16 #include "cmdparser.h"
17 #include "cmddata.h"
18 #include "cmdmain.h"
19 #include "cmdlf.h"
20 #include "cmdlfpcf7931.h"
21
22 static int CmdHelp(const char *Cmd);
23
24 int CmdLFPCF7931Read(const char *Cmd)
25 {
26 UsbCommand c = {CMD_PCF7931_READ};
27 SendCommand(&c);
28 WaitForResponse(CMD_ACK);
29 return 0;
30 }
31
32 static command_t CommandTable[] =
33 {
34 {"help", CmdHelp, 1, "This help"},
35 {"read", CmdLFPCF7931Read, 1, "Read content of a PCF7931 transponder"},
36 {NULL, NULL, 0, NULL}
37 };
38
39 int CmdLFPCF7931(const char *Cmd)
40 {
41 CmdsParse(CommandTable, Cmd);
42 return 0;
43 }
44
45 int CmdHelp(const char *Cmd)
46 {
47 CmdsHelp(CommandTable);
48 return 0;
49 }
Impressum, Datenschutz