+ PrintAndLog("Samples:");
+ PrintAndLog(" hf legic crc8 b deadbeef1122");
+ PrintAndLog(" hf legic crc8 b deadbeef1122 u 9A c 16");
+ return 0;
+}
+int usage_legic_load(void){
+ PrintAndLog("It loads datasamples from the file `filename` to device memory");
+ PrintAndLog("Usage: hf legic load [h] <file name>");
+ PrintAndLog("Options:");
+ PrintAndLog(" h : this help");
+ PrintAndLog(" <filename> : Name of file to load");
+ PrintAndLog("");
+ PrintAndLog("Samples:");
+ PrintAndLog(" hf legic load filename");
+ return 0;
+}
+int usage_legic_read(void){
+ PrintAndLog("Read data from a legic tag.");
+ PrintAndLog("Usage: hf legic read [h] <offset> <length> <IV>");
+ PrintAndLog("Options:");
+ PrintAndLog(" h : this help");
+ PrintAndLog(" <offset> : offset in data array to start download from (hex)");
+ PrintAndLog(" <length> : number of bytes to read (hex)");
+ PrintAndLog(" <IV> : (optional) Initialization vector to use (hex, odd and 7bits)");
+ PrintAndLog("");
+ PrintAndLog("Samples:");
+ PrintAndLog(" hf legic read 0 21 - reads from byte[0] 21 bytes(system header)");
+ PrintAndLog(" hf legic read 0 4 55 - reads from byte[0] 4 bytes with IV 0x55");
+ PrintAndLog(" hf legic read 0 100 55 - reads 256bytes with IV 0x55");
+ return 0;
+}
+int usage_legic_sim(void){
+ PrintAndLog("Missing help text.");
+ return 0;
+}
+int usage_legic_write(void){
+ PrintAndLog(" Write sample buffer to a legic tag. (use after load or read)");
+ PrintAndLog("Usage: hf legic write [h] <offset> <length> <IV>");
+ PrintAndLog("Options:");
+ PrintAndLog(" h : this help");
+ PrintAndLog(" <offset> : offset in data array to start writing from (hex)");
+ PrintAndLog(" <length> : number of bytes to write (hex)");
+ PrintAndLog(" <IV> : (optional) Initialization vector to use (ODD and 7bits)");
+ PrintAndLog("");
+ PrintAndLog("Samples:");
+ PrintAndLog(" hf legic write 10 4 - writes 0x4 to byte[0x10]");
+ return 0;
+}
+int usage_legic_rawwrite(void){
+ PrintAndLog("Write raw data direct to a specific offset on legic tag.");
+ PrintAndLog("Usage: hf legic writeraw [h] <offset> <value> <IV>");
+ PrintAndLog("Options:");
+ PrintAndLog(" h : this help");
+ PrintAndLog(" <offset> : offset to write to (hex)");
+ PrintAndLog(" <value> : value (hex)");
+ PrintAndLog(" <IV> : (optional) Initialization vector to use (hex, odd and 7bits)");
+ PrintAndLog("");
+ PrintAndLog("Samples:");
+ PrintAndLog(" hf legic writeraw 10 4 - writes 0x4 to byte[0x10]");
+ return 0;
+}
+int usage_legic_fill(void){
+ PrintAndLog("Missing help text.");
+ return 0;
+}
+int usage_legic_info(void){
+ PrintAndLog("Read info from a legic tag.");
+ PrintAndLog("Usage: hf legic info [h]");
+ PrintAndLog("Options:");
+ PrintAndLog(" h : this help");
+ PrintAndLog("");
+ PrintAndLog("Samples:");
+ PrintAndLog(" hf legic info");