mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 02:27:26 -07:00
prevent sending corrupt data to em4x70 tags
This commit is contained in:
parent
b0b9f4fa42
commit
18cbc7259c
1 changed files with 35 additions and 0 deletions
|
@ -744,6 +744,13 @@ void em4x70_write(const em4x70_data_t *etd, bool ledcontrol) {
|
|||
|
||||
command_parity = etd->parity;
|
||||
|
||||
// Disable to prevent sending corrupted data to the tag.
|
||||
if (command_parity) {
|
||||
Dbprintf("Use of `--par` option with `lf em 4x70 write` is disabled to prevent corrupting tag data");
|
||||
reply_ng(CMD_LF_EM4X70_WRITE, PM3_ENOTIMPL, NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
init_tag();
|
||||
em4x70_setup_read();
|
||||
|
||||
|
@ -808,6 +815,13 @@ void em4x70_auth(const em4x70_data_t *etd, bool ledcontrol) {
|
|||
|
||||
command_parity = etd->parity;
|
||||
|
||||
// Disable to prevent sending corrupted data to the tag.
|
||||
if (command_parity) {
|
||||
Dbprintf("Use of `--par` option with `lf em 4x70 auth` is disabled to prevent corrupting tag data");
|
||||
reply_ng(CMD_LF_EM4X70_WRITE, PM3_ENOTIMPL, NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
init_tag();
|
||||
em4x70_setup_read();
|
||||
|
||||
|
@ -829,6 +843,13 @@ void em4x70_brute(const em4x70_data_t *etd, bool ledcontrol) {
|
|||
|
||||
command_parity = etd->parity;
|
||||
|
||||
// Disable to prevent sending corrupted data to the tag.
|
||||
if (command_parity) {
|
||||
Dbprintf("Use of `--par` option with `lf em 4x70 brute` is disabled to prevent corrupting tag data");
|
||||
reply_ng(CMD_LF_EM4X70_WRITE, PM3_ENOTIMPL, NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
init_tag();
|
||||
em4x70_setup_read();
|
||||
|
||||
|
@ -850,6 +871,13 @@ void em4x70_write_pin(const em4x70_data_t *etd, bool ledcontrol) {
|
|||
|
||||
command_parity = etd->parity;
|
||||
|
||||
// Disable to prevent sending corrupted data to the tag.
|
||||
if (command_parity) {
|
||||
Dbprintf("Use of `--par` option with `lf em 4x70 setpin` is disabled to prevent corrupting tag data");
|
||||
reply_ng(CMD_LF_EM4X70_WRITE, PM3_ENOTIMPL, NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
init_tag();
|
||||
em4x70_setup_read();
|
||||
|
||||
|
@ -892,6 +920,13 @@ void em4x70_write_key(const em4x70_data_t *etd, bool ledcontrol) {
|
|||
|
||||
command_parity = etd->parity;
|
||||
|
||||
// Disable to prevent sending corrupted data to the tag.
|
||||
if (command_parity) {
|
||||
Dbprintf("Use of `--par` option with `lf em 4x70 setkey` is disabled to prevent corrupting tag data");
|
||||
reply_ng(CMD_LF_EM4X70_WRITE, PM3_ENOTIMPL, NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
init_tag();
|
||||
em4x70_setup_read();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue