Browse Source

update freefare 0.4

pierre 9 năm trước cách đây
mục cha
commit
8720242e80
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      poolset.c

+ 3 - 3
poolset.c

@@ -20,7 +20,7 @@ void rw_tag(int coins, char *buy_date, char *expire_date) {
 	
 	nfc_context *context;		//init libnfc
 	nfc_device *pnd;			//trouver un lecteur
-	MifareTag *tags = NULL;		//stockage des tags
+	FreefareTag *tags = NULL;		//stockage des tags
 	int i, nbsect;
 
 	nfc_init(&context);			
@@ -45,7 +45,7 @@ void rw_tag(int coins, char *buy_date, char *expire_date) {
 	
 	for(i=0; tags[i]; i++) {
 		switch(freefare_get_tag_type(tags[i])) {
-			case CLASSIC_1K:
+			case MIFARE_CLASSIC_1K:
 				printf("=> Tag number %u with UID %s type Mifare 1k (S50) found !\n", i, freefare_get_tag_uid(tags[i]) );
 				printf("=> Trying to authenticate with SecretKey %.2x %.2x %.2x %.2x %.2x %.2x ...\n", SecretKey[0][0], SecretKey[0][1], SecretKey[0][2], SecretKey[0][3], SecretKey[0][4], SecretKey[0][5]);
 
@@ -130,4 +130,4 @@ int main(int argc, const char **argv) {
 	if (strcmp(argv[1], "--write") == 0)
 		rw_tag(atoi(argv[2]), argv[3], argv[4]);
 
-}
+}