mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
chg: code cleaning
This commit is contained in:
parent
c74360a629
commit
a4069fe2aa
2 changed files with 4 additions and 8 deletions
|
@ -684,14 +684,14 @@ static bool hitag2_authenticate(byte_t* rx, const size_t rxlen, byte_t* tx, size
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*txlen = 5;
|
*txlen = 5;
|
||||||
memcpy(tx,"\xc0",nbytes(*txlen));
|
memcpy(tx,"\xc0", nbytes(*txlen));
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
// Received UID, crypto tag answer
|
// Received UID, crypto tag answer
|
||||||
case 32: {
|
case 32: {
|
||||||
if (!bCrypto) {
|
if (!bCrypto) {
|
||||||
*txlen = 64;
|
*txlen = 64;
|
||||||
memcpy(tx,NrAr,8);
|
memcpy(tx, NrAr, 8);
|
||||||
bCrypto = true;
|
bCrypto = true;
|
||||||
} else {
|
} else {
|
||||||
DbpString("Authentication succesful!");
|
DbpString("Authentication succesful!");
|
||||||
|
@ -701,7 +701,7 @@ static bool hitag2_authenticate(byte_t* rx, const size_t rxlen, byte_t* tx, size
|
||||||
|
|
||||||
// Unexpected response
|
// Unexpected response
|
||||||
default: {
|
default: {
|
||||||
Dbprintf("Uknown frame length: %d",rxlen);
|
Dbprintf("Uknown frame length: %d", rxlen);
|
||||||
return false;
|
return false;
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
@ -863,7 +863,7 @@ void SnoopHitag(uint32_t type) {
|
||||||
AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG;
|
AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG;
|
||||||
|
|
||||||
// Reset the received frame, frame count and timing info
|
// Reset the received frame, frame count and timing info
|
||||||
memset(rx,0x00,sizeof(rx));
|
memset(rx, 0x00, sizeof(rx));
|
||||||
frame_count = 0;
|
frame_count = 0;
|
||||||
response = 0;
|
response = 0;
|
||||||
overflow = 0;
|
overflow = 0;
|
||||||
|
@ -1452,9 +1452,6 @@ void ReaderHitag(hitag_function htf, hitag_data* htd) {
|
||||||
|
|
||||||
// Capture tag frame (manchester decoding using only falling edges)
|
// Capture tag frame (manchester decoding using only falling edges)
|
||||||
if (ra >= HITAG_T_EOF) {
|
if (ra >= HITAG_T_EOF) {
|
||||||
if (rxlen != 0) {
|
|
||||||
//DbpString("wierd1?");
|
|
||||||
}
|
|
||||||
// Capture the T0 periods that have passed since last communication or field drop (reset)
|
// Capture the T0 periods that have passed since last communication or field drop (reset)
|
||||||
// We always recieve a 'one' first, which has the falling edge after a half period |-_|
|
// We always recieve a 'one' first, which has the falling edge after a half period |-_|
|
||||||
response = ra-HITAG_T_TAG_HALF_PERIOD;
|
response = ra-HITAG_T_TAG_HALF_PERIOD;
|
||||||
|
|
|
@ -962,7 +962,6 @@ void SimulateHitagSTag(bool tag_mem_supplied, byte_t* data) {
|
||||||
|
|
||||||
tag.pstate = HT_READY;
|
tag.pstate = HT_READY;
|
||||||
tag.tstate = HT_NO_OP;
|
tag.tstate = HT_NO_OP;
|
||||||
tag.tstate = HT_NO_OP;
|
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
for (j = 0; j < 4; j++)
|
for (j = 0; j < 4; j++)
|
||||||
tag.pages[i][j] = 0x0;
|
tag.pages[i][j] = 0x0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue