Issue: 7505
Add tests for the ftp.mode keyword for active, passive, and rule keyword
validation checks on the keyword option value.
--- /dev/null
+alert ftp any any -> any any (msg: "Match on FTP active mode"; flow:established; ftp.mode: active; sid:1;)
--- /dev/null
+requires:
+ version: 8
+
+pcap: ../../bug-3519/input.pcap
+
+checks:
+
+ - filter:
+ count: 4
+ match:
+ event_type: alert
+ ftp.command: PORT
+ ftp.mode: active
+ alert.signature_id: 1
--- /dev/null
+alert ftp any any -> any any (msg: "Match on FTP passive mode #1"; flow:established; ftp.mode:passive; sid:1;)
--- /dev/null
+requires:
+ version: 8
+
+pcap: ../../ftp-epsv/input.pcap
+
+args:
+ - -k none
+
+checks:
+
+ - filter:
+ count: 8
+ match:
+ event_type: alert
+ ftp.mode: passive
+ alert.signature_id: 1
--- /dev/null
+alert ftp any any -> any any (msg: "Match on FTP active mode"; flow:established; ftp.mode: suricata; sid:1;)
+alert ftp any any -> any any (msg: "Match on FTP active mode"; flow:established; ftp.mode: xpassive; sid:2;)
+alert ftp any any -> any any (msg: "Match on FTP active mode"; flow:established; ftp.mode: xactive; sid:3;)
--- /dev/null
+requires:
+ version: 8
+ pcap: false
+
+exit-code: 1
+
+args:
+ - --engine-analysis
+
+checks:
+
+ - shell:
+ args: grep "error parsing signature" suricata.log | wc -l | xargs
+ expect: 3