Merge pull request #191 from brianpow/reformat-usage-text

reformat usage text
This commit is contained in:
Iceman 2018-02-27 16:21:03 +01:00 committed by GitHub
commit 14a6c8e879
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -268,29 +268,29 @@ static char* TagErrorStr(uint8_t error) {
} }
int usage_15_demod(void){ int usage_15_demod(void){
PrintAndLogEx(NORMAL, "Tries to demodulate / decode ISO15693, from downloaded samples."); PrintAndLogEx(NORMAL, "Tries to demodulate / decode ISO15693, from downloaded samples.\n"
PrintAndLogEx(NORMAL, "Gather samples with 'hf 15 read' / 'hf 15 record'"); "Gather samples with 'hf 15 read' / 'hf 15 record'");
return 0; return 0;
} }
int usage_15_samples(void){ int usage_15_samples(void){
PrintAndLogEx(NORMAL, "Acquire samples as Reader (enables carrier, send inquiry"); PrintAndLogEx(NORMAL, "Acquire samples as Reader (enables carrier, send inquiry\n"
PrintAndLogEx(NORMAL, "and download it to graphbuffer. Try 'hf 15 demod' to try to demodulate/decode signal"); "and download it to graphbuffer. Try 'hf 15 demod' to try to demodulate/decode signal");
return 0; return 0;
} }
int usage_15_info(void){ int usage_15_info(void){
PrintAndLogEx(NORMAL, "Uses the optional command 'get_systeminfo' 0x2B to try and extract information"); PrintAndLogEx(NORMAL, "Uses the optional command 'get_systeminfo' 0x2B to try and extract information\n"
PrintAndLogEx(NORMAL, "command may fail, depending on tag."); "command may fail, depending on tag.\n"
PrintAndLogEx(NORMAL, "defaults to '1 out of 4' mode"); "defaults to '1 out of 4' mode\n"
PrintAndLogEx(NORMAL, ""); "\n"
PrintAndLogEx(NORMAL, "Usage: hf 15 info [options] <uid|s|u|*>"); "Usage: hf 15 info [options] <uid|s|u|*>\n"
PrintAndLogEx(NORMAL, "Options:"); "Options:\n"
PrintAndLogEx(NORMAL, " -2 use slower '1 out of 256' mode"); "\t-2 use slower '1 out of 256' mode\n"
PrintAndLogEx(NORMAL, " uid (either): "); "\tuid (either): \n"
PrintAndLogEx(NORMAL, " <8B hex> full UID eg E011223344556677"); "\t <8B hex> full UID eg E011223344556677\n"
PrintAndLogEx(NORMAL, " u unaddressed mode"); "\t u unaddressed mode\n"
PrintAndLogEx(NORMAL, " * scan for tag"); "\t * scan for tag\n"
PrintAndLogEx(NORMAL, "Examples:"); "Examples:\n"
PrintAndLogEx(NORMAL, " hf 15 info u"); "\thf 15 info u");
return 0; return 0;
} }
int usage_15_record(void){ int usage_15_record(void){
@ -298,21 +298,21 @@ int usage_15_record(void){
return 0; return 0;
} }
int usage_15_reader(void){ int usage_15_reader(void){
PrintAndLogEx(NORMAL, "This command identifies a ISO 15693 tag"); PrintAndLogEx(NORMAL, "This command identifies a ISO 15693 tag\n"
PrintAndLogEx(NORMAL, ""); "\n"
PrintAndLogEx(NORMAL, "Usage: hf 15 reader [h]"); "Usage: hf 15 reader [h]\n"
PrintAndLogEx(NORMAL, "Options:"); "Options:\n"
PrintAndLogEx(NORMAL, " h this help"); "\th this help\n"
PrintAndLogEx(NORMAL, ""); "\n"
PrintAndLogEx(NORMAL, "Example:"); "Example:\n"
PrintAndLogEx(NORMAL, " hf 15 reader"); "\thf 15 reader");
return 0; return 0;
} }
int usage_15_sim(void){ int usage_15_sim(void){
PrintAndLogEx(NORMAL, "Usage: hf 15 sim <UID>"); PrintAndLogEx(NORMAL, "Usage: hf 15 sim <UID>\n"
PrintAndLogEx(NORMAL, ""); "\n"
PrintAndLogEx(NORMAL, "Example:"); "Example:\n"
PrintAndLogEx(NORMAL, " hf 15 sim E016240000000000"); "\thf 15 sim E016240000000000");
return 0; return 0;
} }
int usage_15_findafi(void){ int usage_15_findafi(void){
@ -320,72 +320,72 @@ int usage_15_findafi(void){
return 0; return 0;
} }
int usage_15_dump(void){ int usage_15_dump(void){
PrintAndLogEx(NORMAL, "This command dumps the contents of a ISO-15693 tag and save it to file"); PrintAndLogEx(NORMAL, "This command dumps the contents of a ISO-15693 tag and save it to file\n"
PrintAndLogEx(NORMAL, ""); "\n"
PrintAndLogEx(NORMAL, "Usage: hf 15 dump [h] <f filname> "); "Usage: hf 15 dump [h] <f filname> \n"
PrintAndLogEx(NORMAL, "Options:"); "Options:\n"
PrintAndLogEx(NORMAL, " h this help"); "\th this help\n"
PrintAndLogEx(NORMAL, " f <name> filename, if no <name> UID will be used as filename"); "\tf <name> filename, if no <name> UID will be used as filename\n"
PrintAndLogEx(NORMAL, ""); "\n"
PrintAndLogEx(NORMAL, "Example:"); "Example:\n"
PrintAndLogEx(NORMAL, " hf 15 dump f"); "\thf 15 dump f\n"
PrintAndLogEx(NORMAL, " hf 15 dump f mydump"); "\thf 15 dump f mydump");
return 0; return 0;
} }
int usage_15_restore(void){ int usage_15_restore(void){
PrintAndLogEx(NORMAL, "Usage: hf 15 restore [-2] [-o] [h] [r <NUM>] [u <UID>] [f <filename>] [b <block size>]"); PrintAndLogEx(NORMAL, "Usage: hf 15 restore [-2] [-o] [h] [r <NUM>] [u <UID>] [f <filename>] [b <block size>]\n"
PrintAndLogEx(NORMAL, "Options:"); "Options:\n"
PrintAndLogEx(NORMAL, "\th this help"); "\th this help\n"
PrintAndLogEx(NORMAL, "\t-2 use slower '1 out of 256' mode"); "\t-2 use slower '1 out of 256' mode\n"
PrintAndLogEx(NORMAL, "\t-o set OPTION Flag (needed for TI)"); "\t-o set OPTION Flag (needed for TI)\n"
PrintAndLogEx(NORMAL, "\tr <NUM> numbers of retries on error, default is 3"); "\tr <NUM> numbers of retries on error, default is 3\n"
PrintAndLogEx(NORMAL, "\tu <UID> load hf-15-dump-<UID>.bin"); "\tu <UID> load hf-15-dump-<UID>.bin\n"
PrintAndLogEx(NORMAL, "\tf <filename> load <filename>"); "\tf <filename> load <filename>\n"
PrintAndLogEx(NORMAL, "\tb <block size> block size, default is 4"); "\tb <block size> block size, default is 4");
return 0; return 0;
} }
int usage_15_raw(void){ int usage_15_raw(void){
PrintAndLogEx(NORMAL, "Usage: hf 15 raw [-r] [-2] [-c] <0A 0B 0C ... hex>"); PrintAndLogEx(NORMAL, "Usage: hf 15 raw [-r] [-2] [-c] <0A 0B 0C ... hex>\n"
PrintAndLogEx(NORMAL, " -r do not read response"); "\t-r do not read response\n"
PrintAndLogEx(NORMAL, " -2 use slower '1 out of 256' mode"); "\t-2 use slower '1 out of 256' mode\n"
PrintAndLogEx(NORMAL, " -c calculate and append CRC"); "\t-c calculate and append CRC\n"
PrintAndLogEx(NORMAL, " Tip: turn on debugging for verbose output"); "\tTip: turn on debugging for verbose output");
return 0; return 0;
} }
int usage_15_read(void){ int usage_15_read(void){
PrintAndLogEx(NORMAL, "Usage: hf 15 read [options] <uid|s|u|*> <page#>"); PrintAndLogEx(NORMAL, "Usage: hf 15 read [options] <uid|s|u|*> <page#>\n"
PrintAndLogEx(NORMAL, "Options:"); "Options:\n"
PrintAndLogEx(NORMAL, " -2 use slower '1 out of 256' mode"); "\t-2 use slower '1 out of 256' mode\n"
PrintAndLogEx(NORMAL, " uid (either): "); "\tuid (either): \n"
PrintAndLogEx(NORMAL, " <8B hex> full UID eg E011223344556677"); "\t <8B hex> full UID eg E011223344556677\n"
PrintAndLogEx(NORMAL, " u unaddressed mode"); "\t u unaddressed mode\n"
PrintAndLogEx(NORMAL, " * scan for tag"); "\t * scan for tag\n"
PrintAndLogEx(NORMAL, " page#: page number 0-255"); "\tpage#: page number 0-255");
return 0; return 0;
} }
int usage_15_write(void){ int usage_15_write(void){
PrintAndLogEx(NORMAL, "Usage: hf 15 write [options] <uid|s|u|*> <page#> <hexdata>"); PrintAndLogEx(NORMAL, "Usage: hf 15 write [options] <uid|s|u|*> <page#> <hexdata>\n"
PrintAndLogEx(NORMAL, "Options:"); "Options:\n"
PrintAndLogEx(NORMAL, " -2 use slower '1 out of 256' mode"); "\t-2 use slower '1 out of 256' mode\n"
PrintAndLogEx(NORMAL, " -o set OPTION Flag (needed for TI)"); "\t-o set OPTION Flag (needed for TI)\n"
PrintAndLogEx(NORMAL, " uid (either): "); "\tuid (either): \n"
PrintAndLogEx(NORMAL, " <8B hex> full UID eg E011223344556677"); "\t <8B hex> full UID eg E011223344556677\n"
PrintAndLogEx(NORMAL, " u unaddressed mode"); "\t u unaddressed mode\n"
PrintAndLogEx(NORMAL, " * scan for tag"); "\t * scan for tag\n"
PrintAndLogEx(NORMAL, " page#: page number 0-255"); "\tpage#: page number 0-255\n"
PrintAndLogEx(NORMAL, " hexdata: data to be written eg AA BB CC DD"); "\thexdata: data to be written eg AA BB CC DD");
return 0; return 0;
} }
int usage_15_readmulti(void){ int usage_15_readmulti(void){
PrintAndLogEx(NORMAL, "Usage: hf 15 readmulti [options] <uid|s|u|*> <start#> <count#>"); PrintAndLogEx(NORMAL, "Usage: hf 15 readmulti [options] <uid|s|u|*> <start#> <count#>\n"
PrintAndLogEx(NORMAL, "Options:"); "Options:\n"
PrintAndLogEx(NORMAL, " -2 use slower '1 out of 256' mode"); "\t-2 use slower '1 out of 256' mode\n"
PrintAndLogEx(NORMAL, " uid (either): "); "\tuid (either): \n"
PrintAndLogEx(NORMAL, " <8B hex> full UID eg E011223344556677"); "\t <8B hex> full UID eg E011223344556677\n"
PrintAndLogEx(NORMAL, " u unaddressed mode"); "\t u unaddressed mode\n"
PrintAndLogEx(NORMAL, " * scan for tag"); "\t * scan for tag\n"
PrintAndLogEx(NORMAL, " start#: page number to start 0-255"); "\tstart#: page number to start 0-255\n"
PrintAndLogEx(NORMAL, " count#: number of pages"); "\tcount#: number of pages");
return 0; return 0;
} }
// Mode 3 // Mode 3