mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
check cipurse via hf search
This commit is contained in:
parent
f267df2fb7
commit
ae6580f65b
3 changed files with 20 additions and 0 deletions
|
@ -129,6 +129,15 @@ int CmdHFSearch(const char *Cmd) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PROMPT_CLEARLINE;
|
||||||
|
PrintAndLogEx(INPLACE, " Searching for Cipurse tag...");
|
||||||
|
if (IfPm3Iso14443a()) {
|
||||||
|
if (CheckCardCipurse()) {
|
||||||
|
PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("Cipurse tag") " found\n");
|
||||||
|
res = PM3_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 14b is the longest test
|
// 14b is the longest test
|
||||||
PROMPT_CLEARLINE;
|
PROMPT_CLEARLINE;
|
||||||
PrintAndLogEx(INPLACE, " Searching for ISO14443-B tag...");
|
PrintAndLogEx(INPLACE, " Searching for ISO14443-B tag...");
|
||||||
|
|
|
@ -84,6 +84,15 @@ static int CmdHFCipurseInfo(const char *Cmd) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
bool CheckCardCipurse(void) {
|
||||||
|
uint8_t buf[APDU_RES_LEN] = {0};
|
||||||
|
size_t len = 0;
|
||||||
|
uint16_t sw = 0;
|
||||||
|
int res = CIPURSESelect(true, false, buf, sizeof(buf), &len, &sw);
|
||||||
|
|
||||||
|
return (res == 0 && sw == 0x9000);
|
||||||
|
}
|
||||||
|
|
||||||
static command_t CommandTable[] = {
|
static command_t CommandTable[] = {
|
||||||
{"help", CmdHelp, AlwaysAvailable, "This help."},
|
{"help", CmdHelp, AlwaysAvailable, "This help."},
|
||||||
{"info", CmdHFCipurseInfo, IfPm3Iso14443a, "Info about Cipurse tag."},
|
{"info", CmdHFCipurseInfo, IfPm3Iso14443a, "Info about Cipurse tag."},
|
||||||
|
|
|
@ -20,4 +20,6 @@
|
||||||
|
|
||||||
int CmdHFCipurse(const char *Cmd);
|
int CmdHFCipurse(const char *Cmd);
|
||||||
|
|
||||||
|
bool CheckCardCipurse(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue