]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
Adds a readme and the dummy python script 8/head
authorPhilippe Antoine <contact@catenacyber.fr>
Fri, 18 Jan 2019 16:37:58 +0000 (17:37 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 8 Feb 2019 11:40:07 +0000 (12:40 +0100)
Commit to be squashed

tests/smtp-pipelining/README.md [new file with mode: 0644]
tests/smtp-pipelining/client.py [new file with mode: 0644]

diff --git a/tests/smtp-pipelining/README.md b/tests/smtp-pipelining/README.md
new file mode 100644 (file)
index 0000000..45c0d13
--- /dev/null
@@ -0,0 +1,8 @@
+# Description
+
+Test smtp pipelining support.
+
+# PCAP
+
+The pcap comes from running postfix as a server and the present dummy python script client.py
+The postfix server advertises pipelining support in the pcap and accepts all commands MAIL FROM, RCPT TO and DATA in one packet, and returns only one answer.
diff --git a/tests/smtp-pipelining/client.py b/tests/smtp-pipelining/client.py
new file mode 100644 (file)
index 0000000..263abd3
--- /dev/null
@@ -0,0 +1,15 @@
+import socket
+
+sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+sock.connect(("127.0.0.1", 25))
+
+data = sock.recv(2000)
+print "1", data
+a = sock.send("EHLO ehlo.fr\r\n")
+data = sock.recv(2000)
+print "2", data
+a = sock.send("MAIL FROM:<username@domain.com>\r\nRCPT TO:<john.doe@example.com>\r\nDATA\r\nThis is a test\r\n.\r\n")
+data = sock.recv(2000)
+print "3", data
+
+sock.close()