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

Function declaration split up in condition parsing ? #67

Open
wesinator opened this issue Dec 22, 2019 · 2 comments
Open

Function declaration split up in condition parsing ? #67

wesinator opened this issue Dec 22, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request
Projects
Milestone

Comments

@wesinator
Copy link
Contributor

https://github.com/plyara/plyara/blob/eb6cbff2f0b603e6fa0d7d721bf425833ba772cf/tests/data/import_ruleset_math.yar

The uint16(0) is split up in the condition parsing:

"condition_terms": [
            "uint16",
            "(",
            "0",
            ")",
            "==",
            "0x5a4d",

should it be

"condition_terms": [
            "uint16(0)",
            "==",
            "0x5a4d",

since uint16(0) is a single atomic statement ?

@utkonos
Copy link
Member

utkonos commented Jan 2, 2020

Good idea. I'll need to think through how to do this best.

@utkonos utkonos added the enhancement New feature or request label Jan 2, 2020
@utkonos utkonos self-assigned this Jan 2, 2020
@utkonos utkonos added this to the 3.0 milestone Jan 4, 2020
@utkonos
Copy link
Member

utkonos commented Jul 17, 2020

Full granular condition parsing is a feature of 3.0.0. Take a look at the data model and the singledispatch to_yara() function. It already implements a few conditions granularly. The JSON output will have a nested recursive structure and will satisfy this enhancement request.

The new version is being built here:
https://github.com/plyara/plyara/tree/prep-3.0

Comments and feedback are welcome.

@utkonos utkonos added this to To do in 3.0.0 via automation Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
3.0.0
  
To do
Development

No branches or pull requests

2 participants