mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
changed byte_t -> uint8_t
This commit is contained in:
parent
ffdd91cab6
commit
ca9061bd32
13 changed files with 56 additions and 56 deletions
|
@ -807,8 +807,8 @@ void e_MifareECardLoad(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *dat
|
|||
struct Crypto1State *pcs;
|
||||
pcs = &mpcs;
|
||||
|
||||
byte_t dataoutbuf[16];
|
||||
byte_t dataoutbuf2[16];
|
||||
uint8_t dataoutbuf[16];
|
||||
uint8_t dataoutbuf2[16];
|
||||
|
||||
iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN);
|
||||
|
||||
|
@ -1006,7 +1006,7 @@ int saMifareCSetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *data
|
|||
uint8_t wipeC[] = {0x41};
|
||||
|
||||
// variables
|
||||
byte_t isOK = 0;
|
||||
uint8_t isOK = 0;
|
||||
uint8_t d_block[18] = {0x00};
|
||||
|
||||
uint8_t receivedAnswer[MAX_MIFARE_FRAME_SIZE];
|
||||
|
|
|
@ -59,7 +59,7 @@ static int saMifareCSetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_
|
|||
uint8_t wipeC[] = {0x41};
|
||||
|
||||
// variables
|
||||
byte_t isOK = 0;
|
||||
uint8_t isOK = 0;
|
||||
uint8_t d_block[18] = {0x00};
|
||||
|
||||
uint8_t receivedAnswer[MAX_MIFARE_FRAME_SIZE];
|
||||
|
|
|
@ -769,16 +769,16 @@ void UsbPacketReceived(uint8_t *packet, int len) {
|
|||
SniffHitag(c->arg[0]);
|
||||
break;
|
||||
case CMD_SIMULATE_HITAG: // Simulate Hitag tag, args = memory content
|
||||
SimulateHitagTag((bool)c->arg[0], (byte_t *)c->d.asBytes);
|
||||
SimulateHitagTag((bool)c->arg[0], c->d.asBytes);
|
||||
break;
|
||||
case CMD_READER_HITAG: // Reader for Hitag tags, args = type and function
|
||||
ReaderHitag((hitag_function)c->arg[0], (hitag_data *)c->d.asBytes);
|
||||
break;
|
||||
case CMD_SIMULATE_HITAG_S:// Simulate Hitag s tag, args = memory content
|
||||
SimulateHitagSTag((bool)c->arg[0], (byte_t *)c->d.asBytes);
|
||||
SimulateHitagSTag((bool)c->arg[0], c->d.asBytes);
|
||||
break;
|
||||
case CMD_TEST_HITAGS_TRACES:// Tests every challenge within the given file
|
||||
check_challenges((bool)c->arg[0], (byte_t *)c->d.asBytes);
|
||||
check_challenges((bool)c->arg[0], c->d.asBytes);
|
||||
break;
|
||||
case CMD_READ_HITAG_S: //Reader for only Hitag S tags, args = key or challenge
|
||||
ReadHitagS((hitag_function)c->arg[0], (hitag_data *)c->d.asBytes);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
static bool bQuiet;
|
||||
static bool bSuccessful;
|
||||
static struct hitagS_tag tag;
|
||||
static byte_t page_to_be_written = 0;
|
||||
static uint8_t page_to_be_written = 0;
|
||||
static int block_data_left = 0;
|
||||
|
||||
typedef enum modulation {
|
||||
|
@ -33,7 +33,7 @@ static MOD m = AC2K; // used modulation
|
|||
static uint32_t temp_uid;
|
||||
static int temp2 = 0;
|
||||
static int sof_bits; // number of start-of-frame bits
|
||||
static byte_t pwdh0, pwdl0, pwdl1; // password bytes
|
||||
static uint8_t pwdh0, pwdl0, pwdl1; // password bytes
|
||||
static uint32_t rnd = 0x74124485; // randomnumber
|
||||
static int test = 0;
|
||||
size_t blocknr;
|
||||
|
|
|
@ -1978,7 +1978,7 @@ static int GetATQA(uint8_t *resp, uint8_t *resp_par) {
|
|||
// if anticollision is false, then the UID must be provided in uid_ptr[]
|
||||
// and num_cascades must be set (1: 4 Byte UID, 2: 7 Byte UID, 3: 10 Byte UID)
|
||||
// requests ATS unless no_rats is true
|
||||
int iso14443a_select_card(byte_t *uid_ptr, iso14a_card_select_t *p_card, uint32_t *cuid_ptr, bool anticollision, uint8_t num_cascades, bool no_rats) {
|
||||
int iso14443a_select_card(uint8_t *uid_ptr, iso14a_card_select_t *p_card, uint32_t *cuid_ptr, bool anticollision, uint8_t num_cascades, bool no_rats) {
|
||||
|
||||
uint8_t sel_all[] = { ISO14443A_CMD_ANTICOLL_OR_SELECT, 0x20 };
|
||||
uint8_t sel_uid[] = { ISO14443A_CMD_ANTICOLL_OR_SELECT, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
|
|
@ -46,8 +46,8 @@ void MifareReadBlock(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain)
|
|||
ui64Key = bytes_to_num(datain, 6);
|
||||
|
||||
// variables
|
||||
byte_t isOK = 0;
|
||||
byte_t dataoutbuf[16] = {0x00};
|
||||
uint8_t isOK = 0;
|
||||
uint8_t dataoutbuf[16] = {0x00};
|
||||
uint8_t uid[10] = {0x00};
|
||||
uint32_t cuid = 0;
|
||||
struct Crypto1State mpcs = {0, 0};
|
||||
|
@ -137,7 +137,7 @@ void MifareUC_Auth(uint8_t arg0, uint8_t *keybytes) {
|
|||
// datain = PWD bytes,
|
||||
void MifareUReadBlock(uint8_t arg0, uint8_t arg1, uint8_t *datain) {
|
||||
uint8_t blockNo = arg0;
|
||||
byte_t dataout[16] = {0x00};
|
||||
uint8_t dataout[16] = {0x00};
|
||||
bool useKey = (arg1 == 1); //UL_C
|
||||
bool usePwd = (arg1 == 2); //UL_EV1/NTAG
|
||||
|
||||
|
@ -206,8 +206,8 @@ void MifareReadSector(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain)
|
|||
ui64Key = bytes_to_num(datain, 6);
|
||||
|
||||
// variables
|
||||
byte_t isOK = 0;
|
||||
byte_t dataoutbuf[16 * 16];
|
||||
uint8_t isOK = 0;
|
||||
uint8_t dataoutbuf[16 * 16];
|
||||
uint8_t uid[10] = {0x00};
|
||||
uint32_t cuid = 0;
|
||||
struct Crypto1State mpcs = {0, 0};
|
||||
|
@ -368,13 +368,13 @@ void MifareWriteBlock(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain)
|
|||
uint8_t blockNo = arg0;
|
||||
uint8_t keyType = arg1;
|
||||
uint64_t ui64Key = 0;
|
||||
byte_t blockdata[16] = {0x00};
|
||||
uint8_t blockdata[16] = {0x00};
|
||||
|
||||
ui64Key = bytes_to_num(datain, 6);
|
||||
memcpy(blockdata, datain + 10, 16);
|
||||
|
||||
// variables
|
||||
byte_t isOK = 0;
|
||||
uint8_t isOK = 0;
|
||||
uint8_t uid[10] = {0x00};
|
||||
uint32_t cuid = 0;
|
||||
struct Crypto1State mpcs = {0, 0};
|
||||
|
@ -430,7 +430,7 @@ void MifareWriteBlock(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain)
|
|||
void MifareUWriteBlockCompat(uint8_t arg0, uint8_t *datain)
|
||||
{
|
||||
uint8_t blockNo = arg0;
|
||||
byte_t blockdata[16] = {0x00};
|
||||
uint8_t blockdata[16] = {0x00};
|
||||
|
||||
memcpy(blockdata, datain, 16);
|
||||
|
||||
|
@ -477,7 +477,7 @@ void MifareUWriteBlock(uint8_t arg0, uint8_t arg1, uint8_t *datain) {
|
|||
uint8_t blockNo = arg0;
|
||||
bool useKey = (arg1 == 1); //UL_C
|
||||
bool usePwd = (arg1 == 2); //UL_EV1/NTAG
|
||||
byte_t blockdata[4] = {0x00};
|
||||
uint8_t blockdata[4] = {0x00};
|
||||
|
||||
memcpy(blockdata, datain, 4);
|
||||
|
||||
|
@ -539,7 +539,7 @@ void MifareUWriteBlock(uint8_t arg0, uint8_t arg1, uint8_t *datain) {
|
|||
void MifareUSetPwd(uint8_t arg0, uint8_t *datain) {
|
||||
|
||||
uint8_t pwd[16] = {0x00};
|
||||
byte_t blockdata[4] = {0x00};
|
||||
uint8_t blockdata[4] = {0x00};
|
||||
|
||||
memcpy(pwd, datain, 16);
|
||||
|
||||
|
@ -1630,7 +1630,7 @@ void MifareEMemSet(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain)
|
|||
|
||||
void MifareEMemGet(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain) {
|
||||
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
|
||||
byte_t buf[USB_CMD_DATA_SIZE] = {0x00};
|
||||
uint8_t buf[USB_CMD_DATA_SIZE] = {0x00};
|
||||
emlGetMem(buf, arg0, arg1); // data, block num, blocks count (max 4)
|
||||
|
||||
LED_B_ON();
|
||||
|
@ -1652,8 +1652,8 @@ void MifareECardLoad(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
|
|||
pcs = &mpcs;
|
||||
|
||||
// variables
|
||||
byte_t dataoutbuf[16] = {0x00};
|
||||
byte_t dataoutbuf2[16] = {0x00};
|
||||
uint8_t dataoutbuf[16] = {0x00};
|
||||
uint8_t dataoutbuf2[16] = {0x00};
|
||||
uint8_t uid[10] = {0x00};
|
||||
|
||||
LED_A_ON();
|
||||
|
@ -2053,7 +2053,7 @@ void MifareSetMod(uint8_t mod, uint8_t *key) {
|
|||
// DESFIRE
|
||||
//
|
||||
void Mifare_DES_Auth1(uint8_t arg0, uint8_t *datain) {
|
||||
byte_t dataout[12] = {0x00};
|
||||
uint8_t dataout[12] = {0x00};
|
||||
uint8_t uid[10] = {0x00};
|
||||
uint32_t cuid = 0;
|
||||
|
||||
|
@ -2081,8 +2081,8 @@ void Mifare_DES_Auth1(uint8_t arg0, uint8_t *datain) {
|
|||
void Mifare_DES_Auth2(uint32_t arg0, uint8_t *datain) {
|
||||
uint32_t cuid = arg0;
|
||||
uint8_t key[16] = {0x00};
|
||||
byte_t dataout[12] = {0x00};
|
||||
byte_t isOK = 0;
|
||||
uint8_t dataout[12] = {0x00};
|
||||
uint8_t isOK = 0;
|
||||
|
||||
memcpy(key, datain, 16);
|
||||
|
||||
|
|
|
@ -384,7 +384,7 @@ int mifare_classic_writeblock(struct Crypto1State *pcs, uint32_t uid, uint8_t bl
|
|||
uint16_t len = 0;
|
||||
uint32_t pos = 0;
|
||||
uint8_t par[3] = {0x00, 0x00, 0x00}; // enough for 18 Bytes to send
|
||||
byte_t res = 0;
|
||||
uint8_t res = 0;
|
||||
|
||||
uint8_t d_block[18], d_block_enc[18];
|
||||
uint8_t receivedAnswer[MAX_MIFARE_FRAME_SIZE] = {0x00};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue