1 //-----------------------------------------------------------------------------
2 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
3 // at your option, any later version. See the LICENSE.txt file for the text of
5 //-----------------------------------------------------------------------------
7 //-----------------------------------------------------------------------------
15 #define HANDLE_ERROR if (error_occured) { \
20 int main(int argc
, char **argv
)
22 if (argc
!= 3 && argc
!= 4)
24 printf("\n\tusage: cli <command 1> <command 2> [logfile (default cli.log)]\n");
26 printf("\texample: cli hi14asnoop hi14alist h14a.log\n");
33 SetLogFilename(argv
[3]);
35 SetLogFilename("cli.log");
40 while (!OpenProxmark(0)) { sleep(1); }
43 CommandReceived(argv
[1]);
45 ReceiveCommand(&cmdbuf
);
47 for (int i
= 0; i
< 5; ++i
) {
48 ReceiveCommandPoll(&cmdbuf
);
51 CommandReceived(argv
[2]);