mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
chg: 'hw detectreader' cleanup
This commit is contained in:
parent
e2e0b704c5
commit
238eda8b17
1 changed files with 12 additions and 5 deletions
|
@ -309,15 +309,22 @@ static void lookupChipID(uint32_t iChipID, uint32_t mem_used) {
|
|||
|
||||
static int CmdDetectReader(const char *Cmd) {
|
||||
uint16_t arg = 0;
|
||||
// 'l' means LF - 125/134 kHz
|
||||
if (*Cmd == 'l') {
|
||||
char c = tolower(Cmd[0]);
|
||||
switch ( c ) {
|
||||
case 'l':
|
||||
arg = 1;
|
||||
} else if (*Cmd == 'h') {
|
||||
break;
|
||||
case 'h':
|
||||
arg = 2;
|
||||
} else if (*Cmd != '\0') {
|
||||
PrintAndLogEx(NORMAL, "use 'detectreader' or 'detectreader l' or 'detectreader h'");
|
||||
break;
|
||||
default: {
|
||||
PrintAndLogEx(NORMAL, "use 'detectreader'");
|
||||
PrintAndLogEx(NORMAL, " 'detectreader l' -- 125/134 kHz");
|
||||
PrintAndLogEx(NORMAL, " 'detectreader h' -- 13.56 mHz");
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
}
|
||||
|
||||
clearCommandBuffer();
|
||||
SendCommandOLD(CMD_LISTEN_READER_FIELD, arg, 0, 0, NULL, 0);
|
||||
return PM3_SUCCESS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue