Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detect/integers: test enum with negated strings - v3 #2271

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/websocket-ping/test.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
alert websocket any any -> any any (msg:"There is no text opcode in this packet"; websocket.opcode:!text; sid:1;)
alert websocket any any -> any any (msg:"There is no ping opcode in this packet"; websocket.opcode:!ping; sid:2;)

# should not match for pcap_cnt 11
alert websocket any any -> any any (msg:"There is no pong opcode in this packet"; websocket.opcode:!pong; sid:3;)
23 changes: 22 additions & 1 deletion tests/websocket-ping/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ requires:
min-version: 8

args:
- -k none
- -k none --set stream.inline=true

checks:
- filter:
Expand All @@ -15,3 +15,24 @@ checks:
match:
event_type: websocket
websocket.opcode: pong
- filter:
count: 1
match:
event_type: alert
alert.signature_id: 1
websocket.opcode: ping
pcap_cnt: 8
- filter:
count: 1
match:
event_type: alert
alert.signature_id: 2
websocket.opcode: pong
pcap_cnt: 11
- filter:
count: 0
match:
event_type: alert
alert.signature_id: 3
websocket.opcode: pong
pcap_cnt: 11
Loading