+int usage_legic_dump(void){
+ PrintAndLog("Reads all pages from LEGIC Prime MIM22, MIM256, MIM1024");
+ PrintAndLog("and saves binary dump into the file `filename.bin` or `cardUID.bin`");
+ PrintAndLog("It autodetects card type.\n");
+ PrintAndLog("Usage: hf legic dump [h] o <filename w/o .bin>");
+ PrintAndLog("Options:");
+ PrintAndLog(" h : this help");
+ PrintAndLog(" o <filename> : filename w/o '.bin' to dump bytes");
+ PrintAndLog("");
+ PrintAndLog("Samples:");
+ PrintAndLog(" hf legic dump");
+ PrintAndLog(" hf legic dump o myfile");
+ return 0;
+}
+int usage_legic_restore(void){
+ PrintAndLog("Reads binary file and it autodetects card type and verifies that the file has the same size");
+ PrintAndLog("Then write the data back to card. All bytes except the first 7bytes [UID(4) MCC(1) DCF(2)]\n");
+ PrintAndLog("Usage: hf legic restore [h] i <filename w/o .bin>");
+ PrintAndLog("Options:");
+ PrintAndLog(" h : this help");
+ PrintAndLog(" i <filename> : filename w/o '.bin' to restore bytes on to card from");
+ PrintAndLog("");
+ PrintAndLog("Samples:");
+ PrintAndLog(" hf legic restore i myfile");
+ return 0;
+}
+int usage_legic_eload(void){
+ PrintAndLog("It loads binary dump from the file `filename.bin`");
+ PrintAndLog("Usage: hf legic eload [h] [card memory] <file name w/o `.bin`>");
+ PrintAndLog("Options:");
+ PrintAndLog(" h : this help");
+ PrintAndLog(" [card memory] : 0 = MIM22");
+ PrintAndLog(" : 1 = MIM256 (default)");
+ PrintAndLog(" : 2 = MIM1024");
+ PrintAndLog(" <filename> : filename w/o .bin to load");
+ PrintAndLog("");
+ PrintAndLog("Samples:");
+ PrintAndLog(" hf legic eload 2 myfile");
+ return 0;
+}
+int usage_legic_esave(void){
+ PrintAndLog("It saves binary dump into the file `filename.bin` or `cardID.bin`");
+ PrintAndLog(" Usage: hf legic esave [h] [card memory] [file name w/o `.bin`]");
+ PrintAndLog("Options:");
+ PrintAndLog(" h : this help");
+ PrintAndLog(" [card memory] : 0 = MIM22");
+ PrintAndLog(" : 1 = MIM256 (default)");
+ PrintAndLog(" : 2 = MIM1024");
+ PrintAndLog(" <filename> : filename w/o .bin to load");
+ PrintAndLog("");
+ PrintAndLog("Samples:");
+ PrintAndLog(" hf legic esave 2 myfile");
+ return 0;
+}
+int usage_legic_wipe(void){
+ PrintAndLog("Fills a legic tag memory with zeros. From byte7 and to the end.");
+ PrintAndLog(" Usage: hf legic wipe [h]");
+ PrintAndLog("Options:");
+ PrintAndLog(" h : this help");
+ PrintAndLog("");
+ PrintAndLog("Samples:");
+ PrintAndLog(" hf legic wipe");
+ return 0;
+}