X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/b811cc51f9a21324dc7589d1254e767374488a20..6658905f18a1eebc148836f26c731dea9c1377dc:/linux/snooper.c diff --git a/linux/snooper.c b/linux/snooper.c new file mode 100644 index 00000000..63fa406f --- /dev/null +++ b/linux/snooper.c @@ -0,0 +1,49 @@ +#include +#include +#include +#include +#include +#include +#include + +#include "translate.h" +#include "../winsrc/prox.h" +#include "proxmark3.h" + +#define HANDLE_ERROR if (error_occured) { \ + error_occured = 0;\ + break;\ +} + +int main() +{ + usb_init(); + setlogfilename("snooper.log"); + + return_on_error = 1; + + while(1) { + while(!(devh=OpenProxmark(0))) { sleep(1); } + + while(1) { + UsbCommand cmdbuf; + int i; + + CommandReceived("hi14asnoop"); + HANDLE_ERROR + + ReceiveCommand(&cmdbuf); + HANDLE_ERROR + for (i=0; i<5; i++) { + ReceiveCommandP(&cmdbuf); + } + HANDLE_ERROR + + CommandReceived("hi14alist"); + HANDLE_ERROR + } + } + + CloseProxmark(); + return 0; +}