From e5ee5098c87737fc3fa6832031978cc1bc2af638 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 9 Nov 2026 14:39:56 +0700 Subject: [PATCH] trace extract: reset the UID and epurse at the start of each run They are static and were never cleared, so an iCLASS CHECK in a trace without a SELECT gave an `hf iclass lookup` line with the CSN and epurse of a trace extracted earlier. Co-Authored-By: Claude Opus 5.5 --- client/src/cmdtrace.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/cmdtrace.c b/client/src/cmdtrace.c index e5a1c4595..e37c4a429 100644 --- a/client/src/cmdtrace.c +++ b/client/src/cmdtrace.c @@ -1511,6 +1511,11 @@ static int CmdTraceExtract(const char *Cmd) { return PM3_SUCCESS; } + // don't carry a UID or epurse over from the previous trace + memset(extract_uid, 0, sizeof(extract_uid)); + extract_uidlen = 0; + memset(extract_epurse, 0, sizeof(extract_epurse)); + uint16_t tracepos = 0; while (tracepos < gs_traceLen) {