]> git.zerfleddert.de Git - proxmark3-svn/blob - client/snooper.c
split lf indala[cmd] to lf indala [cmd]
[proxmark3-svn] / client / snooper.c
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2009 Michael Gernoth <michael at gernoth.net>
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 // Snooper binary
9 //-----------------------------------------------------------------------------
10
11 #include "ui.h"
12 #include "proxusb.h"
13 #include "cmdmain.h"
14
15 #define HANDLE_ERROR if (error_occured) { \
16 error_occured = 0;\
17 break;\
18 }
19
20 int main()
21 {
22 usb_init();
23 SetLogFilename("snooper.log");
24
25 return_on_error = 1;
26
27 while(1) {
28 while (!OpenProxmark(0)) { sleep(1); }
29 while (1) {
30 UsbCommand cmdbuf;
31 CommandReceived("hf 14a snoop");
32 HANDLE_ERROR;
33 ReceiveCommand(&cmdbuf);
34 HANDLE_ERROR;
35 for (int i = 0; i < 5; ++i) {
36 ReceiveCommandPoll(&cmdbuf);
37 }
38 HANDLE_ERROR;
39 CommandReceived("hf 14a list");
40 HANDLE_ERROR;
41 }
42 }
43
44 CloseProxmark();
45 return 0;
46 }
Impressum, Datenschutz