mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-10 15:07:30 +08:00
4x50_sim: options 'u' and 'f' can not be used at the same time
This commit is contained in:
parent
140037d9f0
commit
236e3f82d8
1 changed files with 8 additions and 2 deletions
|
@ -1041,7 +1041,7 @@ int CmdEM4x50Restore(const char *Cmd) {
|
|||
|
||||
int CmdEM4x50Sim(const char *Cmd) {
|
||||
|
||||
bool errors = false;
|
||||
bool errors = false, word_given = false;;
|
||||
uint8_t cmdp = 0;
|
||||
char filename[FILE_PATH_SIZE] = {0};
|
||||
|
||||
|
@ -1056,6 +1056,7 @@ int CmdEM4x50Sim(const char *Cmd) {
|
|||
|
||||
case 'u':
|
||||
etd.word = param_get32ex(Cmd, cmdp + 1, 0, 16);
|
||||
word_given = true;
|
||||
cmdp += 2;
|
||||
break;
|
||||
|
||||
|
@ -1071,10 +1072,15 @@ int CmdEM4x50Sim(const char *Cmd) {
|
|||
};
|
||||
}
|
||||
|
||||
// validation
|
||||
// validations
|
||||
if (errors)
|
||||
return usage_lf_em4x50_sim();
|
||||
|
||||
if (word_given && (strlen(filename) != 0)) {
|
||||
PrintAndLogEx(INFO, "Plesae use either option 'u' or option 'f'");
|
||||
return usage_lf_em4x50_sim();
|
||||
}
|
||||
|
||||
PrintAndLogEx(INFO, "Start simulating");
|
||||
|
||||
// read data from dump file; file type has to be "bin", "eml" or "json"
|
||||
|
|
Loading…
Reference in a new issue