Merge pull request #3622 from mfcarroll/idteck-demod
lf idteck demod: report only what the tag actually holds
This commit is contained in:
3 files changed
+15
-12
No files matched your search
@@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file.
|
|||||||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||||
|
|
||||||
## [unreleased][unreleased]
|
## [unreleased][unreleased]
|
||||||
|
- Fixed `lf idteck demod` - without `--raw` it decoded a zeroed stack buffer instead of the graphbuffer, always reporting card id 0 (@mfcarroll)
|
||||||
|
- Fixed `lf idteck demod` - a raw frame without the Idteck preamble printed `No genuine IDTECK found` and then announced a tag anyway (@mfcarroll)
|
||||||
|
- Changed `lf idteck demod` - no longer prints an HID H10301 credential built from the Idteck card id (@mfcarroll)
|
||||||
- Added `trace clear` - clears the tracebuffer (@iceman1001)
|
- Added `trace clear` - clears the tracebuffer (@iceman1001)
|
||||||
- Changed `trace save -1` - now downloads from device by default (@iceman1001)
|
- Changed `trace save -1` - now downloads from device by default (@iceman1001)
|
||||||
- Added `hf 14a antifuzz --coll` - the UID collides from the 9th bit (@iceman1001)
|
- Added `hf 14a antifuzz --coll` - the UID collides from the 9th bit (@iceman1001)
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
#include "protocols.h" // T55x7 defines
|
#include "protocols.h" // T55x7 defines
|
||||||
#include "cmdlft55xx.h" // verifywrite
|
#include "cmdlft55xx.h" // verifywrite
|
||||||
#include "generator.h"
|
#include "generator.h"
|
||||||
#include "wiegand_formats.h"
|
|
||||||
|
|
||||||
static int CmdHelp(const char *Cmd);
|
static int CmdHelp(const char *Cmd);
|
||||||
|
|
||||||
@@ -104,13 +103,14 @@ int demodIdteck(uint8_t *raw, bool verbose) {
|
|||||||
raw2 = bytes_to_num(raw + 4, 4);
|
raw2 = bytes_to_num(raw + 4, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
// got a good demod
|
|
||||||
uint32_t id = 0;
|
|
||||||
|
|
||||||
if (raw1 != 0x4944544B) {
|
if (raw1 != 0x4944544B) {
|
||||||
PrintAndLogEx(FAILED, "No genuine IDTECK found");
|
PrintAndLogEx(FAILED, "No genuine IDTECK found");
|
||||||
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// got a good demod
|
||||||
|
uint32_t id = 0;
|
||||||
|
|
||||||
// parity check (TBD)
|
// parity check (TBD)
|
||||||
|
|
||||||
uint32_t tmp = raw2;
|
uint32_t tmp = raw2;
|
||||||
@@ -135,13 +135,6 @@ int demodIdteck(uint8_t *raw, bool verbose) {
|
|||||||
(chksum == calc) ? _GREEN_("ok") : _RED_("fail")
|
(chksum == calc) ? _GREEN_("ok") : _RED_("fail")
|
||||||
);
|
);
|
||||||
|
|
||||||
wiegand_message_t packed = {
|
|
||||||
.Bot = id,
|
|
||||||
.Mid = 0,
|
|
||||||
.Top = 0,
|
|
||||||
.Length = 26
|
|
||||||
};
|
|
||||||
HIDUnpack(0, &packed);
|
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +156,8 @@ static int CmdIdteckDemod(const char *Cmd) {
|
|||||||
uint8_t raw[8] = {0};
|
uint8_t raw[8] = {0};
|
||||||
CLIGetHexWithReturn(ctx, 1, raw, &raw_len);
|
CLIGetHexWithReturn(ctx, 1, raw, &raw_len);
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
return demodIdteck(raw, true);
|
// no --raw given, demod the graphbuffer instead
|
||||||
|
return demodIdteck((raw_len == 0) ? NULL : raw, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int CmdIdteckClone(const char *Cmd) {
|
static int CmdIdteckClone(const char *Cmd) {
|
||||||
|
|||||||
@@ -539,6 +539,12 @@ while true; do
|
|||||||
if ! CheckExecute "lf GPROXII test" "$CLIENTBIN -c 'data load -f traces/lf_GProx_36_30_14489.pm3; lf search -1'" "Guardall G-Prox II ID found"; then break; fi
|
if ! CheckExecute "lf GPROXII test" "$CLIENTBIN -c 'data load -f traces/lf_GProx_36_30_14489.pm3; lf search -1'" "Guardall G-Prox II ID found"; then break; fi
|
||||||
if ! CheckExecute "lf HID Prox test" "$CLIENTBIN -c 'data load -f traces/lf_HID-proxCardII-05512-11432784-1.pm3;lf search -1'" "HID Prox ID found"; then break; fi
|
if ! CheckExecute "lf HID Prox test" "$CLIENTBIN -c 'data load -f traces/lf_HID-proxCardII-05512-11432784-1.pm3;lf search -1'" "HID Prox ID found"; then break; fi
|
||||||
if ! CheckExecute "lf IDTECK test" "$CLIENTBIN -c 'data load -f traces/lf_IDTECK_4944544BAC40E069.pm3; lf search -1'" "Idteck ID found"; then break; fi
|
if ! CheckExecute "lf IDTECK test" "$CLIENTBIN -c 'data load -f traces/lf_IDTECK_4944544BAC40E069.pm3; lf search -1'" "Idteck ID found"; then break; fi
|
||||||
|
if ! CheckExecute "lf IDTECK test 2" "$CLIENTBIN -c 'data load -f traces/lf_IDTECK_4944544BAC40E069.pm3; lf idteck demod'" \
|
||||||
|
"Card ID 6938688 \( 0x69E040 \) Raw: 4944544BAC40E069"; then break; fi
|
||||||
|
if ! CheckExecute "lf IDTECK raw test" "$CLIENTBIN -c 'lf idteck demod --raw 4944544B351FBE4B'" \
|
||||||
|
"Card ID 4963871 \( 0x4BBE1F \) Raw: 4944544B351FBE4B"; then break; fi
|
||||||
|
if ! CheckExecute "lf IDTECK reject test" "if ! $CLIENTBIN -c 'lf idteck demod --raw DEADBEEFDEADBEEF' 2>&1 | grep -q 'IDTECK Tag Found'; then echo OK; fi" "OK"; then break; fi
|
||||||
|
if ! CheckExecute "lf IDTECK no wiegand test" "if ! $CLIENTBIN -c 'lf idteck demod --raw 4944544B351FBE4B' 2>&1 | grep -q 'H10301'; then echo OK; fi" "OK"; then break; fi
|
||||||
if ! CheckExecute "lf INDALA test" "$CLIENTBIN -c 'data load -f traces/lf_Indala-504278295.pm3;lf search -1'" "Indala ID found"; then break; fi
|
if ! CheckExecute "lf INDALA test" "$CLIENTBIN -c 'data load -f traces/lf_Indala-504278295.pm3;lf search -1'" "Indala ID found"; then break; fi
|
||||||
if ! CheckExecute "lf KERI test" "$CLIENTBIN -c 'data load -f traces/lf_Keri.pm3;lf search -1'" "Pyramid ID found"; then break; fi
|
if ! CheckExecute "lf KERI test" "$CLIENTBIN -c 'data load -f traces/lf_Keri.pm3;lf search -1'" "Pyramid ID found"; then break; fi
|
||||||
if ! CheckExecute "lf NEXWATCH test" "$CLIENTBIN -c 'data load -f traces/lf_NEXWATCH_Quadrakey-521512301.pm3;lf search -1 '" "NexWatch ID found"; then break; fi
|
if ! CheckExecute "lf NEXWATCH test" "$CLIENTBIN -c 'data load -f traces/lf_NEXWATCH_Quadrakey-521512301.pm3;lf search -1 '" "NexWatch ID found"; then break; fi
|
||||||
|
|||||||
Reference in new issue
Block a user