From c1c4a45562f7d54907a05a6c29ee9307887fc863 Mon Sep 17 00:00:00 2001 From: Shaun McCullough Date: Fri, 8 Dec 2017 00:40:25 -0500 Subject: [PATCH] remove leading and trailing spaces around all input switches. Fixes austi-taylor/VulnWhisperer#6 --- bin/vuln_whisperer | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/vuln_whisperer b/bin/vuln_whisperer index d39ec66..284b42e 100644 --- a/bin/vuln_whisperer +++ b/bin/vuln_whisperer @@ -21,11 +21,11 @@ def main(): parser = argparse.ArgumentParser(description=""" VulnWhisperer is designed to create actionable data from\ your vulnerability scans through aggregation of historical scans.""") parser.add_argument('-c', '--config', dest='config', required=False, default='frameworks.ini', - help='Path of config file', type=lambda x: isFileValid(parser, x)) + help='Path of config file', type=lambda x: isFileValid(parser, x.strip())) parser.add_argument('-v', '--verbose', dest='verbose', action='store_true', default=True, help='Prints status out to screen (defaults to True)') - parser.add_argument('-u', '--username', dest='username', required=False, default=None, help='The NESSUS username') - parser.add_argument('-p', '--password', dest='password', required=False, default=None, help='The NESSUS password') + parser.add_argument('-u', '--username', dest='username', required=False, default=None, type=lambda x: x.strip(), help='The NESSUS username') + parser.add_argument('-p', '--password', dest='password', required=False, default=None, type=lambda x: x.strip(), help='The NESSUS password') args = parser.parse_args() try: