remove leading and trailing spaces around all input switches. Fixes austi-taylor/VulnWhisperer#6

This commit is contained in:
Shaun McCullough
2017-12-08 00:40:25 -05:00
parent fcd938b75a
commit c1c4a45562

View File

@ -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: