From 7600eb5ebbb8ac0f7532e7e7ae6cb5d4dc29d30b Mon Sep 17 00:00:00 2001 From: laforge Date: Tue, 8 Nov 2005 10:34:18 +0000 Subject: - better layering abstraciton - differentiate between library internal definitions and public ones - implement getopt/setopt like get/setsockopt - offer speed changing controls git-svn-id: https://svn.gnumonks.org/trunk/librfid@1662 e0336214-984f-0b4b-a45f-81c69e1f0ede --- utils/openct-escape.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/openct-escape.c b/utils/openct-escape.c index 6f19eb5..0f9a68a 100644 --- a/utils/openct-escape.c +++ b/utils/openct-escape.c @@ -24,6 +24,7 @@ #include #include #include +#include static struct rfid_reader_handle *rh; static struct rfid_layer2_handle *l2h; @@ -250,7 +251,7 @@ mifare_classic_read(struct rfid_protocol_handle *ph) if (ret < 0) return ret; - printf("Page 0x%x: %s\n", i, rfid_hexdump(buf, 4)); + printf("Page 0x%x: %s\n", i, rfid_hexdump(buf, len)); } return 0; } @@ -319,12 +320,12 @@ int main(int argc, char **argv) #endif break; case RFID_PROTOCOL_MIFARE_CLASSIC: - rc = mfcl_set_key(ph, MIFARE_CL_KEYB_DEFAULT); + rc = mfcl_set_key(ph, MIFARE_CL_KEYA_DEFAULT_INFINEON); if (rc < 0) { printf("key format error\n"); exit(1); } - rc = mfcl_auth(ph, RFID_CMD_MIFARE_AUTH1B, 10); + rc = mfcl_auth(ph, RFID_CMD_MIFARE_AUTH1A, 0); if (rc < 0) { printf("mifare auth error\n"); exit(1); -- cgit v1.2.3