--- /dev/null
+# Description
+
+Test xor transform.
+
+# PCAP
+
+The pcap comes from running dummy HTTP1 server
+and in parallel as client(s) :
+```
+curl 127.0.0.1:8080/get?data=%7Dk%BB%8Cze%BA%9B0y%BD%8Fhx%BB%9Anx%AD%8B
+```
+
+The uri was computed with script `./xor.py password=supersecret`
--- /dev/null
+alert http any any -> any any (msg:"HTTP with xor"; http.uri; content: "/get?data="; startswith; http.uri; pcrexform:"/get\?data=(.*)"; xor:"0d0ac8ff"; content:"password="; sid:1;)
--- /dev/null
+requires:
+ files:
+ - src/detect-transform-xor.c
+
+args:
+ - -k none
+checks:
+ - filter:
+ count: 1
+ match:
+ event_type: alert
+ alert.signature_id: 1
--- /dev/null
+import sys
+import binascii
+import urllib
+
+key = binascii.unhexlify("0d0ac8ff")
+xored = ""
+for i in range(len(sys.argv[1])):
+ xored = xored + chr(ord(sys.argv[1][i]) ^ ord(key[i%len(key)]))
+print(urllib.quote_plus(xored))