]> git.zerfleddert.de Git - proxmark3-svn/blob - client/snooper.c
setting svn:eol-style=native on files, part 1
[proxmark3-svn] / client / snooper.c
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
4 // the license.
5 //-----------------------------------------------------------------------------
6 // Snooper binary
7 //-----------------------------------------------------------------------------
8
9 #include "sleep.h"
10 #include "ui.h"
11 #include "proxusb.h"
12 #include "cmdmain.h"
13
14 #define HANDLE_ERROR if (error_occured) { \
15 error_occured = 0;\
16 break;\
17 }
18
19 int main()
20 {
21 usb_init();
22 SetLogFilename("snooper.log");
23
24 return_on_error = 1;
25
26 while(1) {
27 while (!OpenProxmark(0)) { sleep(1); }
28 while (1) {
29 UsbCommand cmdbuf;
30 CommandReceived("hi14asnoop");
31 HANDLE_ERROR;
32 ReceiveCommand(&cmdbuf);
33 HANDLE_ERROR;
34 for (int i = 0; i < 5; ++i) {
35 ReceiveCommandPoll(&cmdbuf);
36 }
37 HANDLE_ERROR;
38 CommandReceived("hi14alist");
39 HANDLE_ERROR;
40 }
41 }
42
43 CloseProxmark();
44 return 0;
45 }
Impressum, Datenschutz