mirror of
				https://github.com/jtesta/ssh-audit.git
				synced 2025-11-04 11:12:15 +01:00 
			
		
		
		
	Fix error output.
This commit is contained in:
		@@ -1612,7 +1612,7 @@ def audit(conf, sshv=None):
 | 
				
			|||||||
	if err is None:
 | 
						if err is None:
 | 
				
			||||||
		packet_type, payload = s.read_packet(sshv)
 | 
							packet_type, payload = s.read_packet(sshv)
 | 
				
			||||||
		if packet_type < 0:
 | 
							if packet_type < 0:
 | 
				
			||||||
			payload = payload.decode('utf-8')
 | 
								payload = str(payload).decode('utf-8')
 | 
				
			||||||
			if payload == u'Protocol major versions differ.':
 | 
								if payload == u'Protocol major versions differ.':
 | 
				
			||||||
				if sshv == 2 and conf.ssh1:
 | 
									if sshv == 2 and conf.ssh1:
 | 
				
			||||||
					audit(conf, 1)
 | 
										audit(conf, 1)
 | 
				
			||||||
@@ -1640,7 +1640,7 @@ def audit(conf, sshv=None):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
utils = Utils.wrap()
 | 
					utils = Utils.wrap()
 | 
				
			||||||
 | 
					out = Output()
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
	conf = AuditConf.from_cmdline(sys.argv[1:], usage)
 | 
						conf = AuditConf.from_cmdline(sys.argv[1:], usage)
 | 
				
			||||||
	out = Output()
 | 
					 | 
				
			||||||
	audit(conf)
 | 
						audit(conf)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user