idea based on @jamchamb PR in official pm3 https://github.com/Proxmark/proxmark3/pull/584

This commit is contained in:
iceman1001 2018-03-15 20:06:12 +01:00
commit 3438d016c7
3 changed files with 5 additions and 5 deletions

View file

@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased] ## [unreleased][unreleased]
- 'hf mfu dumop / read' - now retries five times. (@jamchamb)
- Added `hf list mf` - deciphers crypto1 stream and works with first authentication and weak nested authentications (@Merlok) - Added `hf list mf` - deciphers crypto1 stream and works with first authentication and weak nested authentications (@Merlok)
- Adjusted `lf cmdread` to respond to client when complete and the client will then automatically call `data samples` (@marshmellow42) - Adjusted `lf cmdread` to respond to client when complete and the client will then automatically call `data samples` (@marshmellow42)
- Added a bitbang mode to `lf cmdread` if delay is 0 the cmd bits turn off and on the antenna with 0 and 1 respectively (@marshmellow42) - Added a bitbang mode to `lf cmdread` if delay is 0 the cmd bits turn off and on the antenna with 0 and 1 respectively (@marshmellow42)

View file

@ -362,10 +362,9 @@ int mifare_ultra_readblockEx(uint8_t blockNo, uint8_t *blockData) {
} }
int mifare_ultra_readblock(uint8_t blockNo, uint8_t *blockData) { int mifare_ultra_readblock(uint8_t blockNo, uint8_t *blockData) {
#define MFU_MAX_CRC_RETRIES 5 #define MFU_MAX_CRC_RETRIES 5
uint8_t retries = 0;
uint8_t res; uint8_t res;
for (retries = 0; retries < MFU_MAX_CRC_RETRIES; ++retries) { for (uint8_t retries = 0; retries < MFU_MAX_CRC_RETRIES; ++retries) {
res = mifare_ultra_readblockEx(blockNo, blockData); res = mifare_ultra_readblockEx(blockNo, blockData);
// break if OK, or NACK. // break if OK, or NACK.