Плз, кто силен в регэкспах, пытаюсь описать пакет для фильтра layer-7 к netfilter/iptables, ничего неполучаеться, все равно проходят при:^Adobe\.Flash\.Proxy\.Auto-Discovery*
сам пакет:
| c.Sc
0x00F0 | 2b4a 7461 673d 6670 6164 7265 713b 7469 | +Jtag=fpadreq;ti
0x0100 | 6d65 7374 616d 703d 3135 3530 3137 353b | mestamp=1550175;
0x0110 | 7a6f 6e65 3d30 3b75 7269 3d72 746d 703a | zone=0;uri=rtmp:
0x0120 | 2f2f 3139 342e 3138 362e 3132 312e 3737 | //194.186.121.77
0x0130 | 3a38 302f 696d 6573 7361 6765 3501 0837 | :80/imessage5..7
0x0140 | 012b 3c20 4164 6f62 6520 466c 6173 6820 | .+<.Adobe.Flash.
0x0150 | 5072 6f78 7920 4175 746f 2d44 6973 636f | Proxy.Auto-Disco
0x0160 | 7665 7279 ff | very.
0x0000 | 0100 0001 4bea 56be 0000 0000 0000 0000 | ....K.V.........
>[оверквотинг удален]
>0x0140 | 012b 3c20 4164 6f62 6520 466c 6173 6820 | .+<.Adobe.Flash.
>
>0x0150 | 5072 6f78 7920 4175 746f 2d44 6973 636f | Proxy.Auto-Disco
>
>0x0160 | 7665 7279 ff
>
> | very.
>
>0x0000 | 0100 0001 4bea 56be 0000 0000 0000 0000 | ....K.V.........
>Adobe\.Flash\.Proxy\.Auto-Discovery*
а без ^
>Adobe\.Flash\.Proxy\.Auto-Discovery*
>а без ^тож не работает, как-бы грамотно начало пакета описать ...
а то замучали уже dhcp сервер бедный ...
С данной реализацией регексов не сталкивался, но по стандартным правилам ваш регекс означает: строка с _начала_ которой идет Adobe.Flash.Proxy.Auto-Discover, после чего произвольное количество раз может повторится буква "y"
Может .*Adobe\.Flash\.Proxy\.Auto-Discovery.*
>Может .*Adobe\.Flash\.Proxy\.Auto-Discovery.*:) :(( тож не работает ....
там в примерах следующие реализации регэкспов:
bittorrent:
^(\x13bittorrent protocol|azver\x01$|get /scrape\?info_hash=)|d1:ad2:id20:|\x08'7P\)[RP]dhcp:
^[\x01\x02][\x01- ]\x06.*c\x82sc
# (\x01|\x02) is for BOOTREQUEST or BOOTREPLY
# Is there a demand for doing these seperately? The Packeteer does.
#
# [\x01-\x20] is for any of the hardware address types listed at
# (http://www.iana.org/assignments/arp-parameters) and hopefully faster
# ethernets too (100, 1000 and 10000mb) as well (do they share the 10mb
# number?).
#
# \x06 for "hardware address length = 6 bytes". Does anyone use other lengths
# these days? If so, this pattern won't match it as it stands.
dns:
^.?.?.?.?[\x01\x02].?.?.?.?.?.?[\x01-?][a-z0-9][\x01-?a-z]*[\x02-\x06][a-z][a-z][fglmoprstuvz]?[aeop]?(um)?[\x01-\x10\x1c][\x
01\x03\x04\xFF]
ftp:# by default, we allow only ASCII
^220[\x09-\x0d -~]*ftp# This covers UTF-8 as well
#^220[\x09-\x0d -~\x80-\xfd]*ftp# This allows any characters and is about 4x faster than either of the above
# (which are about the same as each other)
#^220.*ftp# This is much slower
#^220[\x09-\x0d -~]*ftp|331[\x09-\x0d -~]*password# This pattern is more precise, but takes longer to match. (3 packets vs. 1)
#^220[\x09-\x0d -~]*\x0d\x0aUSER[\x09-\x0d -~]*\x0d\x0a331# same as above, but slightly less precise and only takes 2 packets.
#^220[\x09-\x0d -~]*\x0d\x0aUSER[\x09-\x0d -~]*\x0d\x0ahttp://l7-filter.sourceforge.net/
^[\x01\x02][\x01- ]\x06.*c\x82sc\+Jtag=fpadreq;ti mestamp=[0-9];zone=0;uri=rtmp://194.186.121.77:80/[\x09-\x0d -~]
попробовал изобразить так :(( тож не работает ....