mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 18:57:12 +08:00
chg: analyse nuid' - added colors
This commit is contained in:
parent
259a561a69
commit
2a761e80db
1 changed files with 7 additions and 9 deletions
|
@ -867,19 +867,17 @@ int CmdAnalyseNuid(const char *Cmd){
|
||||||
/* src: https://www.nxp.com/docs/en/application-note/AN10927.pdf */
|
/* src: https://www.nxp.com/docs/en/application-note/AN10927.pdf */
|
||||||
/* selftest1 UID 040D681AB52281 -> NUID 8F430FEF */
|
/* selftest1 UID 040D681AB52281 -> NUID 8F430FEF */
|
||||||
/* selftest2 UID 04183F09321B85 -> NUID 4F505D7D */
|
/* selftest2 UID 04183F09321B85 -> NUID 4F505D7D */
|
||||||
if (cmdp == 't' || cmdp == 'T') {
|
if (cmdp == 't') {
|
||||||
memcpy(uid, "\x04\x0d\x68\x1a\xb5\x22\x81", 7);
|
memcpy(uid, "\x04\x0d\x68\x1a\xb5\x22\x81", 7);
|
||||||
generate4bNUID(uid, nuid);
|
generate4bNUID(uid, nuid);
|
||||||
if ( 0 == memcmp(nuid, "\x8f\x43\x0f\xef", 4))
|
|
||||||
PrintAndLogEx(SUCCESS, "Selftest1 OK\n");
|
bool test1 = (0 == memcmp(nuid, "\x8f\x43\x0f\xef", 4));
|
||||||
else
|
PrintAndLogEx(SUCCESS, "Selftest1 %s\n", test1 ? _GREEN_(OK): _RED_(Fail));
|
||||||
PrintAndLogEx(FAILED, "Selftest1 Failed\n");
|
|
||||||
memcpy(uid, "\x04\x18\x3f\x09\x32\x1b\x85", 7);
|
memcpy(uid, "\x04\x18\x3f\x09\x32\x1b\x85", 7);
|
||||||
generate4bNUID(uid, nuid);
|
generate4bNUID(uid, nuid);
|
||||||
if ( 0 == memcmp(nuid, "\x4f\x50\x5d\x7d", 4))
|
bool test2 = (0 == memcmp(nuid, "\x4f\x50\x5d\x7d", 4));
|
||||||
PrintAndLogEx(SUCCESS, "Selftest2 OK\n");
|
PrintAndLogEx(SUCCESS, "Selftest2 %s\n", test2 ? _GREEN_(OK) : _RED_(Fail));
|
||||||
else
|
|
||||||
PrintAndLogEx(FAILED, "Selftest2 Failed\n");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue