lf hid clone - textual

This commit is contained in:
iceman1001 2020-10-08 20:32:45 +02:00
parent a547690af5
commit 3f977043bd
2 changed files with 7 additions and 6 deletions

View file

@ -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) {
}
}
PrintAndLogEx(INFO, "Preparing to clone HID tag");
HIDTryUnpack(&packed, false);
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;

View file

@ -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);
}