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

feat: Implement multiline string literals in metadata. #121

Closed wxsBSD closed 1 month ago

wxsBSD commented 1 month ago

This commit implements multiline string literals in metadata section.

rule a {
  meta:
    a = """
I'm a multiline string literal!

Hooray!

\"test\"

I also handle escapes, \x41\x42\x43!

... and emojis 🤖!
"""
  condition:
    true
}

While I'm here, also quote the metadata string values when printing the ast.