mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
style
This commit is contained in:
parent
02d861d304
commit
c55b4d5aac
3 changed files with 45 additions and 45 deletions
|
@ -167,7 +167,7 @@ static int CmdHIDWatch(const char *Cmd) {
|
||||||
"Enables HID compatible reader mode printing details.\n"
|
"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",
|
"By default, values are printed and logged until the button is pressed or another USB command is issued.\n",
|
||||||
"lf hid watch"
|
"lf hid watch"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -198,7 +198,7 @@ static int CmdHIDSim(const char *Cmd) {
|
||||||
CLIParserInit(&ctx, "lf hid sim",
|
CLIParserInit(&ctx, "lf hid sim",
|
||||||
"Enables simulation of HID card with card number.",
|
"Enables simulation of HID card with card number.",
|
||||||
"lf hid sim 2006ec0c86"
|
"lf hid sim 2006ec0c86"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -215,7 +215,7 @@ static int CmdHIDSim(const char *Cmd) {
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
if (long_id) {
|
if (long_id) {
|
||||||
for (i=0; i < idlen; ++i) {
|
for (i = 0; i < idlen; ++i) {
|
||||||
hi2 = (hi2 << 4) | (hi >> 28);
|
hi2 = (hi2 << 4) | (hi >> 28);
|
||||||
hi = (hi << 4) | (lo >> 28);
|
hi = (hi << 4) | (lo >> 28);
|
||||||
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
|
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);
|
PrintAndLogEx(INFO, "Simulating HID tag with long ID: " _GREEN_("%x%08x%08x"), hi2, hi, lo);
|
||||||
payload.longFMT = 1;
|
payload.longFMT = 1;
|
||||||
} else {
|
} else {
|
||||||
for (i=0; i < idlen; ++i) {
|
for (i = 0; i < idlen; ++i) {
|
||||||
hi = (hi << 4) | (lo >> 28);
|
hi = (hi << 4) | (lo >> 28);
|
||||||
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
|
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!",
|
"Clone HID to T55x7. Tag must be on antenna!",
|
||||||
"lf hid clone 2006ec0c86\n"
|
"lf hid clone 2006ec0c86\n"
|
||||||
"lf hid clone -l 2006ec0c86"
|
"lf hid clone -l 2006ec0c86"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -285,7 +285,7 @@ static int CmdHIDClone(const char *Cmd) {
|
||||||
uint8_t longid[1] = {0};
|
uint8_t longid[1] = {0};
|
||||||
|
|
||||||
if (long_id) {
|
if (long_id) {
|
||||||
for (i=0; i < idlen; ++i) {
|
for (i = 0; i < idlen; ++i) {
|
||||||
hi2 = (hi2 << 4) | (hi >> 28);
|
hi2 = (hi2 << 4) | (hi >> 28);
|
||||||
hi = (hi << 4) | (lo >> 28);
|
hi = (hi << 4) | (lo >> 28);
|
||||||
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
|
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
|
||||||
|
@ -298,7 +298,7 @@ static int CmdHIDClone(const char *Cmd) {
|
||||||
|
|
||||||
longid[0] = 1;
|
longid[0] = 1;
|
||||||
} else {
|
} else {
|
||||||
for (i=0; i < idlen; ++i) {
|
for (i = 0; i < idlen; ++i) {
|
||||||
hi = (hi << 4) | (lo >> 28);
|
hi = (hi << 4) | (lo >> 28);
|
||||||
lo = (lo << 4) | (id[i] >> 4); //get first 4 bits
|
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 224\n"
|
||||||
"lf hid brute -w H10301 -f 21 -d 2000\n"
|
"lf hid brute -w H10301 -f 21 -d 2000\n"
|
||||||
"lf hid brute -v -w H10301 -f 21 -c 200 -d 2000\n"
|
"lf hid brute -v -w H10301 -f 21 -c 200 -d 2000\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -371,7 +371,7 @@ static int CmdHIDBrute(const char *Cmd) {
|
||||||
|
|
||||||
CLIGetStrWithReturn(ctx, 2, format, &formatLen);
|
CLIGetStrWithReturn(ctx, 2, format, &formatLen);
|
||||||
|
|
||||||
format_idx = HIDFindCardFormat((char*) format);
|
format_idx = HIDFindCardFormat((char *) format);
|
||||||
if (format_idx == -1) {
|
if (format_idx == -1) {
|
||||||
PrintAndLogEx(WARNING, "Unknown format: " _YELLOW_("%s"), format);
|
PrintAndLogEx(WARNING, "Unknown format: " _YELLOW_("%s"), format);
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
|
@ -268,7 +268,7 @@ static int CmdKeriSim(const char *Cmd) {
|
||||||
CLIParserInit(&ctx, "lf keri sim",
|
CLIParserInit(&ctx, "lf keri sim",
|
||||||
"Enables simulation of KERI card with card number.",
|
"Enables simulation of KERI card with card number.",
|
||||||
"lf keri sim --id 112233"
|
"lf keri sim --id 112233"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
|
|
@ -26,20 +26,20 @@
|
||||||
static int CmdHelp(const char *Cmd);
|
static int CmdHelp(const char *Cmd);
|
||||||
|
|
||||||
static void print_wiegand_code(wiegand_message_t *packed) {
|
static void print_wiegand_code(wiegand_message_t *packed) {
|
||||||
const char* s = "Encoded wiegand: ";
|
const char *s = "Encoded wiegand: ";
|
||||||
if (packed->Top != 0) {
|
if (packed->Top != 0) {
|
||||||
PrintAndLogEx(SUCCESS, "%s" _GREEN_("%X%08X%08X"),
|
PrintAndLogEx(SUCCESS, "%s" _GREEN_("%X%08X%08X"),
|
||||||
s,
|
s,
|
||||||
(uint32_t)packed->Top,
|
(uint32_t)packed->Top,
|
||||||
(uint32_t)packed->Mid,
|
(uint32_t)packed->Mid,
|
||||||
(uint32_t)packed->Bot
|
(uint32_t)packed->Bot
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(SUCCESS, "%s" _YELLOW_("%X%08X"),
|
PrintAndLogEx(SUCCESS, "%s" _YELLOW_("%X%08X"),
|
||||||
s,
|
s,
|
||||||
(uint32_t)packed->Mid,
|
(uint32_t)packed->Mid,
|
||||||
(uint32_t)packed->Bot
|
(uint32_t)packed->Bot
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ int CmdWiegandList(const char *Cmd) {
|
||||||
CLIParserInit(&ctx, "wiegand info",
|
CLIParserInit(&ctx, "wiegand info",
|
||||||
"List available wiegand formats",
|
"List available wiegand formats",
|
||||||
"wiegand list"
|
"wiegand list"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -68,7 +68,7 @@ int CmdWiegandEncode(const char *Cmd) {
|
||||||
CLIParserInit(&ctx, "wiegand encode",
|
CLIParserInit(&ctx, "wiegand encode",
|
||||||
"Encode wiegand formatted number to raw hex",
|
"Encode wiegand formatted number to raw hex",
|
||||||
"wiegand encode -w H10301 --fc 101 --cn 1337"
|
"wiegand encode -w H10301 --fc 101 --cn 1337"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -91,7 +91,7 @@ int CmdWiegandEncode(const char *Cmd) {
|
||||||
|
|
||||||
int len = 0;
|
int len = 0;
|
||||||
char format[16] = {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);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
int idx = HIDFindCardFormat(format);
|
int idx = HIDFindCardFormat(format);
|
||||||
|
@ -118,7 +118,7 @@ int CmdWiegandDecode(const char *Cmd) {
|
||||||
CLIParserInit(&ctx, "wiegand decode",
|
CLIParserInit(&ctx, "wiegand decode",
|
||||||
"Decode raw hex to wiegand format",
|
"Decode raw hex to wiegand format",
|
||||||
"wiegand decode --raw 2006f623ae"
|
"wiegand decode --raw 2006f623ae"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -131,7 +131,7 @@ int CmdWiegandDecode(const char *Cmd) {
|
||||||
bool ignore_parity = arg_get_lit(ctx, 1);
|
bool ignore_parity = arg_get_lit(ctx, 1);
|
||||||
int len = 0;
|
int len = 0;
|
||||||
char hex[40] = {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);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue