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

Condition parsing fault #107

Closed
rakovskij-stanislav opened this issue Jul 27, 2020 · 2 comments · Fixed by #108
Closed

Condition parsing fault #107

rakovskij-stanislav opened this issue Jul 27, 2020 · 2 comments · Fixed by #108
Assignees
Labels
bug Something isn't working

Comments

@rakovskij-stanislav
Copy link

Latest Plyara version from pip3 (2.1.0)

Rule:

rule test{
    strings:
        $TEST1 = "testy"
        $test2 = "tasty"
    condition:
        ( #TEST1 > 5 ) and ( #test2 > 5 )
}

Code:

parser = plyara.Plyara()
parser.parse_string(open("test.yar").read())
print(parser.rules[0]["condition_terms"])

Output:

['(', '#', 'TEST1', '>', '5', ')', 'and', '(', '#test2', '>', '5', ')']

Expected output:

['(', '#TEST1', '>', '5', ')', 'and', '(', '#test2', '>', '5', ')']
@utkonos utkonos self-assigned this Jul 27, 2020
utkonos added a commit that referenced this issue Jul 27, 2020
@utkonos utkonos added the bug Something isn't working label Jul 27, 2020
@utkonos utkonos linked a pull request Jul 27, 2020 that will close this issue
@utkonos
Copy link
Member

utkonos commented Jul 27, 2020

Thanks @rakovskij-stanislav!

Fix will be part of 2.1.1

@utkonos
Copy link
Member

utkonos commented Jul 27, 2020

If you need an immediate fix, please use the diff from #108

utkonos added a commit that referenced this issue Jul 27, 2020
* Fixes issue #107

* Fix name of results object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants