This commit is contained in:
Philippe Teuwen
2020-09-12 00:31:17 +02:00
parent 3c9ca8f5bc
commit 812d9cc46a
5 changed files with 44 additions and 44 deletions

View File

@@ -995,7 +995,7 @@ static int CmdHF14AMfDump(const char *Cmd) {
PrintAndLogEx(WARNING, "Could not find file " _YELLOW_("%s"), keyFilename);
return PM3_EFILE;
}
PrintAndLogEx(INFO, "Using `" _YELLOW_("%s") "`", keyFilename);
// Read keys A from file
@@ -3169,7 +3169,7 @@ static int CmdHF14AMfChk(const char *Cmd) {
PrintAndLogEx(NORMAL, "." NOLF);
fflush(stdout);
if (kbd_enter_pressed()) {
PrintAndLogEx(INFO, "\naborted via keyboard!\n");
goto out;
@@ -3748,7 +3748,7 @@ int CmdHF14AMfELoad(const char *Cmd) {
}
PrintAndLogEx(NORMAL, "." NOLF);
fflush(stdout);
blockNum++;
counter += blockWidth;
datalen -= blockWidth;
@@ -4525,7 +4525,7 @@ static int CmdHF14AMfCView(const char *Cmd) {
free(dump);
return PM3_ESOFT;
}
PrintAndLogEx(NORMAL, "." NOLF);
fflush(stdout);
}

View File

@@ -232,7 +232,7 @@ int demodFDX(void) {
setDemodBuff(DemodBuffer, 128, preambleIndex);
setClockGrid(g_DemodClock, g_DemodStartIdx + (preambleIndex * g_DemodClock));
// remove marker bits (1's every 9th digit after preamble) (pType = 2)
size = removeParity(DemodBuffer, 11, 9, 2, 117);
if (size != 104) {
@@ -246,21 +246,21 @@ int demodFDX(void) {
offset = 38;
uint16_t countryCode = bytebits_to_byteLSBF(DemodBuffer + offset, 10);
offset += 10;
uint8_t dataBlockBit = DemodBuffer[offset];
offset++;
uint32_t reservedCode = bytebits_to_byteLSBF(DemodBuffer + offset, 14);
offset += 14;
uint8_t animalBit = DemodBuffer[offset];
offset++;
uint16_t crc = bytebits_to_byteLSBF(DemodBuffer + offset, 16);
offset += 16;
uint32_t extended = bytebits_to_byteLSBF(DemodBuffer + offset, 24);
uint32_t extended = bytebits_to_byteLSBF(DemodBuffer + offset, 24);
uint64_t rawid = (uint64_t)(bytebits_to_byte(DemodBuffer, 32)) << 32 | bytebits_to_byte(DemodBuffer + 32, 32);
uint8_t raw[8];
@@ -389,13 +389,13 @@ static int CmdFdxClone(const char *Cmd) {
}
}
if (errors || strlen(Cmd) == 0) return usage_lf_fdx_clone();
verify_values(&national_code, &country_code, &extended, &is_animal);
PrintAndLogEx(INFO, " Country code %"PRIu32, country_code);
PrintAndLogEx(INFO, " National code %"PRIu64, national_code);
PrintAndLogEx(INFO, " Set animal bit %c", (is_animal) ? 'Y':'N');
PrintAndLogEx(INFO, "Set data block bit %c", (has_extended) ? 'Y':'N');
PrintAndLogEx(INFO, " Set animal bit %c", (is_animal) ? 'Y' : 'N');
PrintAndLogEx(INFO, "Set data block bit %c", (has_extended) ? 'Y' : 'N');
PrintAndLogEx(INFO, " Extended data 0x%"PRIX32, extended);
PrintAndLogEx(INFO, " RFU 0");
@@ -469,13 +469,13 @@ static int CmdFdxSim(const char *Cmd) {
}
}
if (errors) return usage_lf_fdx_sim();
verify_values(&national_code, &country_code, &extended, &is_animal);
PrintAndLogEx(INFO, " Country code %"PRIu32, country_code);
PrintAndLogEx(INFO, " National code %"PRIu64, national_code);
PrintAndLogEx(INFO, " Set animal bit %c", (is_animal) ? 'Y':'N');
PrintAndLogEx(INFO, "Set data block bit %c", (has_extended) ? 'Y':'N');
PrintAndLogEx(INFO, " Set animal bit %c", (is_animal) ? 'Y' : 'N');
PrintAndLogEx(INFO, "Set data block bit %c", (has_extended) ? 'Y' : 'N');
PrintAndLogEx(INFO, " Extended data 0x%"PRIX32, extended);
PrintAndLogEx(INFO, " RFU 0");

View File

@@ -356,7 +356,7 @@ int getGuardBits(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint8_t *guardBits) {
rawbytes[i + 4] = bytebits_to_byte(pre + (i * 8), 8);
PrintAndLogEx(DEBUG, " WIE | %s", sprint_hex(rawbytes, sizeof(rawbytes)));
// XOR (only works on wiegand stuff)
for (i = 1; i < sizeof(rawbytes); ++i)
rawbytes[i] ^= xorKey ;