]> git.zerfleddert.de Git - proxmark3-svn/blame - client/snooper.c
Remove duplicate #include stdio.h
[proxmark3-svn] / client / snooper.c
CommitLineData
a553f267 1//-----------------------------------------------------------------------------
212ef3a0 2// Copyright (C) 2009 Michael Gernoth <michael at gernoth.net>
3//
a553f267 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
7fe9b0b7 11#include "ui.h"
12#include "proxusb.h"
13#include "cmdmain.h"
6658905f 14
15#define HANDLE_ERROR if (error_occured) { \
7fe9b0b7 16 error_occured = 0;\
17 break;\
6658905f 18}
19
20int main()
21{
7fe9b0b7 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;
6c45a008 31 CommandReceived("hf 14a snoop");
7fe9b0b7 32 HANDLE_ERROR;
33 ReceiveCommand(&cmdbuf);
34 HANDLE_ERROR;
35 for (int i = 0; i < 5; ++i) {
36 ReceiveCommandPoll(&cmdbuf);
37 }
38 HANDLE_ERROR;
6c45a008 39 CommandReceived("hf 14a list");
7fe9b0b7 40 HANDLE_ERROR;
41 }
42 }
43
44 CloseProxmark();
45 return 0;
6658905f 46}
Impressum, Datenschutz