mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
fix auth and
This commit is contained in:
parent
3354f0d9d3
commit
a1529b44ca
8 changed files with 367 additions and 257 deletions
|
@ -19,6 +19,7 @@
|
|||
#define CARD_INS_ENCRYPT 0x02
|
||||
#define CARD_INS_DECODE 0x06
|
||||
#define CARD_INS_NUMBLOCKS 0x07
|
||||
#define CARD_INS_PINSIZE 0x08
|
||||
static uint8_t cmd[] = {0x96, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
// look for CryptoHelper
|
||||
|
@ -91,3 +92,13 @@ uint8_t GetNumberBlocksForUserId(uint8_t *src) {
|
|||
ExchangeAPDUSC(true, c, sizeof(c), false, true, resp, sizeof(resp), &resp_len);
|
||||
return resp[8];
|
||||
}
|
||||
|
||||
// Call with block6
|
||||
uint8_t GetPinSize(uint8_t *src) {
|
||||
int resp_len = 0;
|
||||
uint8_t resp[254] = {0};
|
||||
uint8_t c[] = {0x96, CARD_INS_PINSIZE, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
memcpy(c + 5, src, 8);
|
||||
ExchangeAPDUSC(true, c, sizeof(c), false, true, resp, sizeof(resp), &resp_len);
|
||||
return resp[8];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue