]> git.zerfleddert.de Git - proxmark3-svn/blame_incremental - client/snooper.c
Client cleanup and restructuring. Stage 1...
[proxmark3-svn] / client / snooper.c
... / ...
CommitLineData
1#include "ui.h"
2#include "proxusb.h"
3#include "cmdmain.h"
4
5#define HANDLE_ERROR if (error_occured) { \
6 error_occured = 0;\
7 break;\
8}
9
10int main()
11{
12 usb_init();
13 SetLogFilename("snooper.log");
14
15 return_on_error = 1;
16
17 while(1) {
18 while (!OpenProxmark(0)) { sleep(1); }
19 while (1) {
20 UsbCommand cmdbuf;
21 CommandReceived("hi14asnoop");
22 HANDLE_ERROR;
23 ReceiveCommand(&cmdbuf);
24 HANDLE_ERROR;
25 for (int i = 0; i < 5; ++i) {
26 ReceiveCommandPoll(&cmdbuf);
27 }
28 HANDLE_ERROR;
29 CommandReceived("hi14alist");
30 HANDLE_ERROR;
31 }
32 }
33
34 CloseProxmark();
35 return 0;
36}
Impressum, Datenschutz