mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-07 16:24:28 +01:00
only attempt to send banner once.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user