mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -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) {
|
static int CmdDetectReader(const char *Cmd) {
|
||||||
uint16_t arg = 0;
|
uint16_t arg = 0;
|
||||||
// 'l' means LF - 125/134 kHz
|
char c = tolower(Cmd[0]);
|
||||||
if (*Cmd == 'l') {
|
switch ( c ) {
|
||||||
|
case 'l':
|
||||||
arg = 1;
|
arg = 1;
|
||||||
} else if (*Cmd == 'h') {
|
break;
|
||||||
|
case 'h':
|
||||||
arg = 2;
|
arg = 2;
|
||||||
} else if (*Cmd != '\0') {
|
break;
|
||||||
PrintAndLogEx(NORMAL, "use 'detectreader' or 'detectreader l' or 'detectreader h'");
|
default: {
|
||||||
|
PrintAndLogEx(NORMAL, "use 'detectreader'");
|
||||||
|
PrintAndLogEx(NORMAL, " 'detectreader l' -- 125/134 kHz");
|
||||||
|
PrintAndLogEx(NORMAL, " 'detectreader h' -- 13.56 mHz");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommandOLD(CMD_LISTEN_READER_FIELD, arg, 0, 0, NULL, 0);
|
SendCommandOLD(CMD_LISTEN_READER_FIELD, arg, 0, 0, NULL, 0);
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue