add short option and fix typo

This commit is contained in:
tcprst 2020-11-23 16:07:03 -05:00
commit 0c0411c144
No known key found for this signature in database
GPG key ID: 9145EAF5121AED25
2 changed files with 8 additions and 8 deletions

View file

@ -1014,20 +1014,20 @@ static int CmdHFiClassDecrypt(const char *Cmd) {
CLIParserContext *clictx; CLIParserContext *clictx;
CLIParserInit(&clictx, "hf iclass decrypt", CLIParserInit(&clictx, "hf iclass decrypt",
"3DES decrypt data\n" "3DES decrypt data\n"
"This is naive implementation, it tries to decrypt every block after block 6.\n" "This is a naive implementation, it tries to decrypt every block after block 6.\n"
"Correct behaviour would be to decrypt only the application areas where the key is valid,\n" "Correct behaviour would be to decrypt only the application areas where the key is valid,\n"
"which is defined by the configuration block.\n" "which is defined by the configuration block.\n"
"OBS! In order to use this function, the file 'iclass_decryptionkey.bin' must reside\n" "OBS! In order to use this function, the file 'iclass_decryptionkey.bin' must reside\n"
"in the resources directory. The file should be 16 bytes binary data", "in the resources directory. The file should be 16 bytes binary data",
"hf iclass decrypt -f hf-iclass-AA162D30F8FF12F1-dump.bin\n" "hf iclass decrypt -f hf-iclass-AA162D30F8FF12F1-dump.bin\n"
"hf iclass decrypt -f hf-iclass-AA162D30F8FF12F1-dump.bin --key 000102030405060708090a0b0c0d0e0f\n" "hf iclass decrypt -f hf-iclass-AA162D30F8FF12F1-dump.bin -k 000102030405060708090a0b0c0d0e0f\n"
"hf iclass decrypt -d 1122334455667788 --key 000102030405060708090a0b0c0d0e0f"); "hf iclass decrypt -d 1122334455667788 -k 000102030405060708090a0b0c0d0e0f");
void *argtable[] = { void *argtable[] = {
arg_param_begin, arg_param_begin,
arg_str0("f", "file", "<filename>", "filename of dumpfile"), arg_str0("f", "file", "<filename>", "filename of dumpfile"),
arg_str0("d", "data", "<encrypted blk>", "3DES encrypted data"), arg_str0("d", "data", "<encrypted blk>", "3DES encrypted data"),
arg_str0(NULL, "key", "<transport key>", "3DES transport key"), arg_str0("k", "key", "<transport key>", "3DES transport key"),
arg_lit0("v", "verbose", "verbose output"), arg_lit0("v", "verbose", "verbose output"),
arg_param_end arg_param_end
}; };
@ -1258,12 +1258,12 @@ static int CmdHFiClassEncryptBlk(const char *Cmd) {
"OBS! In order to use this function, the file 'iclass_decryptionkey.bin' must reside\n" "OBS! In order to use this function, the file 'iclass_decryptionkey.bin' must reside\n"
"in the resources directory. The file should be 16 bytes binary data", "in the resources directory. The file should be 16 bytes binary data",
"hf iclass encrypt -d 0102030405060708\n" "hf iclass encrypt -d 0102030405060708\n"
"hf iclass encrypt -d 0102030405060708 --key 00112233445566778899AABBCCDDEEFF"); "hf iclass encrypt -d 0102030405060708 -k 00112233445566778899AABBCCDDEEFF");
void *argtable[] = { void *argtable[] = {
arg_param_begin, arg_param_begin,
arg_str1("d", "data", "<block data>", "data to encrypt"), arg_str1("d", "data", "<block data>", "data to encrypt"),
arg_str0(NULL, "key", "<transport key>", "3DES transport key"), arg_str0("k", "key", "<transport key>", "3DES transport key"),
arg_lit0("v", "verbose", "verbose output"), arg_lit0("v", "verbose", "verbose output"),
arg_param_end arg_param_end
}; };

View file

@ -112,7 +112,7 @@ Encrypt iCLASS Block
Options Options
--- ---
-d, --data <block data> data to encrypt -d, --data <block data> data to encrypt
--key <transport key> 3DES transport key -k, --key <transport key> 3DES transport key
-v, --verbose verbose output -v, --verbose verbose output
pm3 --> hf iclass encrypt -d 0000000f2aa3dba8 pm3 --> hf iclass encrypt -d 0000000f2aa3dba8
@ -124,7 +124,7 @@ Options
--- ---
-f, --file <filename> filename of dumpfile -f, --file <filename> filename of dumpfile
-d, --data <encrypted blk> 3DES encrypted data -d, --data <encrypted blk> 3DES encrypted data
--key <transport key> 3DES transport key -k, --key <transport key> 3DES transport key
-v, --verbose verbose output -v, --verbose verbose output
pm3 --> hf iclass decrypt -d 2AD4C8211F996871 pm3 --> hf iclass decrypt -d 2AD4C8211F996871