Add docs for unreferenced strings. (#1958)

* Add docs for unreferenced strings.

* Add example for unreferenced string.
This commit is contained in:
Wesley Shields
2023-09-02 20:11:32 +02:00
committed by GitHub
parent 8ce0c6c4eb
commit d875f71a55
+20
View File
@@ -738,6 +738,26 @@ the C API.
$text_string
}
Unreferenced strings
--------------------
YARA 4.4.0 allows for unreferenced strings in the condition. If a string
identifier starts with an ``_`` then it does not have to be referenced in the
condition. Any other string must be referenced in the condition. This is useful
if you want to search for particular strings and handle them in a custom
callback but don't really need them for your condition logic.
.. code-block:: yara
rule PrivateStringExample
{
strings:
$_unreferenced = "AXSERS"
condition:
true
}
String Modifier Summary
-----------------------