VirusTotal / yara-x

A rewrite of YARA in Rust.
https://virustotal.github.io/yara-x/
BSD 3-Clause "New" or "Revised" License
565 stars 46 forks source link

Rule metadata C-API #120

Closed codedninja closed 1 month ago

codedninja commented 1 month ago

Sorry about opening another issue about this, I am not as knowledgeable with Rust as I thought. I tired to implement the C-API for rule's metadata but it hasn't gone as well as I have hoped. Thank you in advance!

Would it be possible to request the rule metadata be added to the C-API as well?

plusvic commented 1 month ago

In https://github.com/VirusTotal/yara-x/commit/9e489bd9f5d870d47c02ec269096c17ce2df8bbe I've implemented a yr_rule_metadata_as_json that returns the rule's metadata in JSON format. This is probably not enough if you are using the C API directly, but it will be useful for passing the metadata to the Go API.

plusvic commented 1 month ago

Implemented in bfa57afde38bae9c9dae6828b5865f21b70948d1