mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07: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;
|
int raw_len = 0;
|
||||||
char raw[40] = {0};
|
char raw[40] = {0};
|
||||||
CLIParamStrToBuf(arg_get_str(ctx, 6), (uint8_t *)raw, sizeof(raw), &raw_len);
|
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);
|
//bool q5 = arg_get_lit(ctx, 7);
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
@ -328,8 +325,12 @@ static int CmdHIDClone(const char *Cmd) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (raw_len == 0) {
|
||||||
PrintAndLogEx(INFO, "Preparing to clone HID tag");
|
PrintAndLogEx(INFO, "Preparing to clone HID tag");
|
||||||
HIDTryUnpack(&packed, false);
|
HIDTryUnpack(&packed, false);
|
||||||
|
} else {
|
||||||
|
PrintAndLogEx(INFO, "Preparing to clone HID tag using raw " _YELLOW_("%s"), raw);
|
||||||
|
}
|
||||||
|
|
||||||
lf_hidsim_t payload;
|
lf_hidsim_t payload;
|
||||||
payload.hi2 = packed.Top;
|
payload.hi2 = packed.Top;
|
||||||
|
|
|
@ -708,7 +708,7 @@ bool HIDTryUnpack(wiegand_message_t *packed, bool ignore_parity) {
|
||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
if (result == false) {
|
if (result == false && packed->Length) {
|
||||||
PrintAndLogEx(SUCCESS, "Unknown. Bit len %d", packed->Length);
|
PrintAndLogEx(SUCCESS, "Unknown. Bit len %d", packed->Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue