Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cmdhficlass.c #2153

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions client/src/cmdhficlass.c
Original file line number Diff line number Diff line change
Expand Up @@ -4375,11 +4375,11 @@ static int CmdHFiClassAutopwn(const char *Cmd) {
static int CmdHFiClassConfigCard(const char *Cmd) {
CLIParserContext *ctx;
CLIParserInit(&ctx, "hf iclass configcard",
"Manage reader configuration card via Cardhelper,\n"
"Manage reader configuration card via Cardhelper or internal database,\n"
"The generated config card will be uploaded to device emulator memory.\n"
"You can start simulating `hf iclass sim -t 3` or use the emul commands",
"hf iclass configcard -l --> download config card settings\n"
"hf iclass configcard -p --> print all config cards\n"
"hf iclass configcard -l --> download config card settings (requires card helper)\n"
"hf iclass configcard -p --> print all config cards in the database (doesn't require cardhelper)\n"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you suggest a rewording to clarify -p will also work without card helper but -l does require it? As that was my intent behind this clarification

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

people always think that if they only write more text, then others will read and understand.

I say, be very precise and to the point. Remove the need for "fillers"

In the over description, remove exampl line with "-l" , remove all your fillers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But then removing the example line -l will hide a functionality that's still available in the software but people won't know the command for it. Let me try with a different wording.

"hf iclass configcard --ci 1 --> view config card setting in slot 1\n"
"hf iclass configcard -g --ci 0 --> generate config file from slot 0"
);
Expand Down Expand Up @@ -4425,12 +4425,14 @@ static int CmdHFiClassConfigCard(const char *Cmd) {
print_config_cards();
}

if (ccidx > -1 && ccidx < 14) {
if (ccidx > -1 && ccidx < 13) {
Antiklesys marked this conversation as resolved.
Show resolved Hide resolved
const iclass_config_card_item_t *item = get_config_card_item(ccidx);
print_config_card(item);
} else {
PrintAndLogEx(ERR, "Please specify a valid configuration number!");
}

if (do_generate) {
if (do_generate && (ccidx > -1 && ccidx < 13)) {
const iclass_config_card_item_t *item = get_config_card_item(ccidx);
if (strstr(item->desc, "Keyroll") != NULL) {
if (got_kr == false) {
Expand Down
Loading