+\r
+ // fill in the new values\r
+ // UID\r
+ memcpy(block0, uid, 4); \r
+ // Mifare UID BCC\r
+ block0[4] = block0[0]^block0[1]^block0[2]^block0[3];\r
+ // mifare classic SAK(byte 5) and ATQA(byte 6 and 7, reversed)\r
+ if (sak!=NULL)\r
+ block0[5]=sak[0];\r
+ if (atqa!=NULL) {\r
+ block0[6]=atqa[1];\r
+ block0[7]=atqa[0];\r
+ }\r
+ PrintAndLog("new block 0: %s", sprint_hex(block0,16));\r