]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
ADD: experimantal test of adding "reveng 1.30" source code into the PM3 Client.
authoriceman1001 <iceman@iuse.se>
Sat, 16 May 2015 13:36:40 +0000 (15:36 +0200)
committericeman1001 <iceman@iuse.se>
Sat, 16 May 2015 13:36:40 +0000 (15:36 +0200)
client/Makefile
client/cmdcrc.c [new file with mode: 0644]
client/cmdcrc.h [new file with mode: 0644]
client/cmdmain.c

index 4fd41b46a170e821cec76275ef3b0aa76ae5774c..ca29f0f966fb0a9dae13a8501a55eb976a3e0280 100644 (file)
@@ -113,7 +113,12 @@ CMDSRCS =  nonce2key/crapto1.c\
                        pm3_bitlib.c\
                        aes.c\
                        protocols.c\
-
+                       cmdcrc.c\
+                       # reveng/reveng.c\
+                       # reveng/cli.c\
+                       # reveng/bmpbit.c\
+                       # reveng/model.c\
+                       # reveng/poly.c\
 
 COREOBJS = $(CORESRCS:%.c=$(OBJDIR)/%.o)
 CMDOBJS = $(CMDSRCS:%.c=$(OBJDIR)/%.o)
diff --git a/client/cmdcrc.c b/client/cmdcrc.c
new file mode 100644 (file)
index 0000000..895f360
--- /dev/null
@@ -0,0 +1,42 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2015 iceman <iceman at iuse.se>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// CRC Calculations from the software reveng commands
+//-----------------------------------------------------------------------------
+
+#include <stdio.h>
+#include <string.h>
+#include "cmdparser.h"
+#include "cmdcrc.h"
+//#include "reveng/reveng.h"
+#include "reveng/cli.h"
+static int CmdHelp(const char *Cmd);
+
+int CmdCrcCalc(const char *Cmd)
+{
+       //pm3main(Cmd);
+       return 0;
+}
+
+static command_t CommandTable[] = 
+{
+       {"help",        CmdHelp,        1, "This help"},
+       {"calc",        CmdCrcCalc,     1, "{ Calculate CRC's }"},
+       {NULL, NULL, 0, NULL}
+};
+
+int CmdCrc(const char *Cmd)
+{
+  CmdsParse(CommandTable, Cmd);
+  return 0; 
+}
+
+int CmdHelp(const char *Cmd)
+{
+  CmdsHelp(CommandTable);
+  return 0;
+}
diff --git a/client/cmdcrc.h b/client/cmdcrc.h
new file mode 100644 (file)
index 0000000..c37ba2b
--- /dev/null
@@ -0,0 +1,16 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2015 iceman <iceman at iuse.se>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// CRC Calculations from the software reveng commands
+//-----------------------------------------------------------------------------
+
+#ifndef CMDCRC_H__
+#define CMDCRC_H__
+
+int CmdCrc(const char *Cmd);
+int CmdCrcCalc(const char *Cmd);
+#endif
index 512aa13cc91d7e6e950de83346e9342900aef9a1..b0d3d2a04e8da46d29b6f037e2302cc6740f521d 100644 (file)
@@ -25,6 +25,7 @@
 #include "cmdmain.h"
 #include "util.h"
 #include "cmdscript.h"
+#include "cmdcrc.h"
 
 
 unsigned int current_command = CMD_UNKNOWN;
@@ -42,15 +43,16 @@ static int cmd_tail;//Starts as 0
 
 static command_t CommandTable[] = 
 {
-  {"help",  CmdHelp,  1, "This help. Use '<command> help' for details of a particular command."},
-  {"data",  CmdData,  1, "{ Plot window / data buffer manipulation... }"},
-  {"hf",       CmdHF,          1, "{ High Frequency commands... }"},
-  {"hw",    CmdHW,    1, "{ Hardware commands... }"},
-  {"lf",       CmdLF,          1, "{ Low Frequency commands... }"},
-  {"script", CmdScript,   1,"{ Scripting commands }"},
-  {"quit",  CmdQuit,  1, "Exit program"},
-  {"exit",  CmdQuit,  1, "Exit program"},
-  {NULL, NULL, 0, NULL}
+       {"help",        CmdHelp,        1, "This help. Use '<command> help' for details of a particular command."},
+       {"crc",         CmdCrc,         1, "Crc calculations from the software reveng1-30"},
+       {"data",        CmdData,        1, "{ Plot window / data buffer manipulation... }"},
+       {"hf",          CmdHF,          1, "{ High Frequency commands... }"},
+       {"hw",          CmdHW,          1, "{ Hardware commands... }"},
+       {"lf",          CmdLF,          1, "{ Low Frequency commands... }"},
+       {"script",      CmdScript,      1, "{ Scripting commands }"},
+       {"quit",        CmdQuit,        1, "Exit program"},
+       {"exit",        CmdQuit,        1, "Exit program"},
+       {NULL, NULL, 0, NULL}
 };
 
 command_t* getTopLevelCommandTable()
Impressum, Datenschutz