[Arguments] ${port} ${found}=
Wait For Port ${SOCK_STREAM} ${LOCAL_ADDR} ${port}
${result} = Start Process ${TESTDIR}/util/dummy_clam.py ${port} ${found}
+ Wait Until Created /tmp/dummy_clamav.pid
Run Dummy Fprot
[Arguments] ${port} ${found}=
Wait For Port ${SOCK_STREAM} ${LOCAL_ADDR} ${port}
${result} = Start Process ${TESTDIR}/util/dummy_fprot.py ${port} ${found}
+ Wait Until Created /tmp/dummy_fprot.pid
#!/usr/bin/env python
+PID = "/tmp/dummy_clamav.pid"
+
import os
import sys
try:
class MyTCPHandler(socketserver.BaseRequestHandler):
def handle(self):
+ os.remove(PID)
self.data = self.request.recv(1024).strip()
if self.server.foundvirus:
self.request.sendall(b"stream: Eicar-Test-Signature FOUND\0")
server.foundvirus = foundvirus
server.server_bind()
server.server_activate()
+ open(PID, 'w').close()
server.handle_request()
server.server_close()
os.exit(0)
#!/usr/bin/env python
+PID = "/tmp/dummy_fprot.pid"
+
import os
import sys
try:
class MyTCPHandler(socketserver.BaseRequestHandler):
def handle(self):
+ os.remove(PID)
self.data = self.request.recv(1024).strip()
if self.server.foundvirus:
self.request.sendall(b"1 <infected: EICAR_Test_File> FOO\n")
server.foundvirus = foundvirus
server.server_bind()
server.server_activate()
+ open(PID, 'w').close()
server.handle_request()
server.server_close()
os.exit(0)