From b7d144f8b5a261f897e6ab0dc7dc5f489b09b23e Mon Sep 17 00:00:00 2001 From: Michel Oosterhof Date: Thu, 11 Jun 2015 14:07:21 +0000 Subject: [PATCH] only attempt to send banner once. --- cowrie/core/ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cowrie/core/ssh.py b/cowrie/core/ssh.py index d1af5a9..23ce00f 100644 --- a/cowrie/core/ssh.py +++ b/cowrie/core/ssh.py @@ -37,6 +37,7 @@ class HoneyPotSSHUserAuthServer(userauth.SSHUserAuthServer): def sendBanner(self): if self.bannerSent: return + self.bannerSent = True cfg = self.portal.realm.cfg try: honeyfs = cfg.get('honeypot', 'contents_path') @@ -48,7 +49,6 @@ class HoneyPotSSHUserAuthServer(userauth.SSHUserAuthServer): return self.transport.sendPacket( userauth.MSG_USERAUTH_BANNER, NS(data) + NS('en')) - self.bannerSent = True def ssh_USERAUTH_REQUEST(self, packet): self.sendBanner()