mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-26 04:21: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:
|
if self.__banner is not None:
|
||||||
continue
|
continue
|
||||||
self.__header.append(line)
|
self.__header.append(line)
|
||||||
|
s = 0
|
||||||
return self.__banner, self.__header
|
return self.__banner, self.__header
|
||||||
|
|
||||||
def recv(self, size=2048):
|
def recv(self, size=2048):
|
||||||
@ -888,6 +889,7 @@ def output_security_sub(sub, software, padlen):
|
|||||||
|
|
||||||
def output_security(banner, padlen):
|
def output_security(banner, padlen):
|
||||||
with OutputBuffer() as obuf:
|
with OutputBuffer() as obuf:
|
||||||
|
if banner:
|
||||||
software = SSH.Software.parse(banner)
|
software = SSH.Software.parse(banner)
|
||||||
output_security_sub('cve', software, padlen)
|
output_security_sub('cve', software, padlen)
|
||||||
output_security_sub('txt', software, padlen)
|
output_security_sub('txt', software, padlen)
|
||||||
|
Loading…
Reference in New Issue
Block a user