]> git.zerfleddert.de Git - proxmark3-svn/blame - linux/snooper.c
replaced strncasecmp with strcmp to get rid of compile errors
[proxmark3-svn] / linux / snooper.c
CommitLineData
6658905f 1#include <usb.h>
2#include <stdio.h>
3#include <unistd.h>
4#include <stdlib.h>
5#include <strings.h>
6#include <string.h>
7#include <errno.h>
8
9#include "translate.h"
10#include "../winsrc/prox.h"
11#include "proxmark3.h"
12
13#define HANDLE_ERROR if (error_occured) { \
14 error_occured = 0;\
15 break;\
16}
17
18int main()
19{
20 usb_init();
21 setlogfilename("snooper.log");
22
23 return_on_error = 1;
24
25 while(1) {
26 while(!(devh=OpenProxmark(0))) { sleep(1); }
27
28 while(1) {
29 UsbCommand cmdbuf;
30 int i;
31
32 CommandReceived("hi14asnoop");
33 HANDLE_ERROR
34
35 ReceiveCommand(&cmdbuf);
36 HANDLE_ERROR
37 for (i=0; i<5; i++) {
38 ReceiveCommandP(&cmdbuf);
39 }
40 HANDLE_ERROR
41
42 CommandReceived("hi14alist");
43 HANDLE_ERROR
44 }
45 }
46
47 CloseProxmark();
48 return 0;
49}
Impressum, Datenschutz