]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdmain.c
Added binlib, to handle binary data from lua, based on lpack http://www.tecgraf.puc...
[proxmark3-svn] / client / cmdmain.c
index 2fdaabc12fd83fd3e68223e6c75a5ce50d0da0ec..18515f6589a123a4050ce586d75391cb7c5a3c99 100644 (file)
@@ -24,6 +24,7 @@
 #include "cmdlf.h"
 #include "cmdmain.h"
 #include "util.h"
+#include "cmdscript.h"
 
 unsigned int current_command = CMD_UNKNOWN;
 unsigned int received_command = CMD_UNKNOWN;
@@ -42,6 +43,7 @@ static command_t CommandTable[] =
   {"hw",    CmdHW,    1, "{ Hardware commands... }"},
   {"lf",    CmdLF,    1, "{ LF commands... }"},
   {"quit",  CmdQuit,  1, "Quit program"},
+  {"script", CmdScript,   1,"Run script"},
   {NULL, NULL, 0, NULL}
 };
 
@@ -100,13 +102,15 @@ void CommandReceived(char *Cmd) {
 //-----------------------------------------------------------------------------
 void UsbCommandReceived(UsbCommand *UC)
 {
+  /*
   //  Debug
-  //  printf("UsbCommand length[len=%d]\n",sizeof(UsbCommand));
-  //  printf("  cmd[len=%d]: %x\n",sizeof(UC->cmd),UC->cmd);
-  //  printf(" arg0[len=%d]: %x\n",sizeof(UC->arg[0]),UC->arg[0]);
-  //  printf(" arg1[len=%d]: %x\n",sizeof(UC->arg[1]),UC->arg[1]);
-  //  printf(" arg2[len=%d]: %x\n",sizeof(UC->arg[2]),UC->arg[2]);
-  //  printf(" data[len=%d]: %02x%02x%02x...\n",sizeof(UC->d.asBytes),UC->d.asBytes[0],UC->d.asBytes[1],UC->d.asBytes[2]);
+  printf("UsbCommand length[len=%zd]\n",sizeof(UsbCommand));
+  printf("  cmd[len=%zd]: %"llx"\n",sizeof(UC->cmd),UC->cmd);
+  printf(" arg0[len=%zd]: %"llx"\n",sizeof(UC->arg[0]),UC->arg[0]);
+  printf(" arg1[len=%zd]: %"llx"\n",sizeof(UC->arg[1]),UC->arg[1]);
+  printf(" arg2[len=%zd]: %"llx"\n",sizeof(UC->arg[2]),UC->arg[2]);
+  printf(" data[len=%zd]: %02x%02x%02x...\n",sizeof(UC->d.asBytes),UC->d.asBytes[0],UC->d.asBytes[1],UC->d.asBytes[2]);
+  */
 
   //   printf("%s(%x) current cmd = %x\n", __FUNCTION__, c->cmd, current_command);
   // If we recognize a response, return to avoid further processing
Impressum, Datenschutz