mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-12-23 06:27:41 +01:00
Do not hang when remote host closes connection fast. Fix security output.
This commit is contained in:
parent
e3559a76b8
commit
bfa9e6f936
@ -493,6 +493,7 @@ class SSH(object):
|
||||
if self.__banner is not None:
|
||||
continue
|
||||
self.__header.append(line)
|
||||
s = 0
|
||||
return self.__banner, self.__header
|
||||
|
||||
def recv(self, size=2048):
|
||||
@ -888,9 +889,10 @@ def output_security_sub(sub, software, padlen):
|
||||
|
||||
def output_security(banner, padlen):
|
||||
with OutputBuffer() as obuf:
|
||||
software = SSH.Software.parse(banner)
|
||||
output_security_sub('cve', software, padlen)
|
||||
output_security_sub('txt', software, padlen)
|
||||
if banner:
|
||||
software = SSH.Software.parse(banner)
|
||||
output_security_sub('cve', software, padlen)
|
||||
output_security_sub('txt', software, padlen)
|
||||
if len(obuf) > 0:
|
||||
out.head('# security')
|
||||
obuf.flush()
|
||||
|
Loading…
Reference in New Issue
Block a user