mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-01 02:27:21 +08:00
lf hid clone - textual
This commit is contained in:
parent
a547690af5
commit
3f977043bd
2 changed files with 7 additions and 6 deletions
|
@ -298,9 +298,6 @@ static int CmdHIDClone(const char *Cmd) {
|
|||
int raw_len = 0;
|
||||
char raw[40] = {0};
|
||||
CLIParamStrToBuf(arg_get_str(ctx, 6), (uint8_t *)raw, sizeof(raw), &raw_len);
|
||||
if (raw_len > 0) {
|
||||
PrintAndLogEx(INFO, "RAW %s", raw);
|
||||
}
|
||||
|
||||
//bool q5 = arg_get_lit(ctx, 7);
|
||||
CLIParserFree(ctx);
|
||||
|
@ -328,8 +325,12 @@ static int CmdHIDClone(const char *Cmd) {
|
|||
}
|
||||
}
|
||||
|
||||
if (raw_len == 0) {
|
||||
PrintAndLogEx(INFO, "Preparing to clone HID tag");
|
||||
HIDTryUnpack(&packed, false);
|
||||
} else {
|
||||
PrintAndLogEx(INFO, "Preparing to clone HID tag using raw " _YELLOW_("%s"), raw);
|
||||
}
|
||||
|
||||
lf_hidsim_t payload;
|
||||
payload.hi2 = packed.Top;
|
||||
|
|
|
@ -708,7 +708,7 @@ bool HIDTryUnpack(wiegand_message_t *packed, bool ignore_parity) {
|
|||
}
|
||||
++i;
|
||||
}
|
||||
if (result == false) {
|
||||
if (result == false && packed->Length) {
|
||||
PrintAndLogEx(SUCCESS, "Unknown. Bit len %d", packed->Length);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue