+ printf("enter reader attack\n");\r
+ for (uint8_t i = 0; i < ATTACK_KEY_COUNT; ++i) {\r
+ if (data[i].ar2 > 0) {\r
+ \r
+ if (tryMfk32(data[i], &key)) {\r
+ PrintAndLog("Found Key%s for sector %02d: [%012"llx"]"\r
+ , (data[i].keytype) ? "B" : "A"\r
+ , data[i].sector\r
+ , key\r
+ );\r
+\r
+ k_sector[i].Key[data[i].keytype] = key;\r
+ k_sector[i].foundKey[data[i].keytype] = TRUE;\r
+ \r
+ //set emulator memory for keys\r
+ if (setEmulatorMem) {\r
+ uint8_t memBlock[16] = {0,0,0,0,0,0, 0xff, 0x0F, 0x80, 0x69, 0,0,0,0,0,0};\r
+ num_to_bytes( k_sector[i].Key[0], 6, memBlock);\r
+ num_to_bytes( k_sector[i].Key[1], 6, memBlock+10);\r
+ mfEmlSetMem( memBlock, i*4 + 3, 1);\r
+ PrintAndLog("Setting Emulator Memory Block %02d: [%s]"\r
+ , i*4 + 3\r
+ , sprint_hex( memBlock, sizeof(memBlock))\r
+ );\r
+ }\r
+ break;\r
+ }\r
+ //moebius attack \r
+ // if (tryMfk32_moebius(data[i+ATTACK_KEY_COUNT], &key)) {\r
+ // PrintAndLog("M-Found Key%s for sector %02d: [%012"llx"]"\r
+ // ,(data[i+ATTACK_KEY_COUNT].keytype) ? "B" : "A"\r
+ // , data[i+ATTACK_KEY_COUNT].sector\r
+ // , key\r
+ // );\r
+ // }\r
+ }\r