mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 21:33:19 -07:00
Emv scan (#691)
* added `hf emv scan` command and options * add tlv tag save to json * added tlv tree navigation * added kernel id and moved some parts of code in ppse * save gpo result * added read records * extract childs from tlv works * added application data list * added work with application data section * flag --extract works * refactoring: move json functions to emvjson.h/c * added path.c to jansson * refactoring: move ParamLoadFromJson * refactoring: move defparams.json to tag-name-value structure * refactoring and add key recovering * added some codes to appdata list * refactoring: process response format 1 from GPO * added save mode * added RID to app data * add file name handling and small refactoring in argtable string processing * added finalization logic to `emv scan` and option to remove hash checking in key recovery
This commit is contained in:
parent
54e3cfcb74
commit
95b697f017
20 changed files with 1209 additions and 241 deletions
|
@ -27,6 +27,11 @@
|
|||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
static bool strictExecution = true;
|
||||
void PKISetStrictExecution(bool se) {
|
||||
strictExecution = se;
|
||||
}
|
||||
|
||||
static const unsigned char empty_tlv_value[] = {};
|
||||
static const struct tlv empty_tlv = {.tag = 0x0, .len = 0, .value = empty_tlv_value};
|
||||
|
||||
|
@ -108,9 +113,12 @@ static unsigned char *emv_pki_decode_message(const struct emv_pk *enc_pk,
|
|||
printf("ERROR: Calculated wrong hash\n");
|
||||
printf("decoded: %s\n",sprint_hex(data + data_len - 1 - hash_len, hash_len));
|
||||
printf("calculated: %s\n",sprint_hex(crypto_hash_read(ch), hash_len));
|
||||
crypto_hash_close(ch);
|
||||
free(data);
|
||||
return NULL;
|
||||
|
||||
if (strictExecution) {
|
||||
crypto_hash_close(ch);
|
||||
free(data);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
crypto_hash_close(ch);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue