mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-12 04:35:28 -07:00
fix inline comments in dictionary files. The extrac checks broke the earlier logic, we now look for a hash sign in the current line if found we try to add a null terminator before the hash sign until we find a hexdigit. Apply old logic on the new shorter line.
This commit is contained in:
parent
4803f51f3f
commit
6624a978d1
@ -2398,8 +2398,18 @@ int loadFileDICTIONARY_safe_ex(const char *preferredName, const char *suffix, vo
|
||||
continue;
|
||||
}
|
||||
|
||||
char *pos = strstr(line, "#");
|
||||
if (pos) {
|
||||
// we found a inline comment, add a null terminator, until we hit hexadecimal char
|
||||
while (isxdigit(pos[0]) == 0) {
|
||||
pos[0] = 0x00;
|
||||
--pos;
|
||||
}
|
||||
}
|
||||
|
||||
// larger keys than expected is skipped
|
||||
if (strlen(line) > keylen) {
|
||||
PrintAndLogEx(INFO, "larger %zu - %s", strlen(line), line);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user