Giter Site home page Giter Site logo

Comments (6)

the80srobot avatar the80srobot commented on August 29, 2024

Hmm, six.string_types should contain basestring. I added a test case and unicode works.

I apologize, but I actually don't understand the blob of text - can you tell me what exact error you're getting?

from dotty.

Onager avatar Onager commented on August 29, 2024

I'll update this a little more when I have some more time, but in the interim:

I'm not sure what I was seeing to think that six.string_types was just str in Python2, you're quite right that this isn't an issue.

In the debug output above, the expression is Membership(\n Literal('a message')\n Var('body')) which should match the body var, whose value is "this is a message". However, this breakpoint was set at

return Result(needle in values, ())
so the function hasn't returned at
return Result(needle in expr.set.value, ())
like I think it it should have.

I suspect the issue is at

if (isinstance(expr.set, ast.Literal)
as expr.set is Var not ast.Literal in the debug values.

Hopefully that clear things up a little. I'll try and expand a little more when I have a bit more time. log2timeline/plaso#899 is the parent issue from Plaso where we encountered this.

from dotty.

Onager avatar Onager commented on August 29, 2024

And I didn't actually answer your question: the error is that an objectfilter expression like: `body contains 'a message'`` doesn't match when run with efilter.api.apply(expression, vars=event) and event has an attribute "body" that contains a string "this is a message", and event has a protocol definition that looks like this: https://github.com/log2timeline/plaso/blob/master/plaso/containers/interface.py#L58.

That wasn't particularly eloquent, my apologies.

from dotty.

Onager avatar Onager commented on August 29, 2024

OK, failing test.
This event: https://github.com/Onager/plaso/blob/fix_tagging/tests/analysis/tagging.py#L56

Is not matched by this rule: https://github.com/Onager/plaso/blob/fix_tagging/test_data/test_tag_file.txt#L14

When it should be.

from dotty.

the80srobot avatar the80srobot commented on August 29, 2024

I think I finally figured out what's wrong and fixed it: https://codereview.appspot.com/302640043/

from dotty.

the80srobot avatar the80srobot commented on August 29, 2024

Fixed in 1.5

from dotty.

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.