]> git.zerfleddert.de Git - proxmark3-svn/blame - client/snooper.c
setting svn:eol-style=native on files, part 1
[proxmark3-svn] / client / snooper.c
CommitLineData
a553f267 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
4cd41f34 9#include "sleep.h"
7fe9b0b7 10#include "ui.h"
11#include "proxusb.h"
12#include "cmdmain.h"
6658905f 13
14#define HANDLE_ERROR if (error_occured) { \
7fe9b0b7 15 error_occured = 0;\
16 break;\
6658905f 17}
18
19int main()
20{
7fe9b0b7 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;
6658905f 45}
Impressum, Datenschutz