Skip to content

Commit

Permalink
fix xpression compared to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
iceman1001 committed Sep 14, 2024
1 parent ec33873 commit fc17873
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/cmdhfmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3632,6 +3632,7 @@ static int CmdHF14AMfSmartBrute(const char *Cmd) {
break;

} else if (ret == BF_GENERATOR_NEXT) {

generator_key = bf_get_key48(&bctx);
num_to_bytes(generator_key, MIFARE_KEY_SIZE, keyBlock + (i * MIFARE_KEY_SIZE));
keycnt++;
Expand All @@ -3641,10 +3642,11 @@ static int CmdHF14AMfSmartBrute(const char *Cmd) {
smart_mode_stage = bctx.smart_mode_stage;
PrintAndLogEx(INFO, "Running bruteforce stage %d", smart_mode_stage);

if (msclock() - t1 > 0 && keys_checked > 0) {
if (keys_checked) {

PrintAndLogEx(INFO, "Current cracking speed (keys/s): %lu",
keys_checked / ((msclock() - t1) / 1000));
keys_checked / ((msclock() - t1) / 1000)
);

t1 = msclock();
keys_checked = 0;
Expand Down

0 comments on commit fc17873

Please sign in to comment.