mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
more cleanup noticed just now
This commit is contained in:
parent
3eb0238481
commit
acb7de9d8d
4 changed files with 0 additions and 10 deletions
|
@ -126,7 +126,6 @@ void ExecuteEMVSim(uint8_t *receivedCmd, uint16_t receivedCmd_len, uint8_t *rece
|
|||
|
||||
// use annotate to give some hints about the command
|
||||
annotate(&receivedCmd[1], receivedCmd_len-1);
|
||||
//Dbprintf("Annotated: %s", explanation);
|
||||
|
||||
// This is a common request from the reader which we can just immediately respond to since we know we can't
|
||||
// handle it.
|
||||
|
@ -138,7 +137,6 @@ void ExecuteEMVSim(uint8_t *receivedCmd, uint16_t receivedCmd_len, uint8_t *rece
|
|||
|
||||
// We want to modify corrupted request
|
||||
if ((receivedCmd_len > 5 && receivedCmd[0] != 0x03 && receivedCmd[0] != 0x02 && receivedCmd[1] == 0 && receivedCmd[4] == 0) || (receivedCmd[2] == 0xa8)) {
|
||||
//if (receivedCmd[2] == 0xa8) {
|
||||
Dbprintf("We saw signing request... modifying it into a generate ac transaction !!!!");
|
||||
|
||||
currentState = GENERATE_AC;
|
||||
|
@ -276,7 +274,6 @@ void ExecuteEMVSim(uint8_t *receivedCmd, uint16_t receivedCmd_len, uint8_t *rece
|
|||
}
|
||||
|
||||
// If we would return a PAY1 fci response, we instead return a PAY2 fci response
|
||||
//if (responseToReader[1] == fci_template_pay1[1] && true) {
|
||||
if (currentState == SELECT_PAY1_AID) {
|
||||
Dbprintf("We saw a PAY1 response... modifying it to a PAY2 response for outgoing !!!!");
|
||||
memcpy(responseToReader, fci_template_pay2, sizeof(fci_template_pay2));
|
||||
|
|
|
@ -199,7 +199,6 @@ static uint8_t MifareMaxSector(uint16_t flags) {
|
|||
}
|
||||
|
||||
bool MifareSimInit (uint16_t flags, uint8_t *uid, uint16_t atqa, uint8_t sak, tag_response_info_t **responses, uint32_t *cuid, uint8_t *uid_len, uint8_t **rats, uint8_t *rats_len) {
|
||||
//static bool MifareSimInitX(uint16_t flags, uint8_t *datain, uint16_t atqa, uint8_t sak, tag_response_info_t **responses, uint32_t *cuid, uint8_t *uid_len, uint8_t **rats, uint8_t *rats_len) {
|
||||
|
||||
uint8_t uid_tmp[10] = {0};
|
||||
// SPEC: https://www.nxp.com/docs/en/application-note/AN10833.pdf
|
||||
|
@ -294,7 +293,6 @@ bool MifareSimInit (uint16_t flags, uint8_t *uid, uint16_t atqa, uint8_t sak, ta
|
|||
rSAK[0] = rSAK_1k;
|
||||
if (g_dbglevel > DBG_NONE) Dbprintf("Enforcing Mifare 1K ATQA/SAK");
|
||||
} else if (IS_FLAG_MF_SIZE(flags, MIFARE_2K_MAX_BYTES)) {
|
||||
Dbprintf("We got this to happen!!!\n");
|
||||
memcpy(rATQA, rATQA_2k, sizeof(rATQA));
|
||||
rSAK[0] = rSAK_2k;
|
||||
*rats = rRATS;
|
||||
|
|
|
@ -694,14 +694,11 @@ static int CmdEMVSmartToNFC(const char *Cmd) {
|
|||
}
|
||||
|
||||
FLAG_SET_MF_SIZE(flags, MIFARE_2K_MAX_BYTES);
|
||||
//snprintf(csize, sizeof(csize), "2K with RATS");
|
||||
//k_sectors_cnt = MIFARE_2K_MAXSECTOR; // todo: delete
|
||||
|
||||
flags |= FLAG_ATQA_IN_DATA;
|
||||
flags |= FLAG_SAK_IN_DATA;
|
||||
|
||||
payload.flags = flags;
|
||||
//payload.flags = 0x1204;
|
||||
payload.exitAfter = 0x1;
|
||||
payload.atqa = 0x0;
|
||||
payload.sak = 0x20;
|
||||
|
|
|
@ -496,8 +496,6 @@ ISO 7816-4 Basic interindustry commands. For command APDU's.
|
|||
#define ISO7816_GENERATE_APPLICATION_CRYPTOGRAM 0xAE
|
||||
#define ISO7816_GET_PROCESSING_OPTIONS 0xA8
|
||||
#define ISO7816_PIN_CHANGE 0x24
|
||||
#define ISO7816_PIN_CHANGE 0x24
|
||||
|
||||
|
||||
#define ISO7816_GET_RESPONSE 0xC0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue