Proto commits in VirusTotal/gyp

These 19 commits are when the Protocol Buffers files have changed:

Commit:e8eb4aa
Author:Carlos Pacho
Committer:GitHub

Record LiteralInteger base (#68) * Fixing format of ast.go * Modify grammar to record base of LiteralInteger * Added Base to LiteralInteger in ProtoBuf * Added test case for LiteralInteger base checks * Ran flexgo & protoc

The documentation is generated from this commit.

Commit:a2dc104
Author:Wesley Shields
Committer:GitHub

Implement string sets at expression. (#64) This allows constructs like "any of them at 0" to be parsed, serialized and deserialized properly.

Commit:afbe7ea
Author:Wesley Shields
Committer:GitHub

Initial support for ~ operator in hex strings. (#62) * Initial support for ~ operator in hex strings. This allows gyp to parse the ~ operator in hex strings. It isn't fully implemented yet as it doesn't work with wildcards, but that will be next on my list. * Allow users to define their own flexgo/goyacc/protoc-gen-go This allows users to build with: FLEXGO=/Users/wxs/bin/flexgo/bin/flex GOYACC=/Users/wxs/go/bin/goyacc PROTOC=/Users/wxs/go/bin/protoc-gen-go make If you have them in your path already it will still work, but if you need to define them yourself you can now do so. * Add support for not operator on wildcards.

Commit:df3c87b
Author:Victor M. Alvarez

Implement "defined" operator.

Commit:f72e569
Author:Victor M. Alvarez

Implement "iequals" operator.

Commit:dcbdccd
Author:Wesley Shields
Committer:GitHub

Handle remaining new grammar features (string count in range, string set in range and rule sets). (#46) * Handle string count in range. Add support for parsing string counts in range: #s0 in (0..100) == 2 * Handle string sets in range. Add support for parsing string sets in range: any of ($s*) in (0..100) * Add support for rule sets. To avoid a name clash with RuleSet in the protobuf I called it a RuleEnumeration.

Commit:51d2ad1
Author:Wesley Shields
Committer:GitHub

Support percent notation in grammar. (#43) Add support for "x% of them" notation to gyp. While I was here I noticed that the protobuf generated code was being put into the github.com/VirusTotal/gyp/pb directory, which was causing various problems when trying to build things as they all expected to find the protobuf related code in the pb/ directory. To deal with this I modified the Makefile so that the protobuf generated code is going in the pb/ directory yet the go_package remains as github.com/VirusTotal/gyp/pb. I'm not sure if this is going to cause problems with builds of other things using bazel that depend upon this so it may be good to get @Zohiartze to review this so we can avoid a repeat of #42. * Rework the percentage handling. Address comments from Victor, which I understand conceptually but may have implemented in a weird way. ;)

Commit:8432d53
Author:zori
Committer:GitHub

Set yara.proto's go_package to the full import path (#42)

Commit:6cbe65e
Author:Wesley Shields
Committer:GitHub

Implement "none" keyword. (#40) Add support for the "none" keyword.

Commit:e733aa3
Author:Victor M. Alvarez

Fix issue with string "\x7f" being represented as "\u007f" when the rule source is generated from the protocol buffer.

Commit:14613c8
Author:Victor M. Alvarez
Committer:GitHub

Implement operators "icontains", "startswith", "istartswith", "endswith" and "iendswith". (#26) Also fix test cases that were broken due to minor formatting changes in the way the way AST was being converted to text.

Commit:c0710f6
Author:Victor M. Alvarez
Committer:GitHub

Implement string modifier base64wide. (#25) * Implement string modifier base64wide. * Fix issue with bitwise operation for checking flags.

Commit:526fd4d
Author:Victor M. Alvarez
Committer:GitHub

Implement base64 modifier. (#18) This modifier has been added in YARA v4.0.0.

Commit:87b0750
Author:Victor M. Alvarez
Committer:GitHub

Refactor AST (#15) This is a large refactoring of the abstract syntax tree that introduced backward incompatible changes. Now the AST is not generated directly as a Protocol Buffer, because the structures generated by Protocol Buffer compiler are hard to work with. Instead we have defined our own interfaces and types to represent the AST.

Commit:2f119e0
Author:Gustavo García Pascual
Committer:GitHub

Fix errors in y2j and j2y tools (#6) * Fix errors in j2y and y2j * Fix minor YARA proto documentation issues

Commit:eadbb47
Author:Victor M. Alvarez

Some improvements including: * Add a gyp.ParseString function that may be useful in many situations. * Change parser prefix from xx to yr * Export the SerializeExpression function which as previously private. * Rename some fields in the proto.

Commit:b05c948
Author:Gustavo García Pascual
Committer:GitHub

Parse hexadecimal strings in YARA rules (#2) * Add hex strings to proto definition * Modify hex grammar and lexer to generate an hex string proto * Add Makefile target for building hex grammar

Commit:762af90
Author:Gustavo García Pascual
Committer:GitHub

Parse YARA rules to protocol buffer * Add ruleset proto definition. * Parse YARA rules to ruleset proto. * Enable ruleset proto serialization to JSON. * Enable ruleset proto serialization to YARA.

Commit:22e83c3
Author:Gustavo Garcia Pascual
Committer:Gustavo Garcia Pascual

Initial commit