X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/47e18126ec553c4a7caf6da5a55e476f61c54076..9269081341aaca52d0b9ccee08b2bf039386fcb8:/client/cmdlfhitag.c diff --git a/client/cmdlfhitag.c b/client/cmdlfhitag.c index ab279dcb..32d38aeb 100644 --- a/client/cmdlfhitag.c +++ b/client/cmdlfhitag.c @@ -41,9 +41,6 @@ int CmdLFHitagList(const char *Cmd) int i = 0; int prev = -1; - char filename[256]; - FILE* pf = NULL; - for (;;) { if(i >= 1900) { break; @@ -107,23 +104,19 @@ int CmdLFHitagList(const char *Cmd) line); - if (pf) { - fprintf(pf," +%7d: %3d: %s %s\n", - (prev < 0 ? 0 : (timestamp - prev)), - bits, - (isResponse ? "TAG" : " "), - line); - } +// if (pf) { +// fprintf(pf," +%7d: %3d: %s %s\n", +// (prev < 0 ? 0 : (timestamp - prev)), +// bits, +// (isResponse ? "TAG" : " "), +// line); +// } prev = timestamp; i += (len + 9); } - if (pf) { - PrintAndLog("Recorded activity succesfully written to file: %s", filename); - fclose(pf); - } - + return 0; } @@ -147,7 +140,11 @@ int CmdLFHitagSim(const char *Cmd) { return 1; } tag_mem_supplied = true; - fread(c.d.asBytes,48,1,pf); + if (fread(c.d.asBytes,48,1,pf) == 0) { + PrintAndLog("Error: File reading error"); + fclose(pf); + return 1; + } fclose(pf); } else { tag_mem_supplied = false;