From fbc7f05ad1537975d08dc9757559aaf45a5b5088 Mon Sep 17 00:00:00 2001 From: tcprst Date: Tue, 6 Oct 2020 09:03:24 -0400 Subject: [PATCH] rebase on master, fix merge conflict --- armsrc/Standalone/hf_iceclass.c | 2 +- client/src/cmdhficlass.c | 12 ++--- doc/cheatsheet.md | 5 +- doc/commands.md | 88 ++++++++++----------------------- 4 files changed, 35 insertions(+), 72 deletions(-) diff --git a/armsrc/Standalone/hf_iceclass.c b/armsrc/Standalone/hf_iceclass.c index 2a0ef6236..00de115e6 100644 --- a/armsrc/Standalone/hf_iceclass.c +++ b/armsrc/Standalone/hf_iceclass.c @@ -125,7 +125,7 @@ static void download_instructions(uint8_t t) { case ICE_STATE_FULLSIM: { DbpString("The emulator memory was saved to SPIFFS"); DbpString("1. " _YELLOW_("mem spiffs dump o " HF_ICLASS_FULLSIM_MOD_BIN " f " HF_ICLASS_FULLSIM_MOD" e")); - DbpString("2. " _YELLOW_("hf iclass view f " HF_ICLASS_FULLSIM_MOD_BIN)); + DbpString("2. " _YELLOW_("hf iclass view -f " HF_ICLASS_FULLSIM_MOD_BIN)); break; } case ICE_STATE_ATTACK: { diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index 14756328f..6417de85b 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -2661,10 +2661,10 @@ static int CmdHFiClassView(const char *Cmd) { void *argtable[] = { arg_param_begin, - arg_str1("f", "file", "", "filename of dump"), - arg_int0(NULL, "startblock", "", "print from this block (default block6)"), - arg_int0(NULL, "endblock", "", "end printing at this block (default 0, ALL)"), - arg_lit0("v", "verbose", "verbose output"), + arg_str1("f", "file", "", "filename of dump"), + arg_int0("s", "startblock", "", "print from this block (default block6)"), + arg_int0("e", "endblock", "", "end printing at this block (default 0, ALL)"), + arg_lit0("v", "verbose", "verbose output"), arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, false); @@ -3492,7 +3492,7 @@ static int CmdHFiClassPermuteKey(const char *Cmd) { void *argtable[] = { arg_param_begin, - arg_lit0(NULL, "reverse", "reverse permuted key"), + arg_lit0("r", "reverse", "reverse permuted key"), arg_str1(NULL, "key", "", "input key"), arg_param_end }; @@ -3550,7 +3550,7 @@ static command_t CommandTable[] = { {"encrypt", CmdHFiClassEncryptBlk, AlwaysAvailable, "[options..] Encrypt given block data"}, {"decrypt", CmdHFiClassDecrypt, AlwaysAvailable, "[options..] Decrypt given block data or tag dump file" }, {"managekeys", CmdHFiClassManageKeys, AlwaysAvailable, "[options..] Manage keys to use with iclass commands"}, - {"permutekey", CmdHFiClassPermuteKey, IfPm3Iclass, " Permute function from 'heart of darkness' paper"}, + {"permute", CmdHFiClassPermuteKey, IfPm3Iclass, " Permute function from 'heart of darkness' paper"}, {"view", CmdHFiClassView, AlwaysAvailable, "[options..] Display content from tag dump file"}, {NULL, NULL, NULL, NULL} diff --git a/doc/cheatsheet.md b/doc/cheatsheet.md index bee2b2b5e..5e46f68df 100644 --- a/doc/cheatsheet.md +++ b/doc/cheatsheet.md @@ -46,9 +46,10 @@ Reverse permute iCLASS master key ``` Options --- -r reverse permuted key +-r --reverse : reverse permuted key + --key : input key -pm3 --> hf iclass permute r 3F90EBF0910F7B6F +pm3 --> hf iclass permute --reverse --key 3F90EBF0910F7B6F ``` iCLASS Reader diff --git a/doc/commands.md b/doc/commands.md index 94d28dfdf..40ce18a23 100644 --- a/doc/commands.md +++ b/doc/commands.md @@ -241,70 +241,32 @@ Check column "offline" for their availability. ### hf iclass { ICLASS RFIDs... } + +|command |offline |description +|------- |------- |----------- +|`hf iclass help `|Y |`This help` +|`hf iclass calcnewkey `|Y |`[options..] Calc diversified keys (blocks 3 & 4) to write new keys` +|`hf iclass chk `|Y |`[options..] Check keys` +|`hf iclass clone `|N |`[options..] Restore a dump file onto a iClass tag` +|`hf iclass decrypt `|Y |`[options..] Decrypt given block data or tag dump file` +|`hf iclass dump `|N |`[options..] Dump iClass tag to file` +|`hf iclass eload `|N |`[f ] Load iClass dump file into emulator memory` +|`hf iclass encrypt `|Y |`[options..] Encrypt given block data` +|`hf iclass info `|Y |` Tag information` +|`hf iclass list `|Y |` List iClass history` +|`hf iclass loclass `|Y |`[options..] Use loclass to perform bruteforce reader attack` +|`hf iclass lookup `|Y |`[options..] Uses authentication trace to check for key in dictionary file` +|`hf iclass managekeys `|Y |`[options..] Manage keys to use with iClass` +|`hf iclass permute `|N |` Permute function from 'heart of darkness' paper` +|`hf iclass rdbl `|N |`[options..] Read iClass block` +|`hf iclass reader `|N |` Act like an iClass reader` +|`hf iclass readtagfile `|Y |`[options..] Display content from tag dump file` +|`hf iclass replay `|N |` Read iClass tag via replay attack` +|`hf iclass sim `|N |`[options..] Simulate iClass tag` +|`hf iclass sniff `|N |` Eavesdrop iClass communication` +|`hf iclass wrbl `|N |`[options..] Write iClass block` -|command |offline |description -|------- |------- |----------- -|`hf iclass help `|Y |`This help` -|`hf iclass dump `|N |`[options..] Dump Picopass / iCLASS tag to file` -|`hf iclass info `|Y |` Tag information` -|`hf iclass list `|Y |` List iclass history` -|`hf iclass rdbl `|N |`[options..] Read Picopass / iCLASS block` -|`hf iclass reader `|N |` Act like an Picopass / iCLASS reader` -|`hf iclass restore `|N |`[options..] Restore a dump file onto a Picopass / iCLASS tag` -|`hf iclass sniff `|N |` Eavesdrop Picopass / iCLASS communication` -|`hf iclass wrbl `|N |`[options..] Write Picopass / iCLASS block` -|`hf iclass chk `|Y |`[options..] Check keys` -|`hf iclass loclass `|Y |`[options..] Use loclass to perform bruteforce reader attack` -|`hf iclass lookup `|Y |`[options..] Uses authentication trace to check for key in dictionary file` -|`hf iclass replay `|N |` Read Picopass / iCLASS tag via replay attack` -|`hf iclass sim `|N |`[options..] Simulate iCLASS tag` -|`hf iclass eload `|N |`[f ] Load Picopass / iCLASS dump file into emulator memory` -|`hf iclass esave `|N |`[f ] Save emulator memory to file` -|`hf iclass eview `|N |`[options..] View emulator memory` -|`hf iclass calcnewkey `|Y |`[options..] Calc diversified keys (blocks 3 & 4) to write new keys` -|`hf iclass encrypt `|Y |`[options..] Encrypt given block data` -|`hf iclass decrypt `|Y |`[options..] Decrypt given block data or tag dump file` -|`hf iclass managekeys `|Y |`[options..] Manage keys to use with iclass commands` -|`hf iclass permutekey `|N |` Permute function from 'heart of darkness' paper` -|`hf iclass view `|Y |`[options..] Display content from tag dump file` - - -### hf legic - - { LEGIC RFIDs... } - -|command |offline |description -|------- |------- |----------- -|`hf legic help `|Y |`This help` -|`hf legic list `|Y |`List LEGIC history` -|`hf legic reader `|N |`LEGIC Prime Reader UID and tag info` -|`hf legic info `|N |`Display deobfuscated and decoded LEGIC Prime tag data` -|`hf legic dump `|N |`Dump LEGIC Prime tag to binary file` -|`hf legic restore `|N |`Restore a dump file onto a LEGIC Prime tag` -|`hf legic rdbl `|N |`Read bytes from a LEGIC Prime tag` -|`hf legic sim `|N |`Start tag simulator` -|`hf legic wrbl `|N |`Write data to a LEGIC Prime tag` -|`hf legic crc `|Y |`Calculate Legic CRC over given bytes` -|`hf legic eload `|Y |`Load binary dump to emulator memory` -|`hf legic esave `|Y |`Save emulator memory to binary file` -|`hf legic wipe `|N |`Wipe a LEGIC Prime tag` - - -### hf lto - - { LTO Cartridge Memory RFIDs... } - -|command |offline |description -|------- |------- |----------- -|`hf lto help `|Y |`This help` -|`hf lto dump `|N |`Dump LTO-CM tag to file` -|`hf lto restore `|N |`Restore dump file to LTO-CM tag` -|`hf lto info `|N |`Tag information` -|`hf lto rdbl `|N |`Read block` -|`hf lto wrbl `|N |`Write block` -|`hf lto list `|Y |`List LTO-CM history` - - + ### hf mf { MIFARE RFIDs... }