mirror of
				https://github.com/jtesta/ssh-audit.git
				synced 2025-10-30 21:15:27 +01:00 
			
		
		
		
	Do not hang when remote host closes connection fast. Fix security output.
This commit is contained in:
		| @@ -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) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Andris Raugulis
					Andris Raugulis