mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
prep for a asn1 selftest check
This commit is contained in:
parent
154d454f23
commit
09bd5c7bcd
1 changed files with 6 additions and 1 deletions
|
@ -2911,14 +2911,19 @@ static int CmdAsn1Decoder(const char *Cmd) {
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
arg_str1("d", NULL, "<hex>", "ASN1 encoded byte array"),
|
arg_str0("d", NULL, "<hex>", "ASN1 encoded byte array"),
|
||||||
|
arg_lit0("t", "test", "perform selftest"),
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
||||||
int dlen = 2048;
|
int dlen = 2048;
|
||||||
uint8_t data[2048];
|
uint8_t data[2048];
|
||||||
CLIGetHexWithReturn(ctx, 1, data, &dlen);
|
CLIGetHexWithReturn(ctx, 1, data, &dlen);
|
||||||
|
bool selftest = arg_get_lit(ctx, 2);
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
if (selftest) {
|
||||||
|
// return asn1_selftest();
|
||||||
|
}
|
||||||
|
|
||||||
// print ASN1 decoded array in TLV view
|
// print ASN1 decoded array in TLV view
|
||||||
PrintAndLogEx(INFO, "---------------- " _CYAN_("ASN1 TLV") " -----------------");
|
PrintAndLogEx(INFO, "---------------- " _CYAN_("ASN1 TLV") " -----------------");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue