]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
doc: fix byte_test examples 10139/head
authorPhilippe Antoine <pantoine@oisf.net>
Wed, 6 Dec 2023 19:32:50 +0000 (20:32 +0100)
committerPhilippe Antoine <pantoine@oisf.net>
Tue, 9 Jan 2024 08:38:53 +0000 (09:38 +0100)
As this keyword has 4 mandatory arguments, and some examples
had only three...

Ticket: 6629
(cherry picked from commit 4933b817aacc649edc52409426500a9ec271ccc6)

doc/userguide/rules/payload-keywords.rst

index f4779901baaeeb7c7734f2808e544190beedc1b3..68fd1a65ea8bcdd0d34c07fd6b086d46937c6af3 100644 (file)
@@ -349,23 +349,23 @@ Example::
 
   alert tcp any any -> any any \
         (msg:"Byte_Test Example - Num = Value"; \
-        content:"|00 01 00 02|"; byte_test:2,=,0x01;)
+        content:"|00 01 00 02|"; byte_test:2,=,0x01,0;)
 
   alert tcp any any -> any any \
         (msg:"Byte_Test Example - Num = Value relative to content"; \
-        content:"|00 01 00 02|"; byte_test:2,=,0x03,relative;)
+        content:"|00 01 00 02|"; byte_test:2,=,0x03,2,relative;)
 
   alert tcp any any -> any any \
         (msg:"Byte_Test Example - Num != Value"; content:"|00 01 00 02|"; \
-        byte_test:2,!=,0x06;)
+        byte_test:2,!=,0x06,0;)
 
   alert tcp any any -> any any \ 
          (msg:"Byte_Test Example - Detect Large Values"; content:"|00 01 00 02|"; \
-         byte_test:2,>,1000,relative;)
+         byte_test:2,>,1000,1,relative;)
 
   alert tcp any any -> any any \
         (msg:"Byte_Test Example - Lowest bit is set"; \
-        content:"|00 01 00 02|"; byte_test:2,&,0x01,relative;)
+        content:"|00 01 00 02|"; byte_test:2,&,0x01,12,relative;)
 
   alert tcp any any -> any any (msg:"Byte_Test Example - Compare to String"; \
         content:"foobar"; byte_test:4,=,1337,1,relative,string,dec;)