From cce14d43e36f920419d671a23a3d71b37caa369d Mon Sep 17 00:00:00 2001 From: Travis Weathers <59842250+tweathers-sec@users.noreply.github.com> Date: Tue, 15 Sep 2026 10:55:10 -0400 Subject: [PATCH] fix(client): stop the Indala demod printing a debug line at INFO level detectindala() reports the bit count it gave up on through PrintAndLogEx(INFO, ...), so every failed Indala demodulation prints [=] DEBUG: detectindala | 56 in normal output. It is the failure path: found_size < 64 means the demodulator did not find a valid Indala (64 or 224 bits) and is returning -5. Any noisy LF read hits it, so `lf search` with no card on the antenna shows a developer's debug line to every user. Every sibling in the same function already uses DEBUG, including the one nine lines above it at "DEBUG: Warning - Indala had to invert bits", so this is an oversight rather than a deliberate level. ui.c drops DEBUG when g_debugMode is 0, which is the default, so the line stays available under `data setdebugmode -1` and is simply no longer in the way. Checked the whole client for the same class: the only other "DEBUG" strings printed above DEBUG level are cmddata.c FSKToNRZ, and both of those are already wrapped in `if (g_debugMode > 1)`, so they are correct and are left alone. Before, `lf search` over a reader field with no card: [=] Checking for known tags... [=] DEBUG: detectindala | 56 [-] No known 125/134 kHz tags found! After: [=] Checking for known tags... [-] No known 125/134 kHz tags found! and with `data setdebugmode -1` the detectindala lines come back, now carrying the [#] debug prefix like the rest of them. Passes `make style` unmodified. --- CHANGELOG.md | 1 + client/src/cmdlfindala.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c4d2ce34..c1fa6abe7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] +- Fixed `lf search` - a leftover debug print no longer reports `DEBUG: detectindala | ` on every failed Indala demodulation (@tweathers-sec) - Added `hf mfdes sim` - answers GetDFNames and GetISOFileIDs, so a reader sees the ISO file ids and DF names of the simulated card (@iceman1001) - Fixed `hf 14a` - an FPGA bitstream download no longer destroys the emulator memory that `eload` just filled (@iceman1001) - Changed `hf mfdes sim` - now a self contained DESFire simulation, answering both native and ISO 7816 wrapped commands (@iceman1001) diff --git a/client/src/cmdlfindala.c b/client/src/cmdlfindala.c index 6aee29b6f..2843b43cf 100644 --- a/client/src/cmdlfindala.c +++ b/client/src/cmdlfindala.c @@ -1344,7 +1344,7 @@ out: *size = found_size; if (found_size < 64) { - PrintAndLogEx(INFO, "DEBUG: detectindala | %zu", found_size); + PrintAndLogEx(DEBUG, "DEBUG: detectindala | %zu", found_size); return -5; }