mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-22 02:21:40 +01:00
Wait for server banner, before sending client banner (fixes Cisco sshd).
This commit is contained in:
parent
280a37ba20
commit
c68211b8e7
@ -280,6 +280,12 @@ class SSH(object):
|
||||
return self
|
||||
|
||||
def get_banner(self):
|
||||
rto = self.__sock.gettimeout()
|
||||
self.__sock.settimeout(0.7)
|
||||
s, e = self.recv()
|
||||
self.__sock.settimeout(rto)
|
||||
if s < 0:
|
||||
return self.__banner, self.__header
|
||||
if self.__state < self.SM_BANNER_SENT:
|
||||
self.send_banner()
|
||||
while self.__banner is None:
|
||||
|
Loading…
Reference in New Issue
Block a user