CHG: replace 'samples:' with 'Examples:', unify some usage text

This commit is contained in:
Brian Pow 2018-02-09 21:18:54 +08:00
commit b1d414c680
32 changed files with 306 additions and 258 deletions

View file

@ -23,7 +23,8 @@ int usage_hf14_ice(void){
PrintAndLog(" l <limit> nonces to be collected");
PrintAndLog(" f <name> save nonces to <name> instead of hf-mf-<UID>-nonces.bin");
PrintAndLog("");
PrintAndLog("Samples: hf mf ice");
PrintAndLog("Examples:");
PrintAndLog(" hf mf ice");
PrintAndLog(" hf mf ice f nonces.bin");
return 0;
}
@ -34,18 +35,19 @@ int usage_hf14_dump(void){
PrintAndLog(" k <name> : key filename, if no <name> given, UID will be used as filename");
PrintAndLog(" f <name> : data filename, if no <name> given, UID will be used as filename");
PrintAndLog("");
PrintAndLog("Samples: hf mf dump");
PrintAndLog("Examples:");
PrintAndLog(" hf mf dump");
PrintAndLog(" hf mf dump 4");
return 0;
}
int usage_hf14_mifare(void){
PrintAndLog("Usage: hf mf darkside [h] <block number> <A|B>");
PrintAndLog("options:");
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" <block number> (Optional) target other block");
PrintAndLog(" <A|B> (optional) target key type");
PrintAndLog("samples:");
PrintAndLog("Examples:");
PrintAndLog(" hf mf darkside");
PrintAndLog(" hf mf darkside 16");
PrintAndLog(" hf mf darkside 16 B");
@ -53,7 +55,7 @@ int usage_hf14_mifare(void){
}
int usage_hf14_mf1ksim(void){
PrintAndLog("Usage: hf mf sim [h] u <uid> n <numreads> [i] [x] [e] [v]");
PrintAndLog("options:");
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" u (Optional) UID 4,7 or 10bytes. If not specified, the UID 4b from emulator memory will be used");
PrintAndLog(" n (Optional) Automatically exit simulation after <numreads> blocks have been read by reader. 0 = infinite");
@ -61,7 +63,7 @@ int usage_hf14_mf1ksim(void){
PrintAndLog(" x (Optional) Crack, performs the 'reader attack', nr/ar attack against a reader");
PrintAndLog(" e (Optional) Fill simulator keys from found keys");
PrintAndLog(" v (Optional) Verbose");
PrintAndLog("samples:");
PrintAndLog("Examples:");
PrintAndLog(" hf mf sim u 0a0a0a0a");
PrintAndLog(" hf mf sim u 11223344556677");
PrintAndLog(" hf mf sim u 112233445566778899AA");
@ -70,7 +72,7 @@ int usage_hf14_mf1ksim(void){
}
int usage_hf14_dbg(void){
PrintAndLog("Usage: hf mf dbg [h] <debug level>");
PrintAndLog("options:");
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" <debug level> (Optional) see list for valid levels");
PrintAndLog(" 0 - no debug messages");
@ -79,20 +81,20 @@ int usage_hf14_dbg(void){
PrintAndLog(" 3 - plus debug messages");
PrintAndLog(" 4 - print even debug messages in timing critical functions");
PrintAndLog(" Note: this option therefore may cause malfunction itself");
PrintAndLog("samples:");
PrintAndLog("Examples:");
PrintAndLog(" hf mf dbg 3");
return 0;
}
int usage_hf14_sniff(void){
PrintAndLog("It continuously gets data from the field and saves it to: log, emulator, emulator file.");
PrintAndLog("Usage: hf mf sniff [h] [l] [d] [f]");
PrintAndLog("options:");
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" l save encrypted sequence to logfile `uid.log`");
PrintAndLog(" d decrypt sequence and put it to log file `uid.log`");
// PrintAndLog(" n/a e decrypt sequence, collect read and write commands and save the result of the sequence to emulator memory");
PrintAndLog(" f decrypt sequence, collect read and write commands and save the result of the sequence to emulator dump file `uid.eml`");
PrintAndLog("sample:");
PrintAndLog("Example:");
PrintAndLog(" hf mf sniff l d f");
return 0;
}
@ -101,13 +103,13 @@ int usage_hf14_nested(void){
PrintAndLog(" all sectors: hf mf nested <card memory> <block number> <key A/B> <key (12 hex symbols)> [t,d]");
PrintAndLog(" one sector: hf mf nested o <block number> <key A/B> <key (12 hex symbols)>");
PrintAndLog(" <target block number> <target key A/B> [t]");
PrintAndLog("options:");
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" card memory - 0 - MINI(320 bytes), 1 - 1K, 2 - 2K, 4 - 4K, <other> - 1K");
PrintAndLog(" t transfer keys into emulator memory");
PrintAndLog(" d write keys to binary file `hf-mf-<UID>-key.bin`");
PrintAndLog(" ");
PrintAndLog("samples:");
PrintAndLog("");
PrintAndLog("Examples:");
PrintAndLog(" hf mf nested 1 0 A FFFFFFFFFFFF ");
PrintAndLog(" hf mf nested 1 0 A FFFFFFFFFFFF t ");
PrintAndLog(" hf mf nested 1 0 A FFFFFFFFFFFF d ");
@ -119,8 +121,8 @@ int usage_hf14_hardnested(void){
PrintAndLog(" hf mf hardnested <block number> <key A|B> <key (12 hex symbols)>");
PrintAndLog(" <target block number> <target key A|B> [known target key (12 hex symbols)] [w] [s]");
PrintAndLog(" or hf mf hardnested r [known target key]");
PrintAndLog(" ");
PrintAndLog("options:");
PrintAndLog("");
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" w acquire nonces and UID, and write them to binary file with default name hf-mf-<UID>-nonces.bin");
PrintAndLog(" s slower acquisition (required by some non standard cards)");
@ -128,21 +130,21 @@ int usage_hf14_hardnested(void){
PrintAndLog(" u <UID> read/write hf-mf-<UID>-nonces.bin instead of default name");
PrintAndLog(" f <name> read/write <name> instead of default name");
PrintAndLog(" t tests?");
PrintAndLog(" ");
PrintAndLog("samples:");
PrintAndLog("");
PrintAndLog("Examples:");
PrintAndLog(" hf mf hardnested 0 A FFFFFFFFFFFF 4 A");
PrintAndLog(" hf mf hardnested 0 A FFFFFFFFFFFF 4 A w");
PrintAndLog(" hf mf hardnested 0 A FFFFFFFFFFFF 4 A f nonces.bin w s");
PrintAndLog(" hf mf hardnested r");
PrintAndLog(" hf mf hardnested r a0a1a2a3a4a5");
PrintAndLog(" ");
PrintAndLog("");
PrintAndLog("Add the known target key to check if it is present in the remaining key space:");
PrintAndLog(" sample5: hf mf hardnested 0 A A0A1A2A3A4A5 4 A FFFFFFFFFFFF");
PrintAndLog(" hf mf hardnested 0 A A0A1A2A3A4A5 4 A FFFFFFFFFFFF");
return 0;
}
int usage_hf14_chk(void){
PrintAndLog("Usage: hf mf chk [h] <block number>|<*card memory> <key type (A/B/?)> [t|d] [<key (12 hex symbols)>] [<dic (*.dic)>]");
PrintAndLog("options:");
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" * all sectors based on card memory, other values then below defaults to 1k");
PrintAndLog(" 0 - MINI(320 bytes)");
@ -151,8 +153,8 @@ int usage_hf14_chk(void){
PrintAndLog(" 4 - 4K");
PrintAndLog(" d write keys to binary file");
PrintAndLog(" t write keys to emulator memory\n");
PrintAndLog(" ");
PrintAndLog("samples:");
PrintAndLog("");
PrintAndLog("Examples:");
PrintAndLog(" hf mf chk 0 A 1234567890ab keys.dic -- target block 0, Key A");
PrintAndLog(" hf mf chk *1 ? t -- target all blocks, all keys, 1K, write to emul");
PrintAndLog(" hf mf chk *1 ? d -- target all blocks, all keys, 1K, write to file");
@ -161,7 +163,7 @@ int usage_hf14_chk(void){
int usage_hf14_chk_fast(void){
PrintAndLog("This is a improved checkkeys method speedwise. It checks Mifare Classic tags sector keys against a dictionary file with keys");
PrintAndLog("Usage: hf mf fchk [h] <card memory> [t|d] [<key (12 hex symbols)>] [<dic (*.dic)>]");
PrintAndLog("options:");
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" <cardmem> all sectors based on card memory, other values than below defaults to 1k");
PrintAndLog(" 0 - MINI(320 bytes)");
@ -170,8 +172,8 @@ int usage_hf14_chk_fast(void){
PrintAndLog(" 4 - 4K");
PrintAndLog(" d write keys to binary file");
PrintAndLog(" t write keys to emulator memory\n");
PrintAndLog(" ");
PrintAndLog("samples:");
PrintAndLog("");
PrintAndLog("Examples:");
PrintAndLog(" hf mf fchk 1 1234567890ab keys.dic -- target 1K using key 1234567890ab, using dictionary file");
PrintAndLog(" hf mf fchk 1 t -- target 1K, write to emulator memory");
PrintAndLog(" hf mf fchk 1 d -- target 1K, write to file");
@ -185,24 +187,25 @@ int usage_hf14_keybrute(void){
PrintAndLog(" ---[ This attack is obsolete, try hardnested instead ]---");
PrintAndLog("");
PrintAndLog("Usage: hf mf keybrute [h] <block number> <A|B> <key>");
PrintAndLog("options:");
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" <block number> target block number");
PrintAndLog(" <A|B> target key type");
PrintAndLog(" <key> candidate key from mf_nonce_brute tool");
PrintAndLog("samples:");
PrintAndLog("Examples:");
PrintAndLog(" hf mf keybrute 1 A 000011223344");
return 0;
}
int usage_hf14_restore(void){
PrintAndLog("Usage: hf mf restore [card memory] u <UID> k <name> f <name>");
PrintAndLog("options:");
PrintAndLog("Options:");
PrintAndLog(" [card memory]: 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K");
PrintAndLog(" u <UID> : uid, try to restore from hf-mf-<UID>-key.bin and hf-mf-<UID>-data.bin");
PrintAndLog(" k <name> : key filename, specific the full filename of key file");
PrintAndLog(" f <name> : data filename, specific the full filename of data file");
PrintAndLog("");
PrintAndLog("Samples: hf mf restore -- read the UID from tag first, then restore from hf-mf-<UID>-key.bin and and hf-mf-<UID>-data.bin");
PrintAndLog("Examples:");
PrintAndLog(" hf mf restore -- read the UID from tag first, then restore from hf-mf-<UID>-key.bin and and hf-mf-<UID>-data.bin");
PrintAndLog(" hf mf restore 1 u 12345678 -- restore from hf-mf-12345678-key.bin and hf-mf-12345678-data.bin");
PrintAndLog(" hf mf restore 1 u 12345678 k dumpkey.bin -- restore from dumpkey.bin and hf-mf-12345678-data.bin");
PrintAndLog(" hf mf restore 4 -- read the UID from tag with 4K memory first, then restore from hf-mf-<UID>-key.bin and and hf-mf-<UID>-data.bin");
@ -210,14 +213,14 @@ int usage_hf14_restore(void){
}
int usage_hf14_decryptbytes(void){
PrintAndLog("Decrypt Crypto-1 encrypted bytes given some known state of crypto. See tracelog to gather needed values\n");
PrintAndLog("usage: hf mf decrypt [h] <nt> <ar_enc> <at_enc> <data>");
PrintAndLog("options:");
PrintAndLog("Usage: hf mf decrypt [h] <nt> <ar_enc> <at_enc> <data>");
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" <nt> reader nonce");
PrintAndLog(" <ar_enc> encrypted reader response");
PrintAndLog(" <at_enc> encrypted tag response");
PrintAndLog(" <data> encrypted data, taken directly after at_enc and forward");
PrintAndLog("samples:");
PrintAndLog("Examples:");
PrintAndLog(" hf mf decrypt b830049b 9248314a 9280e203 41e586f9\n");
PrintAndLog(" this sample decrypts 41e586f9 -> 3003999a Annotated: 30 03 [99 9a] auth block 3 [crc]");
return 0;
@ -225,7 +228,8 @@ int usage_hf14_decryptbytes(void){
int usage_hf14_eget(void){
PrintAndLog("Usage: hf mf eget <block number>");
PrintAndLog(" sample: hf mf eget 0 ");
PrintAndLog("Examples:");
PrintAndLog(" hf mf eget 0 ");
return 0;
}
int usage_hf14_eclr(void){
@ -235,7 +239,8 @@ int usage_hf14_eclr(void){
}
int usage_hf14_eset(void){
PrintAndLog("Usage: hf mf eset <block number> <block data (32 hex symbols)>");
PrintAndLog("sample: hf mf eset 1 000102030405060708090a0b0c0d0e0f ");
PrintAndLog("Examples:");
PrintAndLog(" hf mf eset 1 000102030405060708090a0b0c0d0e0f ");
return 0;
}
int usage_hf14_eload(void){
@ -243,8 +248,9 @@ int usage_hf14_eload(void){
PrintAndLog("Usage: hf mf eload [card memory] <file name w/o `.eml`> [numblocks]");
PrintAndLog(" [card memory]: 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K, u = UL");
PrintAndLog("");
PrintAndLog(" sample: hf mf eload filename");
PrintAndLog(" hf mf eload 4 filename");
PrintAndLog("Examples:");
PrintAndLog(" hf mf eload filename");
PrintAndLog(" hf mf eload 4 filename");
return 0;
}
int usage_hf14_esave(void){
@ -252,9 +258,10 @@ int usage_hf14_esave(void){
PrintAndLog(" Usage: hf mf esave [card memory] [file name w/o `.eml`]");
PrintAndLog(" [card memory]: 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K");
PrintAndLog("");
PrintAndLog(" sample: hf mf esave ");
PrintAndLog(" hf mf esave 4");
PrintAndLog(" hf mf esave 4 filename");
PrintAndLog("Examples:");
PrintAndLog(" hf mf esave ");
PrintAndLog(" hf mf esave 4");
PrintAndLog(" hf mf esave 4 filename");
return 0;
}
int usage_hf14_ecfill(void){
@ -263,8 +270,9 @@ int usage_hf14_ecfill(void){
PrintAndLog("Usage: hf mf ecfill <key A/B> [card memory]");
PrintAndLog(" [card memory]: 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K");
PrintAndLog("");
PrintAndLog("samples: hf mf ecfill A");
PrintAndLog(" hf mf ecfill A 4");
PrintAndLog("Examples:");
PrintAndLog(" hf mf ecfill A");
PrintAndLog(" hf mf ecfill A 4");
return 0;
}
int usage_hf14_ekeyprn(void){
@ -272,7 +280,8 @@ int usage_hf14_ekeyprn(void){
PrintAndLog("Usage: hf mf ekeyprn [card memory]");
PrintAndLog(" [card memory]: 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K");
PrintAndLog("");
PrintAndLog(" sample: hf mf ekeyprn 1");
PrintAndLog("Examples:");
PrintAndLog(" hf mf ekeyprn 1");
return 0;
}
@ -286,7 +295,7 @@ int usage_hf14_csetuid(void){
PrintAndLog(" <uid> UID 8 hex symbols");
PrintAndLog(" <atqa> ATQA 4 hex symbols");
PrintAndLog(" <sak> SAK 2 hex symbols");
PrintAndLog("samples:");
PrintAndLog("Examples:");
PrintAndLog(" hf mf csetuid 01020304");
PrintAndLog(" hf mf csetuid 01020304 0004 08 w");
return 0;
@ -300,7 +309,7 @@ int usage_hf14_csetblk(void){
PrintAndLog(" w wipe card before writing");
PrintAndLog(" <block> block number");
PrintAndLog(" <data> block data to write (32 hex symbols)");
PrintAndLog("samples:");
PrintAndLog("Examples:");
PrintAndLog(" hf mf csetblk 1 01020304050607080910111213141516");
PrintAndLog(" hf mf csetblk 1 01020304050607080910111213141516 w");
return 0;
@ -314,7 +323,7 @@ int usage_hf14_cload(void){
PrintAndLog(" h this help");
PrintAndLog(" e load card with data from emulator memory");
PrintAndLog(" <filename> load card with data from file");
PrintAndLog(" samples:");
PrintAndLog("Examples:");
PrintAndLog(" hf mf cload mydump");
PrintAndLog(" hf mf cload e");
return 0;
@ -326,7 +335,7 @@ int usage_hf14_cgetblk(void){
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" <block> block number");
PrintAndLog("samples:");
PrintAndLog("Examples:");
PrintAndLog(" hf mf cgetblk 1");
return 0;
}
@ -337,7 +346,7 @@ int usage_hf14_cgetsc(void){
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" <sector> sector number");
PrintAndLog("samples:");
PrintAndLog("Examples:");
PrintAndLog(" hf mf cgetsc 0");
return 0;
}
@ -353,7 +362,7 @@ int usage_hf14_csave(void){
PrintAndLog(" card memory 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K");
PrintAndLog(" o <filename> save data to file");
PrintAndLog("");
PrintAndLog("samples:");
PrintAndLog("Examples:");
PrintAndLog(" hf mf csave u 1");
PrintAndLog(" hf mf csave e 1");
PrintAndLog(" hf mf csave 4 o filename");
@ -366,7 +375,7 @@ int usage_hf14_nack(void) {
PrintAndLog("Options:");
PrintAndLog(" h this help");
PrintAndLog(" v verbose");
PrintAndLog("samples:");
PrintAndLog("Examples:");
PrintAndLog(" hf mf nack");
return 0;
}
@ -445,7 +454,8 @@ int CmdHF14AMfWrBl(const char *Cmd) {
if (strlen(Cmd)<3) {
PrintAndLog("Usage: hf mf wrbl <block number> <key A/B> <key (12 hex symbols)> <block data (32 hex symbols)>");
PrintAndLog(" sample: hf mf wrbl 0 A FFFFFFFFFFFF 000102030405060708090A0B0C0D0E0F");
PrintAndLog("Examples:");
PrintAndLog(" hf mf wrbl 0 A FFFFFFFFFFFF 000102030405060708090A0B0C0D0E0F");
return 0;
}
@ -492,7 +502,8 @@ int CmdHF14AMfRdBl(const char *Cmd) {
if (strlen(Cmd)<3) {
PrintAndLog("Usage: hf mf rdbl <block number> <key A/B> <key (12 hex symbols)>");
PrintAndLog(" sample: hf mf rdbl 0 A FFFFFFFFFFFF ");
PrintAndLog("Examples:");
PrintAndLog(" hf mf rdbl 0 A FFFFFFFFFFFF ");
return 0;
}
@ -541,7 +552,8 @@ int CmdHF14AMfRdSc(const char *Cmd) {
if (strlen(Cmd)<3) {
PrintAndLog("Usage: hf mf rdsc <sector number> <key A/B> <key (12 hex symbols)>");
PrintAndLog(" sample: hf mf rdsc 0 A FFFFFFFFFFFF ");
PrintAndLog("Examples:");
PrintAndLog(" hf mf rdsc 0 A FFFFFFFFFFFF ");
return 0;
}