mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
make style
This commit is contained in:
parent
2ebada74f0
commit
db4aa08b78
28 changed files with 617 additions and 617 deletions
|
@ -138,7 +138,7 @@ static void hitag_send_bit(int bit) {
|
|||
|
||||
static void hitag_send_frame(const uint8_t *frame, size_t frame_len) {
|
||||
// SOF - send start of frame
|
||||
hitag_send_bit(1);
|
||||
hitag_send_bit(1);
|
||||
hitag_send_bit(1);
|
||||
hitag_send_bit(1);
|
||||
hitag_send_bit(1);
|
||||
|
@ -399,10 +399,10 @@ static bool hitag2_write_page(uint8_t *rx, const size_t rxlen, uint8_t *tx, size
|
|||
break;
|
||||
case WRITE_STATE_PAGENUM_WRITTEN:
|
||||
// Check if page number was received correctly
|
||||
if ( (rxlen == 10)
|
||||
&& (rx[0] == (0x82 | (blocknr << 3) | ((blocknr ^ 7) >> 2)))
|
||||
&& (rx[1] == (((blocknr & 0x3) ^ 0x3) << 6))) {
|
||||
|
||||
if ((rxlen == 10)
|
||||
&& (rx[0] == (0x82 | (blocknr << 3) | ((blocknr ^ 7) >> 2)))
|
||||
&& (rx[1] == (((blocknr & 0x3) ^ 0x3) << 6))) {
|
||||
|
||||
*txlen = 32;
|
||||
memset(tx, 0, HITAG_FRAME_LEN);
|
||||
memcpy(tx, writedata, 4);
|
||||
|
@ -1280,7 +1280,7 @@ void ReaderHitag(hitag_function htf, hitag_data *htd) {
|
|||
|
||||
// Receive frame, watch for at most T0*EOF periods
|
||||
while (AT91C_BASE_TC1->TC_CV < T0 * HITAG_T_WAIT_MAX) {
|
||||
|
||||
|
||||
// Check if falling edge in tag modulation is detected
|
||||
if (AT91C_BASE_TC1->TC_SR & AT91C_TC_LDRAS) {
|
||||
// Retrieve the new timing values
|
||||
|
|
|
@ -3340,7 +3340,7 @@ void Mifare1ksim(uint8_t flags, uint8_t exitAfterNReads, uint8_t arg2, uint8_t *
|
|||
num_to_bytes(ans, 4, response);
|
||||
mf_crypto1_encrypt(pcs, response, 4, response_par);
|
||||
EmSendCmdPar(response, 4, response_par);
|
||||
|
||||
|
||||
LED_C_ON();
|
||||
|
||||
if (MF_DBGLEVEL >= 3) {
|
||||
|
|
|
@ -1938,13 +1938,13 @@ void MifareCIdent() {
|
|||
uint8_t *buf = BigBuf_malloc(USB_CMD_DATA_SIZE);
|
||||
uint8_t *uid = BigBuf_malloc(10);
|
||||
uint32_t cuid = 0;
|
||||
|
||||
|
||||
iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN);
|
||||
|
||||
// Generation 1 test
|
||||
ReaderTransmitBitsPar(wupC1, 7, NULL, NULL);
|
||||
if (!ReaderReceive(rec, recpar) || (rec[0] != 0x0a)) {
|
||||
goto TEST2;
|
||||
goto TEST2;
|
||||
};
|
||||
isGen = GEN_1B;
|
||||
|
||||
|
@ -1960,10 +1960,10 @@ TEST2:
|
|||
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
||||
SpinDelay(100);
|
||||
iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN);
|
||||
|
||||
|
||||
int res = iso14443a_select_card(uid, NULL, &cuid, true, 0, true);
|
||||
if ( res == 2 ) {
|
||||
ReaderTransmit(rats, sizeof(rats), NULL);
|
||||
if (res == 2) {
|
||||
ReaderTransmit(rats, sizeof(rats), NULL);
|
||||
res = ReaderReceive(buf, par);
|
||||
if (memcmp(buf, "\x09\x78\x00\x91\x02\xDA\xBC\x19\x10\xF0\x05", 11) == 0) {
|
||||
isGen = GEN_2;
|
||||
|
@ -1973,7 +1973,7 @@ TEST2:
|
|||
isGen = GEN_2;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
OUT:
|
||||
cmd_send(CMD_ACK, isGen, 0, 0, 0, 0);
|
||||
// turns off
|
||||
|
|
|
@ -137,15 +137,15 @@ bool IsBlock0PCF7931(uint8_t *block) {
|
|||
bool IsBlock1PCF7931(uint8_t *block) {
|
||||
// assuming all RFU bits are set to 0
|
||||
if (block[10] == 0
|
||||
&& block[11] == 0
|
||||
&& block[12] == 0
|
||||
&& block[13] == 0) {
|
||||
|
||||
if ( (block[14] & 0x7f) <= 9
|
||||
&& block[15] <= 9) {
|
||||
return true;
|
||||
}
|
||||
&& block[11] == 0
|
||||
&& block[12] == 0
|
||||
&& block[13] == 0) {
|
||||
|
||||
if ((block[14] & 0x7f) <= 9
|
||||
&& block[15] <= 9) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue