Merge pull request #2896 from Antiklesys/master

Added hf iclass sam --info
This commit is contained in:
Iceman 2025-06-10 20:39:40 +02:00 committed by GitHub
commit 8156274007
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 96 additions and 13 deletions

View file

@ -5904,6 +5904,7 @@ static int CmdHFiClassSAM(const char *Cmd) {
arg_lit0("p", "prevent", "fake epurse update"),
arg_lit0(NULL, "shallow", "shallow mod"),
arg_strx0("d", "data", "<hex>", "DER encoded command to send to SAM"),
arg_lit0(NULL, "info", "get SAM infos (version, serial number)"),
arg_param_end
};
CLIExecWithReturn(ctx, Cmd, argtable, true);
@ -5915,6 +5916,7 @@ static int CmdHFiClassSAM(const char *Cmd) {
bool break_nrmac = arg_get_lit(ctx, 5);
bool prevent = arg_get_lit(ctx, 6);
bool shallow_mod = arg_get_lit(ctx, 7);
bool info = arg_get_lit(ctx, 9);
uint8_t flags = 0;
if (disconnect_after) {
@ -5937,6 +5939,10 @@ static int CmdHFiClassSAM(const char *Cmd) {
flags |= BITMASK(4);
}
if (info) {
flags |= BITMASK(5);
}
uint8_t data[PM3_CMD_DATA_SIZE] = {0};
data[0] = flags;