Skip to content

Commit

Permalink
Merge pull request SigmaHQ#2265 from SigmaHQ/fix-ids
Browse files Browse the repository at this point in the history
Additional characters in identifier token
  • Loading branch information
thomaspatzke authored Nov 15, 2021
2 parents aa47b88 + 068255f commit cdaefbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/sigma/parser/condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class SigmaConditionTokenizer:
(SigmaConditionToken.TOKEN_AND, re.compile("and", re.IGNORECASE)),
(SigmaConditionToken.TOKEN_OR, re.compile("or", re.IGNORECASE)),
(SigmaConditionToken.TOKEN_NOT, re.compile("not", re.IGNORECASE)),
(SigmaConditionToken.TOKEN_ID, re.compile("[\\w*]+")),
(SigmaConditionToken.TOKEN_ID, re.compile("[\\w*-.]+")),
(SigmaConditionToken.TOKEN_LPAR, re.compile("\\(")),
(SigmaConditionToken.TOKEN_RPAR, re.compile("\\)")),
]
Expand Down Expand Up @@ -270,7 +270,7 @@ def __init__(self, value):
def generateXOf(sigma, val, condclass):
"""
Generic implementation of (1|all) of x expressions.
* condclass across all list items if x is name of definition
* condclass across all definitions if x is keyword 'them'
* condclass across all matching definition if x is wildcard expression, e.g. 'selection*'
Expand Down Expand Up @@ -520,7 +520,7 @@ def find_close_token_index_in_pairs(tokens, start_index, open_token, close_token
open_token was '(' and
tokens were ['(', '...', '(', '...', ')', ')']
the first '(' should pair with the last ')' instead of the first ')'
Parameters:
tokens: the list of tokens
start_index: the start index (included) of the input tokens for finding the close_token
Expand Down

0 comments on commit cdaefbf

Please sign in to comment.