]>
git.zerfleddert.de Git - proxmark3-svn/blob - client/cmdcrc.c
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2015 iceman <iceman at iuse.se>
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
7 //-----------------------------------------------------------------------------
8 // CRC Calculations from the software reveng commands
9 //-----------------------------------------------------------------------------
14 #include "cmdparser.h"
16 #include "reveng/reveng.h"
17 //#include "reveng/cli.h"
18 static int CmdHelp(const char *Cmd
);
20 int CmdCrcCalc(const char *Cmd
)
23 char Cmd2
[CMD_BUFFER_SIZE
] = {0x00};
26 for (int i
= 0; i
< 50; i
++)
27 if (Cmd
[i
]==0x00) argc
=i
;
29 memcpy(Cmd2
, Cmd
, argc
);
31 reveng_main(argc
, argv
);
35 static command_t CommandTable
[] =
37 {"help", CmdHelp
, 1, "This help"},
38 {"calc", CmdCrcCalc
, 1, "{ Calculate CRC's }"},
42 int CmdCrc(const char *Cmd
)
44 CmdsParse(CommandTable
, Cmd
);
48 int CmdHelp(const char *Cmd
)
50 CmdsHelp(CommandTable
);