Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yaramod.ParserError when encountering a negative value in meta #269

Open
nockstarr opened this issue Jan 5, 2025 · 0 comments
Open

yaramod.ParserError when encountering a negative value in meta #269

nockstarr opened this issue Jan 5, 2025 · 0 comments

Comments

@nockstarr
Copy link

Whenever a negative integer value is encountered in meta: yaramod.ParserError: Error at 4.11: Syntax error: Unexpected -, expected one of true, false, integer, " is raised

yaramod==4.0.2
Python 3.12.7

Reproduce:

def bug():
    rule = """rule TestRule : FILE
{
	meta:
		score = -60
		quality = 153

	strings:
		$s1 = "..."

	condition:
		$s1
}
    """
    y = yaramod.Yaramod(yaramod.Features.AllCurrent)
    y_file = y.parse_string(rule)
    print(y_file.text)

Found when running through yara-forge extended ruleset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant