mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
nexwatch textual, wrong endianess
This commit is contained in:
parent
42c28b8629
commit
b748a7989e
2 changed files with 7 additions and 6 deletions
|
@ -406,7 +406,7 @@ static int CmdSetDebugMode(const char *Cmd) {
|
||||||
void printDemodBuff(void) {
|
void printDemodBuff(void) {
|
||||||
int len = DemodBufferLen;
|
int len = DemodBufferLen;
|
||||||
if (len < 1) {
|
if (len < 1) {
|
||||||
PrintAndLogEx(NORMAL, "(printDemodBuff) no bits found in demod buffer");
|
PrintAndLogEx(INFO, "(printDemodBuff) no bits found in demod buffer");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (len > 512) len = 512;
|
if (len > 512) len = 512;
|
||||||
|
@ -458,7 +458,7 @@ int CmdPrintDemodBuff(const char *Cmd) {
|
||||||
if (errors) return usage_data_printdemodbuf();
|
if (errors) return usage_data_printdemodbuf();
|
||||||
|
|
||||||
if (DemodBufferLen == 0) {
|
if (DemodBufferLen == 0) {
|
||||||
PrintAndLogEx(NORMAL, "Demodbuffer is empty");
|
PrintAndLogEx(WARNING, "Demodbuffer is empty");
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
if (lstrip) {
|
if (lstrip) {
|
||||||
|
@ -491,9 +491,9 @@ int CmdPrintDemodBuff(const char *Cmd) {
|
||||||
if (numBits == 0) {
|
if (numBits == 0) {
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
PrintAndLogEx(NORMAL, "DemodBuffer: %s", hex);
|
PrintAndLogEx(SUCCESS, "DemodBuffer: %s", hex);
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(NORMAL, "DemodBuffer:\n%s", sprint_bin_break(DemodBuffer + offset, length, 32));
|
PrintAndLogEx(SUCCESS, "DemodBuffer:\n%s", sprint_bin_break(DemodBuffer + offset, length, 32));
|
||||||
}
|
}
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "cmdlfnexwatch.h"
|
#include "cmdlfnexwatch.h"
|
||||||
|
#include <inttypes.h> // PRIu
|
||||||
#include <ctype.h> // tolower
|
#include <ctype.h> // tolower
|
||||||
|
|
||||||
#include "commonutil.h" // ARRAYLEN
|
#include "commonutil.h" // ARRAYLEN
|
||||||
|
@ -80,9 +81,9 @@ static int CmdNexWatchDemod(const char *Cmd) {
|
||||||
//checksum check (TBD)
|
//checksum check (TBD)
|
||||||
|
|
||||||
//output
|
//output
|
||||||
PrintAndLogEx(NORMAL, "NexWatch ID: %d", ID);
|
PrintAndLogEx(SUCCESS, "NexWatch ID: " _YELLOW_("%"PRIu32) , ID);
|
||||||
if (invert) {
|
if (invert) {
|
||||||
PrintAndLogEx(NORMAL, "Had to Invert - probably NexKey");
|
PrintAndLogEx(INFO, "Had to Invert - probably NexKey");
|
||||||
for (size_t i = 0; i < size; i++)
|
for (size_t i = 0; i < size; i++)
|
||||||
DemodBuffer[i] ^= 1;
|
DemodBuffer[i] ^= 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue