mirror of
				https://github.com/jtesta/ssh-audit.git
				synced 2025-10-30 13:05:26 +01:00 
			
		
		
		
	When a list of targets is provided (-T), skip empty lines.
This commit is contained in:
		| @@ -573,8 +573,8 @@ class AuditConf: | |||||||
|             with open(aconf.target_file, 'r') as f: |             with open(aconf.target_file, 'r') as f: | ||||||
|                 aconf.target_list = f.readlines() |                 aconf.target_list = f.readlines() | ||||||
|  |  | ||||||
|             # Strip out whitespace from each line in target file. |             # Strip out whitespace from each line in target file, and skip empty lines. | ||||||
|             aconf.target_list = [target.strip() for target in aconf.target_list] |             aconf.target_list = [target.strip() for target in aconf.target_list if target not in ("", "\n")] | ||||||
|  |  | ||||||
|         # If a policy file was provided, validate it. |         # If a policy file was provided, validate it. | ||||||
|         if (aconf.policy_file is not None) and (aconf.make_policy is False): |         if (aconf.policy_file is not None) and (aconf.make_policy is False): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Joe Testa
					Joe Testa