Skip to content

Understanding argumentParser.py

Deepak Balaji edited this page Apr 4, 2020 · 2 revisions

This page explains what argumentParser.py does

To start off, this module parses whatever was given as argument during the program call.

This is accomplished using argparse. Click on the link to learn more about how argparse works.

variables

As explained by the argparse document above, every argument definition is taken as a variable in the parser class. Hence, the variables that end up in the class object are

  • version stores the version of the tool

  • include is a list of all the recommendations that the user wants to include for testing. To know how this works during runtime, refer this wiki

  • exclude is a list of all the recommendations that the user wants to exclude from testing. To know how this works during runtime, refer this wiki

  • level accepts either 1 or 2 as argument, based on what profile applicability the user wants to set. To know how this works during runtime, refer this wiki

  • score accepts either 0 (NOT SCORED) or 1 (SCORED) as argument, based on what the user wants to test. To know how this works during runtime, refer this wiki

  • platform accepts either server or workstation as argument, based on what the user wants to test. To know how this works during runtime, refer this wiki

  • auditor accepts a string as argument, used to set the name of the person performing the test. To know how this works during runtime, refer this wiki

  • org accepts a string as argument, used to set the name of the organization where the test is being performed. To know how this works during runtime, refer this wiki

  • unique accepts a string as argument, used to set the unique system ID of the system in which the test is being performed. To know how this works during runtime, refer this wiki

  • descript accepts a string as argument, used to set any description that the user wants to give for their future reference. To know how this works during runtime, refer this wiki

  • dist accepts a string as argument, used to specify the distribution of the system being tested. To know how this works during runtime, refer this wiki

  • report accepts a string as argument, used to specify the spreadsheet(s) that needs to be converted into report(s). To know how this works during runtime, refer this wiki

  • exp is a list of all the controls that the uses wants the program to explain. To know how this works during runtime, refer this wiki

  • verbose is a boolean value, that specifies whether every result is to be displayed on the terminal or not. To know how this works during runtime, refer this wiki

Clone this wiki locally