fix styles
This commit is contained in:
1 parent
9ddd833cba
commit
81d795e56f
2 files changed
+13
-10
No files matched your search
@@ -376,9 +376,10 @@ static int CmdHIDClone(const char *Cmd) {
|
||||
bool q5 = arg_get_lit(ctx, 7);
|
||||
bool em = arg_get_lit(ctx, 8);
|
||||
|
||||
// TODO: very confusing sizes... buf of 70, parser len to 63 instead of 70-1, tests for len > 127, loop with 96...
|
||||
int bin_len = 63;
|
||||
uint8_t bin[70] = {0};
|
||||
// t5577 can do 6 blocks with 32bits == 192 bits, HID is manchester encoded and doubles in length.
|
||||
// With parity, manchester and preamble we have about 3 blocks to play with. Ie: 96 bits
|
||||
uint8_t bin[97] = {0};
|
||||
int bin_len = sizeof(bin) - 1; // CLIGetStrWithReturn does not guarantee string to be null-terminated
|
||||
CLIGetStrWithReturn(ctx, 9, bin, &bin_len);
|
||||
CLIParserFree(ctx);
|
||||
|
||||
@@ -387,8 +388,8 @@ static int CmdHIDClone(const char *Cmd) {
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
||||
if (bin_len > 127) {
|
||||
PrintAndLogEx(ERR, "Binary wiegand string must be less than 128 bits");
|
||||
if (bin_len > 96) {
|
||||
PrintAndLogEx(ERR, "Binary wiegand string must be less than 96 bits");
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user