X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/53d5dc643f592124676b4290c8f81e6039e9abc7..4c8fe2e976f0330944e032231007feede2e32ff8:/armsrc/emvutil.c?ds=sidebyside diff --git a/armsrc/emvutil.c b/armsrc/emvutil.c index c4c29613..be19d32a 100644 --- a/armsrc/emvutil.c +++ b/armsrc/emvutil.c @@ -370,14 +370,18 @@ exitfunction: //goto label to exit search quickly once found //function to int emv_settag(uint32_t tag, uint8_t *datain, emvtags *currentcard){ char binarydata[255] = {0}; - //if((strlen((const char *)datain)%2) != 0){ //must be an even string + + /* + // if((strlen((const char *)datain)%2) != 0){ //must be an even string // return -1; - //} - //if(strlen((const char *)datain) > 255) { + // } + // if(strlen((const char *)datain) > 255) { // return -1; - //} - uint8_t datalen = strlen((const char *)datain) / 2; //length of datain - for(int i=0;i 0){ memcpy(&(processingCmd[7]), pdol, pdol_len);} processingCmd[processingCmd_len] = 0x00; - //Dbhexdump(processingCmd_len, processingCmd, false); - return iso14_apdu(processingCmd,processingCmd_len,false, 0, data); + return iso14_apdu(processingCmd, processingCmd_len, data); } int emv_computecryptogram(uint8_t* UDOL, uint8_t UDOL_len, void *data) @@ -1402,7 +1405,7 @@ int emv_computecryptogram(uint8_t* UDOL, uint8_t UDOL_len, void *data) memcpy(&(cryptogramCmd[5]), UDOL, UDOL_len); cryptogramCmd[cryptogramCmd_len-1] = 0x00; - return iso14_apdu(cryptogramCmd,cryptogramCmd_len,false, 0,data); + return iso14_apdu(cryptogramCmd, cryptogramCmd_len, data); } int emv_getchallenge(void *data) @@ -1416,7 +1419,7 @@ int emv_getchallenge(void *data) challengeCmd[3] = 0x00; challengeCmd[4] = 0x00; - return iso14_apdu(challengeCmd,challengeCmd_len,false, 0,data); + return iso14_apdu(challengeCmd, challengeCmd_len, data); } int emv_loopback(uint8_t* transData , uint8_t transData_len, void *data) @@ -1430,7 +1433,7 @@ int emv_loopback(uint8_t* transData , uint8_t transData_len, void *data) loopbackCmd[3] = 0x00; loopbackCmd[4] = loopbackCmd_len; memcpy(&(loopbackCmd[5]), transData, transData_len); - return iso14_apdu(loopbackCmd,loopbackCmd_len,false, 0,data); + return iso14_apdu(loopbackCmd, loopbackCmd_len, data); } //generateAC @@ -1447,15 +1450,14 @@ int emv_generateAC(uint8_t refcontrolparam, uint8_t* cdolinput, uint8_t cdolinpu memcpy(&(acCmd[5]), cdolinput, cdolinputlen); acCmd[acCmd_len-1] = 0x00; Dbhexdump(acCmd_len, acCmd,false); - return iso14_apdu(acCmd,acCmd_len,false,0,data); + return iso14_apdu(acCmd, acCmd_len, data); } -int emv_decodeAFL(uint8_t* AFL, uint8_t AFLlen ) -{ - +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) { @@ -1478,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; @@ -1543,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);