mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
FIX: commented code screws up notepad++ groupings.
This commit is contained in:
parent
a32e8034e0
commit
d627a2fd8c
2 changed files with 73 additions and 79 deletions
|
@ -11,15 +11,10 @@
|
|||
#include "emvcmd.h"
|
||||
|
||||
static emvtags currentcard; //use to hold emv tags for the reader/card during communications
|
||||
//static tUart Uart;
|
||||
|
||||
// The FPGA will report its internal sending delay in
|
||||
uint16_t FpgaSendQueueDelay;
|
||||
//variables used for timing purposes:
|
||||
//these are in ssp_clk cycles:
|
||||
//static uint32_t NextTransferTime;
|
||||
//static uint32_t LastTimeProxToAirStart;
|
||||
//static uint32_t LastProxToAirDuration;
|
||||
//uint16_t FpgaSendQueueDelay;
|
||||
|
||||
|
||||
//load individual tag into current card
|
||||
void EMVloadvalue(uint32_t tag, uint8_t *datain){
|
||||
|
@ -34,8 +29,6 @@ void EMVReadRecord(uint8_t arg0, uint8_t arg1,emvtags *currentcard)
|
|||
uint8_t sfi = arg1 & 0x0F; // convert arg1 to number
|
||||
uint8_t receivedAnswer[MAX_FRAME_SIZE];
|
||||
|
||||
//uint8_t receivedAnswerPar[MAX_PARITY_SIZE];
|
||||
|
||||
// variables
|
||||
tlvtag inputtag; // create the tag structure
|
||||
// perform read
|
||||
|
@ -58,7 +51,6 @@ void EMVReadRecord(uint8_t arg0, uint8_t arg1,emvtags *currentcard)
|
|||
void EMVSelectAID(uint8_t *AID, uint8_t AIDlen, emvtags* inputcard)
|
||||
{
|
||||
uint8_t receivedAnswer[MAX_FRAME_SIZE];
|
||||
//uint8_t receivedAnswerPar[MAX_PARITY_SIZE];
|
||||
|
||||
// variables
|
||||
tlvtag inputtag; // create the tag structure
|
||||
|
@ -95,7 +87,6 @@ void EMVSelectAID(uint8_t *AID, uint8_t AIDlen, emvtags* inputcard)
|
|||
int EMVGetProcessingOptions(uint8_t *PDOL, uint8_t PDOLlen, emvtags* inputcard)
|
||||
{
|
||||
uint8_t receivedAnswer[MAX_FRAME_SIZE];
|
||||
//uint8_t receivedAnswerPar[MAX_PARITY_SIZE];
|
||||
|
||||
// variables
|
||||
tlvtag inputtag; //create the tag structure
|
||||
|
@ -208,7 +199,7 @@ int EMV_PaywaveTransaction()
|
|||
Dbhexdump(2, currentcard.tag_82, false);
|
||||
emv_decodeAIP(currentcard.tag_82);
|
||||
//
|
||||
// //decode the AFL list and read records
|
||||
// decode the AFL list and read records
|
||||
uint8_t i = 0;
|
||||
uint8_t sfi = 0;
|
||||
uint8_t recordstart = 0;
|
||||
|
@ -247,7 +238,6 @@ int EMV_PaywaveTransaction()
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int EMV_PaypassTransaction()
|
||||
{
|
||||
// uint8_t *responsebuffer = emv_get_bigbufptr();
|
||||
|
@ -344,6 +334,7 @@ void EMVTransaction()
|
|||
LED_C_OFF();
|
||||
|
||||
iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN);
|
||||
|
||||
while(true) {
|
||||
if(!iso14443a_select_card(uid, NULL, &cuid, true, 0)) {
|
||||
if(EMV_DBGLEVEL >= 1) Dbprintf("Can't select card");
|
||||
|
@ -351,6 +342,7 @@ void EMVTransaction()
|
|||
}
|
||||
//selectPPSE
|
||||
EMVSelectAID((uint8_t *)DF_PSE, 14, ¤tcard); //hard coded len
|
||||
|
||||
//get response
|
||||
if (!memcmp(currentcard.tag_4F, AID_MASTERCARD, sizeof(AID_MASTERCARD))){
|
||||
Dbprintf("Mastercard Paypass Card Detected");
|
||||
|
|
|
@ -1389,7 +1389,6 @@ int emv_getprocessingoptions(uint8_t* pdol, uint8_t pdol_len, void* data)
|
|||
if(pdol_len > 0){
|
||||
memcpy(&(processingCmd[7]), pdol, pdol_len);}
|
||||
processingCmd[processingCmd_len] = 0x00;
|
||||
//Dbhexdump(processingCmd_len, processingCmd, false);
|
||||
return iso14_apdu(processingCmd, processingCmd_len, data);
|
||||
}
|
||||
|
||||
|
@ -1458,6 +1457,7 @@ int emv_decodeAFL(uint8_t* AFL, uint8_t AFLlen ){
|
|||
return 0;
|
||||
}
|
||||
|
||||
//ICEMAN: move to client
|
||||
//Print out AIP Bit meanings
|
||||
int emv_decodeAIP(uint8_t* AIP)
|
||||
{
|
||||
|
@ -1480,6 +1480,7 @@ int emv_decodeAIP(uint8_t* AIP)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//ICEMAN: move to client
|
||||
int emv_decodeCVM(uint8_t* CVM, uint8_t CVMlen)
|
||||
{
|
||||
uint8_t counter = 0;
|
||||
|
@ -1545,6 +1546,7 @@ int emv_decodeCVM(uint8_t* CVM, uint8_t CVMlen)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//ICEMAN: move to client
|
||||
//dump the current card to the console
|
||||
void dumpCard(emvtags* currentcard){
|
||||
DUMP(currentcard->ATQA);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue