Giter VIP home page Giter VIP logo

Comments (6)

plusvic avatar plusvic commented on August 23, 2024

From [email protected] on January 13, 2011 09:47:56

I think i'm understanding what you're asking for, but could you give an example of something that you would like to express using this feature. I don't find any situation that can't be expressed with "$string at expression" or "$string in (expression..expresson)"

Labels: -Type-Defect Type-Enhancement

from yara.

plusvic avatar plusvic commented on August 23, 2024

From [email protected] on January 13, 2011 10:03:07

I found a situation where the proposed feature would be more natural than the current solution. For example if you want to guarantee that every occurrence of some string is inside a given offset range you could say:

for all ocurrence of $string: (@ > expression1 and @ < expression2)

That should be expressed now as:

not $string in (0..expression1) and not $string in (expression2..filesize)

It works, but is not very readable.

from yara.

plusvic avatar plusvic commented on August 23, 2024

From [email protected] on January 13, 2011 10:52:47

Thanks for the feedback. Here is an example of what I am trying to express:

rule example
{
strings:
$guid = { ... } // 16 bytes

condition:
for any of ($guid) : (int32(@ + 16 + x) < 0) // x being some constant/offset
}

I would like the expression to be evaluated for each occurrence of $guid and have the rule fire if expression is true for any occurrence in the "for any of" case.

from yara.

plusvic avatar plusvic commented on August 23, 2024

From [email protected] on January 13, 2011 11:04:05

Interesting, i didn't though about intXX(). People end up using yara in very creative ways :)

Well, it makes sense, so i'll try to included in next release.

from yara.

plusvic avatar plusvic commented on August 23, 2024

From [email protected] on January 13, 2011 11:15:05

Great! Thank you!

If it would be easier to point me in the right direction, I'd be more than happy to take a crack at it.

Cheers.

from yara.

plusvic avatar plusvic commented on August 23, 2024

From [email protected] on March 22, 2011 07:17:27

Feature added in version 1.5

Status: Fixed

from yara.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.