mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
make style
This commit is contained in:
parent
2f7083a59a
commit
6290d50564
10 changed files with 38 additions and 31 deletions
|
@ -1850,17 +1850,17 @@ void iClass_WriteBlock(uint8_t *msg) {
|
||||||
if (payload->req.use_replay) {
|
if (payload->req.use_replay) {
|
||||||
memcpy(write + 10, payload->mac, sizeof(payload->mac));
|
memcpy(write + 10, payload->mac, sizeof(payload->mac));
|
||||||
} else {
|
} else {
|
||||||
// Secure tags uses MAC
|
// Secure tags uses MAC
|
||||||
uint8_t wb[9];
|
uint8_t wb[9];
|
||||||
wb[0] = payload->req.blockno;
|
wb[0] = payload->req.blockno;
|
||||||
memcpy(wb + 1, payload->data, 8);
|
memcpy(wb + 1, payload->data, 8);
|
||||||
|
|
||||||
if (payload->req.use_credit_key)
|
if (payload->req.use_credit_key)
|
||||||
doMAC_N(wb, sizeof(wb), hdr.key_c, mac);
|
doMAC_N(wb, sizeof(wb), hdr.key_c, mac);
|
||||||
else
|
else
|
||||||
doMAC_N(wb, sizeof(wb), hdr.key_d, mac);
|
doMAC_N(wb, sizeof(wb), hdr.key_d, mac);
|
||||||
|
|
||||||
memcpy(write + 10, mac, sizeof(mac));
|
memcpy(write + 10, mac, sizeof(mac));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -365,9 +365,9 @@ int CmdHFSniff(const char *Cmd) {
|
||||||
|
|
||||||
if (params.skipMode != HF_SNOOP_SKIP_NONE) {
|
if (params.skipMode != HF_SNOOP_SKIP_NONE) {
|
||||||
PrintAndLogEx(INFO, "Skip mode. Function: %s, each: %d sample",
|
PrintAndLogEx(INFO, "Skip mode. Function: %s, each: %d sample",
|
||||||
CLIGetOptionListStr(HFSnoopSkipModeOpts, params.skipMode),
|
CLIGetOptionListStr(HFSnoopSkipModeOpts, params.skipMode),
|
||||||
params.skipRatio * 2
|
params.skipRatio * 2
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
|
|
|
@ -655,7 +655,7 @@ int CmdHF14ASim(const char *Cmd) {
|
||||||
"hf 14a sim -t 4 -> ISO/IEC 14443-4\n"
|
"hf 14a sim -t 4 -> ISO/IEC 14443-4\n"
|
||||||
"hf 14a sim -t 5 -> MIFARE Tnp3xxx\n"
|
"hf 14a sim -t 5 -> MIFARE Tnp3xxx\n"
|
||||||
"hf 14a sim -t 6 -> MIFARE Mini\n"
|
"hf 14a sim -t 6 -> MIFARE Mini\n"
|
||||||
"hf 14a sim -t 7 -> AMIIBO (NTAG 215), pack 0x8080\n"
|
"hf 14a sim -t 7 -> Amiibo (NTAG 215), pack 0x8080\n"
|
||||||
"hf 14a sim -t 8 -> MIFARE Classic 4k\n"
|
"hf 14a sim -t 8 -> MIFARE Classic 4k\n"
|
||||||
"hf 14a sim -t 9 -> FM11RF005SH Shanghai Metro\n"
|
"hf 14a sim -t 9 -> FM11RF005SH Shanghai Metro\n"
|
||||||
"hf 14a sim -t 10 -> ST25TA IKEA Rothult\n");
|
"hf 14a sim -t 10 -> ST25TA IKEA Rothult\n");
|
||||||
|
@ -663,7 +663,7 @@ int CmdHF14ASim(const char *Cmd) {
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
arg_int1("t", "type", "<1-10> ", "Simulation type to use"),
|
arg_int1("t", "type", "<1-10> ", "Simulation type to use"),
|
||||||
arg_str0("u", "uid", "<hex>", "4, 7 or 10 byte UID"),
|
arg_str0("u", "uid", "<hex>", "<4|7|10> hex bytes UID"),
|
||||||
arg_int0("n", "num", "<dec>", "Exit simulation after <numreads> blocks have been read by reader. 0 = infinite"),
|
arg_int0("n", "num", "<dec>", "Exit simulation after <numreads> blocks have been read by reader. 0 = infinite"),
|
||||||
arg_lit0("x", NULL, "Performs the 'reader attack', nr/ar attack against a reader"),
|
arg_lit0("x", NULL, "Performs the 'reader attack', nr/ar attack against a reader"),
|
||||||
arg_lit0(NULL, "sk", "Fill simulator keys from found keys"),
|
arg_lit0(NULL, "sk", "Fill simulator keys from found keys"),
|
||||||
|
|
|
@ -193,9 +193,9 @@ static uint8_t TexcomTK13CRC(const uint8_t *data) {
|
||||||
|
|
||||||
static uint8_t MMBITCRC(const uint8_t *data) {
|
static uint8_t MMBITCRC(const uint8_t *data) {
|
||||||
return
|
return
|
||||||
(( (data[0] & 0x0f) ^ ((data[0] >> 4) & 0x0f) ^
|
(((data[0] & 0x0f) ^ ((data[0] >> 4) & 0x0f) ^
|
||||||
(data[1] & 0x0f) ^ ((data[1] >> 4) & 0x0f) ^
|
(data[1] & 0x0f) ^ ((data[1] >> 4) & 0x0f) ^
|
||||||
(data[2] & 0x0f) ^ ((data[2] >> 4) & 0x0f)
|
(data[2] & 0x0f) ^ ((data[2] >> 4) & 0x0f)
|
||||||
) ^ 0x0f
|
) ^ 0x0f
|
||||||
) & 0x0f;
|
) & 0x0f;
|
||||||
}
|
}
|
||||||
|
|
|
@ -470,7 +470,7 @@ static int CmdHFXeroxReader(const char *Cmd) {
|
||||||
"Act as a 14443B reader to identify a tag",
|
"Act as a 14443B reader to identify a tag",
|
||||||
"hf xerox reader\n"
|
"hf xerox reader\n"
|
||||||
"hf xerox reader -@ \n"
|
"hf xerox reader -@ \n"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
@ -495,7 +495,7 @@ static int CmdHFXeroxInfo(const char *Cmd) {
|
||||||
CLIParserInit(&ctx, "hf xerox info",
|
CLIParserInit(&ctx, "hf xerox info",
|
||||||
"Tag information for ISO/IEC 14443 type B / XEROX based tags",
|
"Tag information for ISO/IEC 14443 type B / XEROX based tags",
|
||||||
"hf xerox info"
|
"hf xerox info"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
|
|
@ -48,6 +48,7 @@ const static vocabulory_t vocabulory[] = {
|
||||||
{ 1, "prefs get savepaths" },
|
{ 1, "prefs get savepaths" },
|
||||||
{ 1, "prefs get emoji" },
|
{ 1, "prefs get emoji" },
|
||||||
{ 1, "prefs get hints" },
|
{ 1, "prefs get hints" },
|
||||||
|
{ 1, "prefs get output" },
|
||||||
{ 1, "prefs get plotsliders" },
|
{ 1, "prefs get plotsliders" },
|
||||||
{ 1, "prefs set help" },
|
{ 1, "prefs set help" },
|
||||||
{ 1, "prefs set barmode" },
|
{ 1, "prefs set barmode" },
|
||||||
|
@ -57,6 +58,7 @@ const static vocabulory_t vocabulory[] = {
|
||||||
{ 1, "prefs set emoji" },
|
{ 1, "prefs set emoji" },
|
||||||
{ 1, "prefs set hints" },
|
{ 1, "prefs set hints" },
|
||||||
{ 1, "prefs set savepaths" },
|
{ 1, "prefs set savepaths" },
|
||||||
|
{ 1, "prefs set output" },
|
||||||
{ 1, "prefs set plotsliders" },
|
{ 1, "prefs set plotsliders" },
|
||||||
{ 1, "analyse help" },
|
{ 1, "analyse help" },
|
||||||
{ 1, "analyse lcr" },
|
{ 1, "analyse lcr" },
|
||||||
|
@ -431,6 +433,7 @@ const static vocabulory_t vocabulory[] = {
|
||||||
{ 0, "hf texkom sim" },
|
{ 0, "hf texkom sim" },
|
||||||
{ 1, "hf xerox help" },
|
{ 1, "hf xerox help" },
|
||||||
{ 0, "hf xerox info" },
|
{ 0, "hf xerox info" },
|
||||||
|
{ 0, "hf xerox reader" },
|
||||||
{ 0, "hf xerox dump" },
|
{ 0, "hf xerox dump" },
|
||||||
{ 1, "hf waveshare help" },
|
{ 1, "hf waveshare help" },
|
||||||
{ 0, "hf waveshare loadbmp" },
|
{ 0, "hf waveshare loadbmp" },
|
||||||
|
|
|
@ -1236,7 +1236,7 @@ inline uint64_t leadingzeros64(uint64_t a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int byte_strstr(uint8_t* src, size_t srclen, uint8_t* pattern, size_t plen) {
|
int byte_strstr(uint8_t *src, size_t srclen, uint8_t *pattern, size_t plen) {
|
||||||
|
|
||||||
size_t max = srclen - plen + 1;
|
size_t max = srclen - plen + 1;
|
||||||
|
|
||||||
|
|
|
@ -145,5 +145,5 @@ uint64_t bitcount64(uint64_t a);
|
||||||
uint32_t leadingzeros32(uint32_t a);
|
uint32_t leadingzeros32(uint32_t a);
|
||||||
uint64_t leadingzeros64(uint64_t a);
|
uint64_t leadingzeros64(uint64_t a);
|
||||||
|
|
||||||
int byte_strstr(uint8_t* src, size_t srclen, uint8_t* pattern, size_t plen);
|
int byte_strstr(uint8_t *src, size_t srclen, uint8_t *pattern, size_t plen);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -43,6 +43,7 @@ Check column "offline" for their availability.
|
||||||
|`prefs get savepaths `|Y |`Get file folder `
|
|`prefs get savepaths `|Y |`Get file folder `
|
||||||
|`prefs get emoji `|Y |`Get emoji display preference`
|
|`prefs get emoji `|Y |`Get emoji display preference`
|
||||||
|`prefs get hints `|Y |`Get hint display preference`
|
|`prefs get hints `|Y |`Get hint display preference`
|
||||||
|
|`prefs get output `|Y |`Get dump output style preference`
|
||||||
|`prefs get plotsliders `|Y |`Get plot slider display preference`
|
|`prefs get plotsliders `|Y |`Get plot slider display preference`
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,6 +61,7 @@ Check column "offline" for their availability.
|
||||||
|`prefs set emoji `|Y |`Set emoji display`
|
|`prefs set emoji `|Y |`Set emoji display`
|
||||||
|`prefs set hints `|Y |`Set hint display`
|
|`prefs set hints `|Y |`Set hint display`
|
||||||
|`prefs set savepaths `|Y |`... to be adjusted next ... `
|
|`prefs set savepaths `|Y |`... to be adjusted next ... `
|
||||||
|
|`prefs set output `|Y |`Set dump output style`
|
||||||
|`prefs set plotsliders `|Y |`Set plot slider display`
|
|`prefs set plotsliders `|Y |`Set plot slider display`
|
||||||
|
|
||||||
|
|
||||||
|
@ -335,6 +337,7 @@ Check column "offline" for their availability.
|
||||||
|`hf gallagher clone `|N |`Add Gallagher credentials to a DESFire card`
|
|`hf gallagher clone `|N |`Add Gallagher credentials to a DESFire card`
|
||||||
|`hf gallagher delete `|N |`Delete Gallagher credentials from a DESFire card`
|
|`hf gallagher delete `|N |`Delete Gallagher credentials from a DESFire card`
|
||||||
|`hf gallagher diversifykey`|Y |`Diversify Gallagher key`
|
|`hf gallagher diversifykey`|Y |`Diversify Gallagher key`
|
||||||
|
|`hf gallagher decode `|Y |`Decode Gallagher credential block`
|
||||||
|
|
||||||
|
|
||||||
### hf ksx6924
|
### hf ksx6924
|
||||||
|
@ -666,6 +669,7 @@ Check column "offline" for their availability.
|
||||||
|------- |------- |-----------
|
|------- |------- |-----------
|
||||||
|`hf xerox help `|Y |`This help`
|
|`hf xerox help `|Y |`This help`
|
||||||
|`hf xerox info `|N |`Short info on Fuji/Xerox tag`
|
|`hf xerox info `|N |`Short info on Fuji/Xerox tag`
|
||||||
|
|`hf xerox reader `|N |`Act like a Fuji/Xerox reader`
|
||||||
|`hf xerox dump `|N |`Read all memory pages of an Fuji/Xerox tag, save to file`
|
|`hf xerox dump `|N |`Read all memory pages of an Fuji/Xerox tag, save to file`
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue