Add issuance level encoding capability to iclass encode command

This commit is contained in:
Michael Micsen Johannessen Wehus 2024-08-15 08:29:45 -07:00
commit 22dc41f4ca
2 changed files with 3 additions and 0 deletions

View file

@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased]
- Added --issue to hf iclass encode command (@micsen)
- Added custom CTF Wiegand format from Defcon32 with comments (@micsen)
- Added native output grabbing for Python and Lua: less hacky than `output_grabber.py`, should work on ProxSpace as well (@doegox)
- Changed `hf mf chk/fchk`: added option `--no-default` to skip loading the usual ~61 hardcoded keys (@doegox)

View file

@ -4595,6 +4595,7 @@ static int CmdHFiClassEncode(const char *Cmd) {
arg_str0("w", "wiegand", "<format>", "see " _YELLOW_("`wiegand list`") " for available formats"),
arg_lit0(NULL, "shallow", "use shallow (ASK) reader modulation instead of OOK"),
arg_lit0("v", NULL, "verbose (print encoded blocks)"),
arg_u64_0(NULL, "issue", "<dec>", "issue level"),
arg_param_end
};
CLIExecWithReturn(ctx, Cmd, argtable, false);
@ -4635,6 +4636,7 @@ static int CmdHFiClassEncode(const char *Cmd) {
memset(&card, 0, sizeof(wiegand_card_t));
card.FacilityCode = arg_get_u32_def(ctx, 7, 0);
card.CardNumber = arg_get_u32_def(ctx, 8, 0);
card.IssueLevel = arg_get_u32_def(ctx, 12, 0);
char format[16] = {0};
int format_len = 0;