【问题标题】:Perl regex to find specific hex character on snortPerl 正则表达式在 snort 上查找特定的十六进制字符
【发布时间】:2014-05-27 13:43:15
【问题描述】:

我对 Perl 正则表达式非常陌生,想知道如何编写一个匹配特定十六进制字符的正则表达式,例如 0x90。 我试过:"[\x90]","\x90" 但这些似乎不起作用.. 我使用 snort,需要制定一个规则,在文本中找到 0x90 字符:

Alert TCP any any -> any any (msg: "Possible exploit"; pcre:"\x90"; sid:15444552;)

这是我尝试过的,但 snort 给了我一个错误:

ERROR: newRules.conf Line 9 => unable to parse pcre regex "\x90"

有什么想法吗?谢谢!

【问题讨论】:

    标签: regex perl snort


    【解决方案1】:

    您忘记以斜线 / 开头和结尾。在您的情况下,pcre:"\x90" 应该是 pcre:"/\x90/"

    更多信息请查看here

    【讨论】:

    • 太好了!感谢您的回答
    猜你喜欢
    • 1970-01-01
    • 2015-07-10
    • 2012-01-29
    • 2014-03-05
    • 2011-07-16
    • 1970-01-01
    • 2019-04-25
    相关资源
    最近更新 更多