mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-22 06:13:51 -07:00
a test thingy
This commit is contained in:
parent
4ab5d9febc
commit
d465c5a921
1 changed files with 15 additions and 3 deletions
|
@ -1607,6 +1607,7 @@ static int CmdHFiClassDump(const char *Cmd) {
|
|||
arg_lit0(NULL, "raw", "raw, the key is interpreted as raw block 3/4"),
|
||||
arg_lit0(NULL, "nr", "replay of NR/MAC"),
|
||||
arg_lit0("z", "dense", "dense dump output style"),
|
||||
arg_lit0(NULL, "force", "force unsecure card read"),
|
||||
arg_param_end
|
||||
};
|
||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||
|
@ -1691,6 +1692,7 @@ static int CmdHFiClassDump(const char *Cmd) {
|
|||
bool rawkey = arg_get_lit(ctx, 7);
|
||||
bool use_replay = arg_get_lit(ctx, 8);
|
||||
bool dense_output = g_session.dense_output || arg_get_lit(ctx, 9);
|
||||
bool force = arg_get_lit(ctx, 10);
|
||||
|
||||
CLIParserFree(ctx);
|
||||
|
||||
|
@ -1757,6 +1759,12 @@ static int CmdHFiClassDump(const char *Cmd) {
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (force) {
|
||||
pagemap |= PICOPASS_NON_SECURE_PAGEMODE;
|
||||
PrintAndLogEx(INFO, "Forcing NON SECURE PAGE dumping");
|
||||
}
|
||||
|
||||
if (pagemap == PICOPASS_NON_SECURE_PAGEMODE) {
|
||||
PrintAndLogEx(INFO, "Dumping all available memory, block 3 - %u (0x%02x)", app_limit1, app_limit1);
|
||||
if (auth) {
|
||||
|
@ -3773,7 +3781,7 @@ static int CmdHFiClassEncode(const char *Cmd) {
|
|||
|
||||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "hf iclass encode",
|
||||
"Encode binary wiegand to block 7\n"
|
||||
"Encode binary wiegand to block 7,8,9\n"
|
||||
"Use either --bin or --wiegand/--fc/--cn",
|
||||
"hf iclass encode --bin 10001111100000001010100011 --ki 0 -> FC 31 CN 337\n"
|
||||
"hf iclass encode --fc 31 --cn 337 --ki 0 -> FC 31 CN 337\n"
|
||||
|
@ -3925,8 +3933,12 @@ static int CmdHFiClassEncode(const char *Cmd) {
|
|||
return PM3_ESOFT;
|
||||
}
|
||||
|
||||
// iceman: only for formats w length smaller than 37.
|
||||
// Needs a check.
|
||||
|
||||
// increase length to allow setting bit just above real data
|
||||
packed.Length++;
|
||||
// Set sentinel bit
|
||||
packed.Length++;// increase length to allow setting bit just above real data
|
||||
set_bit_by_position(&packed, true, 0);
|
||||
|
||||
#ifdef HOST_LITTLE_ENDIAN
|
||||
|
@ -3958,7 +3970,7 @@ static int CmdHFiClassEncode(const char *Cmd) {
|
|||
PrintAndLogEx(SUCCESS, "Write block %d/0x0%x ( " _GREEN_("ok") " ) --> " _YELLOW_("%s"), 6 + i, 6 + i, sprint_hex_inrow(credential + (i * 8), 8));
|
||||
break;
|
||||
default:
|
||||
PrintAndLogEx(SUCCESS, "Write block %d/0x0%x ( " _RED_("fail") " )", 6 + i, 6 + i);
|
||||
PrintAndLogEx(INFO, "Write block %d/0x0%x ( " _RED_("fail") " )", 6 + i, 6 + i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue