mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
code style
This commit is contained in:
parent
5f003f168d
commit
67d6ba97a5
1 changed files with 6 additions and 6 deletions
|
@ -633,7 +633,7 @@ static bool hitag2_write_page(uint8_t *rx, const size_t rxlen, uint8_t *tx, size
|
||||||
memcpy(tx, writedata, 4);
|
memcpy(tx, writedata, 4);
|
||||||
writestate = WRITE_STATE_PROG;
|
writestate = WRITE_STATE_PROG;
|
||||||
} else {
|
} else {
|
||||||
Dbprintf("hitag2_write_page: Page number was not received correctly: rxlen=%d rx=%02x%02x%02x%02x",
|
Dbprintf("hitag2_write_page: Page number was not received correctly: rxlen %d rx %02x%02x%02x%02x",
|
||||||
rxlen, rx[0], rx[1], rx[2], rx[3]);
|
rxlen, rx[0], rx[1], rx[2], rx[3]);
|
||||||
bSuccessful = false;
|
bSuccessful = false;
|
||||||
return false;
|
return false;
|
||||||
|
@ -648,7 +648,7 @@ static bool hitag2_write_page(uint8_t *rx, const size_t rxlen, uint8_t *tx, size
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
DbpString("hitag2_write_page: Unknown state %d");
|
Dbprintf("hitag2_write_page: Unknown state %d", writestate);
|
||||||
bSuccessful = false;
|
bSuccessful = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -660,8 +660,8 @@ static bool hitag2_password(uint8_t *rx, const size_t rxlen, uint8_t *tx, size_t
|
||||||
// Reset the transmission frame length
|
// Reset the transmission frame length
|
||||||
*txlen = 0;
|
*txlen = 0;
|
||||||
|
|
||||||
if (bPwd && !bAuthenticating && write) {
|
if (bPwd && (bAuthenticating == false) && write) {
|
||||||
if (!hitag2_write_page(rx, rxlen, tx, txlen)) {
|
if (hitag2_write_page(rx, rxlen, tx, txlen) == false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -682,7 +682,7 @@ static bool hitag2_password(uint8_t *rx, const size_t rxlen, uint8_t *tx, size_t
|
||||||
// Received UID, tag password
|
// Received UID, tag password
|
||||||
case 32: {
|
case 32: {
|
||||||
// stage 1, got UID
|
// stage 1, got UID
|
||||||
if (!bPwd) {
|
if (bPwd == false) {
|
||||||
bPwd = true;
|
bPwd = true;
|
||||||
bAuthenticating = true;
|
bAuthenticating = true;
|
||||||
memcpy(tx, password, 4);
|
memcpy(tx, password, 4);
|
||||||
|
@ -916,7 +916,7 @@ static bool hitag2_test_auth_attempts(uint8_t *rx, const size_t rxlen, uint8_t *
|
||||||
|
|
||||||
// Received UID, crypto tag answer, or read block response
|
// Received UID, crypto tag answer, or read block response
|
||||||
case 32: {
|
case 32: {
|
||||||
if (!bCrypto) {
|
if (bCrypto == false) {
|
||||||
*txlen = 64;
|
*txlen = 64;
|
||||||
memcpy(tx, NrAr, 8);
|
memcpy(tx, NrAr, 8);
|
||||||
bCrypto = true;
|
bCrypto = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue