This commit is contained in:
iceman1001 2020-10-06 17:50:20 +02:00
commit c55b4d5aac
3 changed files with 45 additions and 45 deletions

View file

@ -167,7 +167,7 @@ static int CmdHIDWatch(const char *Cmd) {
"Enables HID compatible reader mode printing details.\n"
"By default, values are printed and logged until the button is pressed or another USB command is issued.\n",
"lf hid watch"
);
);
void *argtable[] = {
arg_param_begin,
@ -198,7 +198,7 @@ static int CmdHIDSim(const char *Cmd) {
CLIParserInit(&ctx, "lf hid sim",
"Enables simulation of HID card with card number.",
"lf hid sim 2006ec0c86"
);
);
void *argtable[] = {
arg_param_begin,
@ -215,7 +215,7 @@ static int CmdHIDSim(const char *Cmd) {
CLIParserFree(ctx);
if (long_id) {
for (i=0; i < idlen; ++i) {
for (i = 0; i < idlen; ++i) {
hi2 = (hi2 << 4) | (hi >> 28);
hi = (hi << 4) | (lo >> 28);
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
@ -227,7 +227,7 @@ static int CmdHIDSim(const char *Cmd) {
PrintAndLogEx(INFO, "Simulating HID tag with long ID: " _GREEN_("%x%08x%08x"), hi2, hi, lo);
payload.longFMT = 1;
} else {
for (i=0; i < idlen; ++i) {
for (i = 0; i < idlen; ++i) {
hi = (hi << 4) | (lo >> 28);
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
@ -266,7 +266,7 @@ static int CmdHIDClone(const char *Cmd) {
"Clone HID to T55x7. Tag must be on antenna!",
"lf hid clone 2006ec0c86\n"
"lf hid clone -l 2006ec0c86"
);
);
void *argtable[] = {
arg_param_begin,
@ -285,7 +285,7 @@ static int CmdHIDClone(const char *Cmd) {
uint8_t longid[1] = {0};
if (long_id) {
for (i=0; i < idlen; ++i) {
for (i = 0; i < idlen; ++i) {
hi2 = (hi2 << 4) | (hi >> 28);
hi = (hi << 4) | (lo >> 28);
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
@ -298,7 +298,7 @@ static int CmdHIDClone(const char *Cmd) {
longid[0] = 1;
} else {
for (i=0; i < idlen; ++i) {
for (i = 0; i < idlen; ++i) {
hi = (hi << 4) | (lo >> 28);
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
@ -350,7 +350,7 @@ static int CmdHIDBrute(const char *Cmd) {
"lf hid brute -w H10301 -f 224\n"
"lf hid brute -w H10301 -f 21 -d 2000\n"
"lf hid brute -v -w H10301 -f 21 -c 200 -d 2000\n"
);
);
void *argtable[] = {
arg_param_begin,
@ -371,7 +371,7 @@ static int CmdHIDBrute(const char *Cmd) {
CLIGetStrWithReturn(ctx, 2, format, &formatLen);
format_idx = HIDFindCardFormat((char*) format);
format_idx = HIDFindCardFormat((char *) format);
if (format_idx == -1) {
PrintAndLogEx(WARNING, "Unknown format: " _YELLOW_("%s"), format);
CLIParserFree(ctx);

View file

@ -268,7 +268,7 @@ static int CmdKeriSim(const char *Cmd) {
CLIParserInit(&ctx, "lf keri sim",
"Enables simulation of KERI card with card number.",
"lf keri sim --id 112233"
);
);
void *argtable[] = {
arg_param_begin,

View file

@ -26,20 +26,20 @@
static int CmdHelp(const char *Cmd);
static void print_wiegand_code(wiegand_message_t *packed) {
const char* s = "Encoded wiegand: ";
const char *s = "Encoded wiegand: ";
if (packed->Top != 0) {
PrintAndLogEx(SUCCESS, "%s" _GREEN_("%X%08X%08X"),
s,
(uint32_t)packed->Top,
(uint32_t)packed->Mid,
(uint32_t)packed->Bot
);
s,
(uint32_t)packed->Top,
(uint32_t)packed->Mid,
(uint32_t)packed->Bot
);
} else {
PrintAndLogEx(SUCCESS, "%s" _YELLOW_("%X%08X"),
s,
(uint32_t)packed->Mid,
(uint32_t)packed->Bot
);
s,
(uint32_t)packed->Mid,
(uint32_t)packed->Bot
);
}
}
@ -49,7 +49,7 @@ int CmdWiegandList(const char *Cmd) {
CLIParserInit(&ctx, "wiegand info",
"List available wiegand formats",
"wiegand list"
);
);
void *argtable[] = {
arg_param_begin,
@ -68,7 +68,7 @@ int CmdWiegandEncode(const char *Cmd) {
CLIParserInit(&ctx, "wiegand encode",
"Encode wiegand formatted number to raw hex",
"wiegand encode -w H10301 --fc 101 --cn 1337"
);
);
void *argtable[] = {
arg_param_begin,
@ -91,7 +91,7 @@ int CmdWiegandEncode(const char *Cmd) {
int len = 0;
char format[16] = {0};
CLIParamStrToBuf(arg_get_str(ctx, 5), (uint8_t*)format, sizeof(format), &len);
CLIParamStrToBuf(arg_get_str(ctx, 5), (uint8_t *)format, sizeof(format), &len);
CLIParserFree(ctx);
int idx = HIDFindCardFormat(format);
@ -118,7 +118,7 @@ int CmdWiegandDecode(const char *Cmd) {
CLIParserInit(&ctx, "wiegand decode",
"Decode raw hex to wiegand format",
"wiegand decode --raw 2006f623ae"
);
);
void *argtable[] = {
arg_param_begin,
@ -131,7 +131,7 @@ int CmdWiegandDecode(const char *Cmd) {
bool ignore_parity = arg_get_lit(ctx, 1);
int len = 0;
char hex[40] = {0};
CLIParamStrToBuf(arg_get_str(ctx, 2), (uint8_t*)hex, sizeof(hex), &len);
CLIParamStrToBuf(arg_get_str(ctx, 2), (uint8_t *)hex, sizeof(hex), &len);
CLIParserFree(ctx);
if (len == 0) {