mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
down to precisely 300 problems
This commit is contained in:
parent
fbed379691
commit
107bfe469a
3 changed files with 13 additions and 9 deletions
|
@ -372,11 +372,15 @@ static int CmdHFFidoRegister(const char *cmd) {
|
|||
PrintAndLogEx(INFO, "");
|
||||
PrintAndLogEx(INFO, "auth command: ");
|
||||
char command[500] = {0};
|
||||
sprintf(command, "hf fido auth --kh %s", sprint_hex_inrow(&buf[67], keyHandleLen));
|
||||
if (chlen)
|
||||
sprintf(command + strlen(command), " --%s %s", cpplain ? "cp" : "cpx", cpplain ? (char *)cdata : sprint_hex_inrow(cdata, 32));
|
||||
if (applen)
|
||||
sprintf(command + strlen(command), " --%s %s", applain ? "cp" : "cpx", applain ? (char *)adata : sprint_hex_inrow(adata, 32));
|
||||
snprintf(command, sizeof(command), "hf fido auth --kh %s", sprint_hex_inrow(&buf[67], keyHandleLen));
|
||||
if (chlen) {
|
||||
size_t command_len = strlen(command);
|
||||
snprintf(command + command_len, sizeof(command) - command_len, " --%s %s", cpplain ? "cp" : "cpx", cpplain ? (char *)cdata : sprint_hex_inrow(cdata, 32));
|
||||
}
|
||||
if (applen) {
|
||||
size_t command_len = strlen(command);
|
||||
snprintf(command + command_len, sizeof(command) - command_len, " --%s %s", applain ? "cp" : "cpx", applain ? (char *)adata : sprint_hex_inrow(adata, 32));
|
||||
}
|
||||
PrintAndLogEx(INFO, "%s", command);
|
||||
|
||||
if (root) {
|
||||
|
|
|
@ -1521,10 +1521,11 @@ static void mf_get_paritybinstr(char *s, uint32_t val, uint8_t par) {
|
|||
num_to_bytes(val, sizeof(uint32_t), foo);
|
||||
for (uint8_t i = 0; i < 4; i++) {
|
||||
if (oddparity8(foo[i]) != ((par >> (7 - (i & 0x0007))) & 0x01))
|
||||
sprintf(s++, "1");
|
||||
*(s++) = '1';
|
||||
else
|
||||
sprintf(s++, "0");
|
||||
*(s++) = '0';
|
||||
}
|
||||
s[0] = '\0';
|
||||
}
|
||||
|
||||
bool DecodeMifareData(uint8_t *cmd, uint8_t cmdsize, uint8_t *parity, bool isResponse, uint8_t *mfData, size_t *mfDataLen, const uint64_t *dicKeys, uint32_t dicKeysCount) {
|
||||
|
|
|
@ -683,8 +683,7 @@ static int CmdHfLTODump(const char *Cmd) {
|
|||
}
|
||||
|
||||
if (strlen(filename) == 0) {
|
||||
char *fptr = filename;
|
||||
fptr += sprintf(fptr, "hf-lto-");
|
||||
char *fptr = filename + snprintf(filename, sizeof(filename), "hf-lto-");
|
||||
FillFileNameByUID(fptr, dump, "-dump", 5);
|
||||
}
|
||||
saveFile(filename, ".bin", dump, dump_len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue