diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-10-22 20:52:40 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-10-22 20:52:40 (GMT) |
commit | 28c6a886ccde945cfd38f3d17fe99ff0f5d0d2c4 (patch) | |
tree | 4816e0662b88e8b8c60a981fcb7483ce20ddfe3e | |
parent | b679b0a3e8ac54570e285281da43e7fa2c861ebd (diff) |
Consider the 'a' character as a valid lowercase character.
-rw-r--r-- | src/analysis/scan/patterns/tokens/atom.c | 2 | ||||
-rw-r--r-- | tests/analysis/scan/fuzzing.py | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/analysis/scan/patterns/tokens/atom.c b/src/analysis/scan/patterns/tokens/atom.c index 52f239c..01da28d 100644 --- a/src/analysis/scan/patterns/tokens/atom.c +++ b/src/analysis/scan/patterns/tokens/atom.c @@ -69,7 +69,7 @@ int rate_byte_quality(bin_t ch, bitfield_t *seen, size_t *letters) break; case 'A' ... 'Z': - case 'z' ... 'z': + case 'a' ... 'z': if (letters == NULL) result = 20; else diff --git a/tests/analysis/scan/fuzzing.py b/tests/analysis/scan/fuzzing.py index 9572774..c38b25c 100644 --- a/tests/analysis/scan/fuzzing.py +++ b/tests/analysis/scan/fuzzing.py @@ -141,3 +141,21 @@ rule test { ''' self.check_rule_success(rule) + + + def testAAsAcharacter(self): + """Consider the 'a' character as a valid lowercase character.""" + + rule = ''' +rule test { + + bytes: + $a = "0000a0I0" nocase + + condition: + $a + +} +''' + + self.check_rule_failure(rule) |