fixed the crc annotations for iclass list. They were a bit too positive

This commit is contained in:
iceman1001 2024-10-28 20:14:33 +01:00
commit 4ca4af16e3
2 changed files with 3 additions and 2 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]
- Fixed `hf iclass list` - annotation crc handled better (@iceman1001)
- Fixed `hf_mf_uscuid_prog.lua` - bad divisions and code style fixes (@iceman1001) - Fixed `hf_mf_uscuid_prog.lua` - bad divisions and code style fixes (@iceman1001)
- Changed `hf iclass info` - now checks for cards silicon version (@antiklesys) - Changed `hf iclass info` - now checks for cards silicon version (@antiklesys)
- Changed `hf iclass legrec` - updated script implementation to ensure functionality (@antiklesys) - Changed `hf iclass legrec` - updated script implementation to ensure functionality (@antiklesys)

View file

@ -131,7 +131,7 @@ uint8_t iclass_CRC_check(bool isResponse, uint8_t *d, uint8_t n) {
//Commands to tag //Commands to tag
//Don't include the command byte //Don't include the command byte
if (!isResponse) { if (isResponse == false) {
/** /**
These commands should have CRC. Total length leftmost These commands should have CRC. Total length leftmost
4 READ 4 READ
@ -167,7 +167,7 @@ uint8_t iclass_CRC_check(bool isResponse, uint8_t *d, uint8_t n) {
In conclusion, without looking at the command; any response In conclusion, without looking at the command; any response
of length 10 or 34 should have CRC of length 10 or 34 should have CRC
**/ **/
if (n != 10 && n != 34) return true; if (n != 10 && n != 34) return 2;
return check_crc(CRC_ICLASS, d, n); return check_crc(CRC_ICLASS, d, n);
} }