CHG: 'sc brute' - now is interruptable, optional tlv decode,

This commit is contained in:
iceman1001 2018-12-23 09:48:46 +01:00
commit acb41a7376
7 changed files with 291 additions and 91 deletions

View file

@ -120,7 +120,7 @@ static bool print_cb(void *data, const struct tlv *tlv, int level, bool is_leaf)
return true;
}
void TLVPrintFromBuffer(uint8_t *data, int datalen) {
bool TLVPrintFromBuffer(uint8_t *data, int datalen) {
struct tlvdb *t = NULL;
t = tlvdb_parse_multi(data, datalen);
if (t) {
@ -128,9 +128,11 @@ void TLVPrintFromBuffer(uint8_t *data, int datalen) {
tlvdb_visit(t, print_cb, NULL, 0);
tlvdb_free(t);
return true;
} else {
PrintAndLogEx(WARNING, "TLV ERROR: Can't parse response as TLV tree.");
}
return false;
}
void TLVPrintFromTLVLev(struct tlvdb *tlv, int level) {