+ if (atqaPresent) {\r
+ if (param_getchar(Cmd, argi)) {\r
+ if (param_gethex(Cmd, argi, atqa, 4)) {\r
+ PrintAndLog("ATQA must include 4 HEX symbols");\r
+ return 1;\r
+ }\r
+ argi++;\r
+ if (!param_getchar(Cmd, argi) || param_gethex(Cmd, argi, sak, 2)) {\r
+ PrintAndLog("SAK must include 2 HEX symbols");\r
+ return 1;\r
+ }\r
+ argi++;\r
+ } else\r
+ atqaPresent = 0;\r
+ }\r
+\r
+ if(!wipeCard) {\r
+ ctmp = param_getchar(Cmd, argi);\r
+ if (ctmp == 'w' || ctmp == 'W') {\r
+ wipeCard = 1;\r
+ }\r
+ }\r
+\r
+ PrintAndLog("--wipe card:%s uid:%s", (wipeCard)?"YES":"NO", sprint_hex(uid, 4));\r
+\r
+ res = mfCSetUID(uid, (atqaPresent)?atqa:NULL, (atqaPresent)?sak:NULL, oldUid, wipeCard);\r