From 3f82965fa8fc0f0f0e60d0f7e0f90ebff3b710a0 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 24 Jan 2024 23:37:27 +0100 Subject: [PATCH] style --- armsrc/iso15693.c | 69 ----------------------------------------------- 1 file changed, 69 deletions(-) diff --git a/armsrc/iso15693.c b/armsrc/iso15693.c index 5540b7282..5d1c2e182 100644 --- a/armsrc/iso15693.c +++ b/armsrc/iso15693.c @@ -3168,75 +3168,6 @@ static uint32_t write_afi_15693(uint32_t start_time, uint32_t *eof_time, const u return PM3_SUCCESS; } -/* -static uint32_t enable_privacy_15693_Slix(uint32_t start_time, uint32_t *eof_time, uint8_t *uid, uint8_t pass_id, const uint8_t *password) { - uint8_t rnd[2]; - if (get_rnd_15693_Slix(start_time, eof_time, rnd) == false) { - return PM3_ETIMEOUT; - } - - uint8_t c[] = {ISO15_REQ_DATARATE_HIGH | ISO15_REQ_ADDRESS, ISO15693_ENABLE_PRIVACY, pass_id, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - memcpy(&c[3], uid, 8); - init_password_15693_Slix(&c[11], password, rnd); - AddCrc15(c, 15); - - start_time = *eof_time + DELAY_ISO15693_VICC_TO_VCD_READER; - uint8_t recvbuf[ISO15693_MAX_RESPONSE_LENGTH]; - uint16_t recvlen = 0 - int res = SendDataTag(c, sizeof(c), false, true, recvbuf, sizeof(recvbuf), start_time, ISO15693_READER_TIMEOUT_WRITE, eof_time, &recvlen); - if (res != PM3_SUCCESS && recvlen != 3) { - return PM3_EWRONGANSWER; - } - return PM3_SUCCESS; -} - -static uint32_t write_password_15693_Slix(uint32_t start_time, uint32_t *eof_time, uint8_t *uid, uint8_t pass_id, const uint8_t *password) { - uint8_t rnd[2]; - if (get_rnd_15693_Slix(start_time, eof_time, rnd) == false) { - return PM3_ETIMEOUT; - } - - uint8_t c[] = {ISO15_REQ_DATARATE_HIGH | ISO15_REQ_ADDRESS, ISO15693_WRITE_PASSWORD, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - memcpy(&c[3], uid, 8); - c[11] = pass_id; - init_password_15693_Slix(&c[12], password, NULL); - AddCrc15(c, 16); - - start_time = *eof_time + DELAY_ISO15693_VICC_TO_VCD_READER; - - uint8_t recvbuf[ISO15693_MAX_RESPONSE_LENGTH]; - uint16_t recvlen = 0; - int res = SendDataTag(c, sizeof(c), false, true, recvbuf, sizeof(recvbuf), start_time, ISO15693_READER_TIMEOUT_WRITE, eof_time, &recvlen); - if (res != PM3_SUCCESS && recvlen != 3) { - return PM3_EWRONGANSWER; - } - return PM3_SUCCESS; -} - -static uint32_t destroy_15693_Slix(uint32_t start_time, uint32_t *eof_time, uint8_t *uid, const uint8_t *password) { - - uint8_t rnd[2]; - if (get_rnd_15693_Slix(start_time, eof_time, rnd) == false) { - return PM3_ETIMEOUT; - } - - uint8_t c[] = {ISO15_REQ_DATARATE_HIGH | ISO15_REQ_ADDRESS, ISO15693_DESTROY, ISO15693_ENABLE_PRIVACY, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - memcpy(&c[3], uid, 8); - init_password_15693_Slix(&c[11], password, rnd); - AddCrc15(c, 15); - - start_time = *eof_time + DELAY_ISO15693_VICC_TO_VCD_READER; - uint8_t recvbuf[ISO15693_MAX_RESPONSE_LENGTH]; - uint16_t recvlen = 0; - int res = SendDataTag(c, sizeof(c), false, true, recvbuf, sizeof(recvbuf), start_time, ISO15693_READER_TIMEOUT_WRITE, eof_time, &recvlen); - if (res != PM3_SUCCESS && recvlen != 3) { - return PM3_EWRONGANSWER; - } - return PM3_SUCCESS; -} - -*/ - void WritePasswordSlixIso15693(const uint8_t *old_password, const uint8_t *new_password, uint8_t pwd_id) { LED_D_ON(); Iso15693InitReader();