W
Willem
I would like to make a tool that assists in generating ClamAV signatures
[1]. However, I'm stuck with the regular expression required to
transform some, but not all of the signature to hex.
Suppose this signature:
xxxxversion(1|3|5.7)xxxxxxxx
I would like to encode anything _but_ the control characters (,|,) to
hex. However, I only want to protect these control characters that are
included in the following expression: m#\([\d\.|]\)#. In words: the (, )
and | that are used to mark alternatives for version numbers need to
remain unaltered.
Could anyone give me a clue on the regex?
Thanks!
Willem
[1] http://www.clamav.net/doc/0.80rc/signatures.pdf
[1]. However, I'm stuck with the regular expression required to
transform some, but not all of the signature to hex.
Suppose this signature:
xxxxversion(1|3|5.7)xxxxxxxx
I would like to encode anything _but_ the control characters (,|,) to
hex. However, I only want to protect these control characters that are
included in the following expression: m#\([\d\.|]\)#. In words: the (, )
and | that are used to mark alternatives for version numbers need to
remain unaltered.
Could anyone give me a clue on the regex?
Thanks!
Willem
[1] http://www.clamav.net/doc/0.80rc/signatures.pdf