mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -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
1 changed files with 10 additions and 0 deletions
|
@ -2398,8 +2398,18 @@ int loadFileDICTIONARY_safe_ex(const char *preferredName, const char *suffix, vo
|
||||||
continue;
|
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
|
// larger keys than expected is skipped
|
||||||
if (strlen(line) > keylen) {
|
if (strlen(line) > keylen) {
|
||||||
|
PrintAndLogEx(INFO, "larger %zu - %s", strlen(line), line);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue