nfc-mfclassic.c:623:6: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
bool is_directwrite()
^~~~~~~~~~~~~~
nfc-mfclassic.c: In function ‘is_directwrite’:
nfc-mfclassic.c:623:6: warning: old-style function definition [-Wold-style-definition]
Modify pcsc.c and mifare.c files.
1. add code into pcsc.c to have support Mifare classic card.
2. The PCSC reader has SW value, add response data length for PCSC
reader
Adding support for extended Magic cards:
- DirectWrite cards
- One Time Write cards
Direct Write cards support modification of B0 directly, without any unlock codes. When we are attempting to detect if a card is 'magic', we will attempt to modify B0 directly as an initial check.
One Time Write cards support modification of B0 directly, one time only. They do not respond to magic commands, but have a fixed UID coming out of the factory. We now detect this UID, and if so, deem the card 'magic'.
Adding support for "DirectWrite" Ultralight tags.
- The latest generation of "Magic" Ultralight tags support DirectWrite to B0.
- Several versions of these cards are bricked if the older 'unlock' command is issued to the card.
- To avoid this, when detecting if a card is magic, we attempt to modify B0 directly. If this fails, we proceed with an unlock command.
Currently, we return false, and after turning set the bFailure state.
This is of course not possible.
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
We use a variable, uiBlocks, to determine how many blocks to read/write.
Reading is actually done via a hardcoded 0xF value however.
Additionally, make uiblocks a const, as we use it as a constant and
change the page variable to uint32_t for consistency sake.
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>