mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-27 20:26:37 +00:00
Prepare libnfc 1.6.0-rc1
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
SET(UTILS-SOURCES nfc-emulate-forum-tag4 nfc-list nfc-relay-picc nfc-mfclassic nfc-mfultralight)
|
||||
SET(UTILS-SOURCES
|
||||
nfc-emulate-forum-tag4
|
||||
nfc-list
|
||||
nfc-mfclassic
|
||||
nfc-mfsetuid
|
||||
nfc-mfultralight
|
||||
nfc-probe
|
||||
nfc-read-forum-tag3
|
||||
nfc-relay-picc
|
||||
)
|
||||
|
||||
ADD_LIBRARY(nfcutils STATIC
|
||||
nfc-utils.c
|
||||
|
||||
@@ -410,24 +410,6 @@ write_card (int write_block_zero)
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
mifare_classic_extract_payload (const char *abDump, char *pbPayload)
|
||||
{
|
||||
uint8_t uiSectorIndex;
|
||||
uint8_t uiBlockIndex;
|
||||
size_t szDumpOffset;
|
||||
size_t szPayloadIndex = 0;
|
||||
|
||||
for (uiSectorIndex = 1; uiSectorIndex < 16; uiSectorIndex++) {
|
||||
for (uiBlockIndex = 0; uiBlockIndex < 3; uiBlockIndex++) {
|
||||
szDumpOffset = uiSectorIndex * 16 * 4 + uiBlockIndex * 16;
|
||||
// for(uint8_t uiByteIndex=0; uiByteIndex<16; uiByteIndex++) printf("%02x ", abDump[szPayloadIndex+uiByteIndex]);
|
||||
memcpy (pbPayload + szPayloadIndex, abDump + szDumpOffset, 16);
|
||||
szPayloadIndex += 16;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typedef enum {
|
||||
ACTION_READ,
|
||||
ACTION_WRITE,
|
||||
|
||||
Reference in New Issue
Block a user