mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-22 06:13:51 -07:00
changes due to replaced reply command (reply_mix(...) -> reply_ng(...))
This commit is contained in:
parent
de20270532
commit
9e2e1db6e1
1 changed files with 14 additions and 12 deletions
|
@ -233,8 +233,8 @@ static void print_info_result(PacketResponseNG *resp, const em4x50_data_t *etd,
|
||||||
// display all information info result in structured format
|
// display all information info result in structured format
|
||||||
|
|
||||||
bool bpwd_given = etd->pwd_given;
|
bool bpwd_given = etd->pwd_given;
|
||||||
bool bsuccess = (bool)resp->oldarg[0];
|
bool bsuccess = (bool)(resp->status & 0x2);
|
||||||
bool blogin = (bool)resp->oldarg[1];
|
bool blogin = (bool)(resp->status & 0x1);
|
||||||
bool bpwc, braw;
|
bool bpwc, braw;
|
||||||
int fwr, lwr, fwrp, lwrp, fwwi, lwwi;
|
int fwr, lwr, fwrp, lwrp, fwwi, lwwi;
|
||||||
uint8_t *data = resp->data.asBytes;
|
uint8_t *data = resp->data.asBytes;
|
||||||
|
@ -390,7 +390,7 @@ int CmdEM4x50Info(const char *Cmd) {
|
||||||
// envoke reading of a EM4x50 tag which has to be on the antenna because
|
// envoke reading of a EM4x50 tag which has to be on the antenna because
|
||||||
// decoding is done by the device (not on client side)
|
// decoding is done by the device (not on client side)
|
||||||
|
|
||||||
bool errors = false, verbose = false;
|
bool errors = false, verbose = false, success = false;
|
||||||
uint8_t cmdp = 0;
|
uint8_t cmdp = 0;
|
||||||
em4x50_data_t etd;
|
em4x50_data_t etd;
|
||||||
PacketResponseNG resp;
|
PacketResponseNG resp;
|
||||||
|
@ -440,10 +440,11 @@ int CmdEM4x50Info(const char *Cmd) {
|
||||||
return PM3_ETIMEOUT;
|
return PM3_ETIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// prepare result
|
// print result
|
||||||
print_info_result(&resp, &etd, verbose);
|
print_info_result(&resp, &etd, verbose);
|
||||||
|
|
||||||
return ((bool)resp.oldarg[0]) ? PM3_SUCCESS : PM3_ESOFT;
|
success = resp.status & 0x2;
|
||||||
|
return (success) ? PM3_SUCCESS : PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_write_result(PacketResponseNG *resp, const em4x50_data_t *etd) {
|
static void print_write_result(PacketResponseNG *resp, const em4x50_data_t *etd) {
|
||||||
|
@ -451,8 +452,8 @@ static void print_write_result(PacketResponseNG *resp, const em4x50_data_t *etd)
|
||||||
// display result of writing operation in structured format
|
// display result of writing operation in structured format
|
||||||
|
|
||||||
bool pwd_given = etd->pwd_given;
|
bool pwd_given = etd->pwd_given;
|
||||||
bool success = (bool)resp->oldarg[0];
|
bool success = (bool)(resp->status & 0x2);
|
||||||
bool login = (bool)resp->oldarg[1];
|
bool login = (bool)(resp->status & 0x1);
|
||||||
uint8_t *data = resp->data.asBytes;
|
uint8_t *data = resp->data.asBytes;
|
||||||
char string[400] = {0};
|
char string[400] = {0};
|
||||||
char pstring[100] = {0};
|
char pstring[100] = {0};
|
||||||
|
@ -496,7 +497,7 @@ int CmdEM4x50Write(const char *Cmd) {
|
||||||
|
|
||||||
// envoke writing a single word (32 bit) to a EM4x50 tag
|
// envoke writing a single word (32 bit) to a EM4x50 tag
|
||||||
|
|
||||||
bool errors = false, bword = false, baddr = false;
|
bool errors = false, bword = false, baddr = false, success = false;
|
||||||
uint8_t cmdp = 0;
|
uint8_t cmdp = 0;
|
||||||
em4x50_data_t etd;
|
em4x50_data_t etd;
|
||||||
PacketResponseNG resp;
|
PacketResponseNG resp;
|
||||||
|
@ -562,14 +563,15 @@ int CmdEM4x50Write(const char *Cmd) {
|
||||||
// get, prepare and print response
|
// get, prepare and print response
|
||||||
print_write_result(&resp, &etd);
|
print_write_result(&resp, &etd);
|
||||||
|
|
||||||
return ((bool)resp.oldarg[0]) ? PM3_SUCCESS : PM3_ESOFT;
|
success = (bool)(resp.status & 0x2);
|
||||||
|
return (success) ? PM3_SUCCESS : PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_write_password_result(PacketResponseNG *resp, const em4x50_data_t *etd) {
|
static void print_write_password_result(PacketResponseNG *resp, const em4x50_data_t *etd) {
|
||||||
|
|
||||||
// display result of password changing operation
|
// display result of password changing operation
|
||||||
|
|
||||||
bool success = (bool)resp->oldarg[0];
|
bool success = (bool)resp->status;
|
||||||
char string[400] = {0};
|
char string[400] = {0};
|
||||||
char pstring[100] = {0};
|
char pstring[100] = {0};
|
||||||
|
|
||||||
|
@ -647,5 +649,5 @@ int CmdEM4x50WritePassword(const char *Cmd) {
|
||||||
// get, prepare and print response
|
// get, prepare and print response
|
||||||
print_write_password_result(&resp, &etd);
|
print_write_password_result(&resp, &etd);
|
||||||
|
|
||||||
return ((bool)resp.oldarg[0]) ? PM3_SUCCESS : PM3_ESOFT;
|
return ((bool)resp.status) ? PM3_SUCCESS : PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue