mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
style
This commit is contained in:
parent
72122f090f
commit
50b9067173
2 changed files with 7 additions and 6 deletions
|
@ -690,8 +690,6 @@ static RAMFUNC int ManchesterDecoding_Thinfilm(uint8_t bit) {
|
|||
if (Demod.bitCount) { // there are some remaining data bits
|
||||
Demod.shiftReg <<= (8 - Demod.bitCount); // left align the decoded bits
|
||||
Demod.output[Demod.len++] = Demod.shiftReg & 0xFF; // and add them to the output
|
||||
|
||||
// Dbprintf("A | len... %u - %u == 0x%02x", Demod.len, Demod.bitCount, Demod.output[0]);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1271,18 +1271,21 @@ void Mifare1ksim(uint16_t flags, uint8_t exitAfterNReads, uint8_t *uid, uint16_t
|
|||
mf_crypto1_decryptEx(pcs, receivedCmd, receivedCmd_len, receivedCmd_dec);
|
||||
if (CheckCrc14A(receivedCmd_dec, receivedCmd_len)) {
|
||||
if (IsSectorTrailer(cardWRBL)) {
|
||||
|
||||
emlGetMem(response, cardWRBL, 1);
|
||||
if (!IsAccessAllowed(cardWRBL, cardAUTHKEY, AC_KEYA_WRITE)) {
|
||||
|
||||
if (IsAccessAllowed(cardWRBL, cardAUTHKEY, AC_KEYA_WRITE) == false) {
|
||||
memcpy(receivedCmd_dec, response, 6); // don't change KeyA
|
||||
}
|
||||
if (!IsAccessAllowed(cardWRBL, cardAUTHKEY, AC_KEYB_WRITE)) {
|
||||
if (IsAccessAllowed(cardWRBL, cardAUTHKEY, AC_KEYB_WRITE) == false) {
|
||||
memcpy(receivedCmd_dec + 10, response + 10, 6); // don't change KeyA
|
||||
}
|
||||
if (!IsAccessAllowed(cardWRBL, cardAUTHKEY, AC_AC_WRITE)) {
|
||||
if (IsAccessAllowed(cardWRBL, cardAUTHKEY, AC_AC_WRITE) == false) {
|
||||
memcpy(receivedCmd_dec + 6, response + 6, 4); // don't change AC bits
|
||||
}
|
||||
|
||||
} else {
|
||||
if (!IsAccessAllowed(cardWRBL, cardAUTHKEY, AC_DATA_WRITE)) {
|
||||
if (IsAccessAllowed(cardWRBL, cardAUTHKEY, AC_DATA_WRITE) == false) {
|
||||
memcpy(receivedCmd_dec, response, 16); // don't change anything
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue