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
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
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,
|
||||||
|
@ -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);
|
||||||
|
@ -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