(configFile)
Parse configuration file and save settings into the configuration
    advanced dictionary.
Parse configuration file and save settings into the configuration
    advanced dictionary.
Parse configuration file and save settings into the configuration advanced dictionary .
def configFileParser(configFile):
    """
    Parse configuration file and save settings into the configuration
    advanced dictionary.
    """

    global config

    debugMsg = "parsing configuration file"
    logger.debug(debugMsg)

    checkFile(configFile)
    configFP = openFile(configFile, "rb")

    try:
        config = UnicodeRawConfigParser()
        config.readfp(configFP)
    except Exception, ex:
        errMsg = "you have provided an invalid and/or unreadable configuration file ('%s')" % getSafeExString(ex)
        raise SqlmapSyntaxException(errMsg)

    if not config.has_section("Target"):
        errMsg = "missing a mandatory section 'Target' in the configuration file"
        raise SqlmapMissingMandatoryOptionException(errMsg)

    condition = not config.has_option("Target", "direct")
    condition &= not config.has_option("Target", "url")
    condition &= not config.has_option("Target", "logFile")
    condition &= not config.has_option("Target", "bulkFile")
    condition &= not config.has_option("Target", "googleDork")
    condition &= not config.has_option("Target", "requestFile")
    condition &= not config.has_option("Target", "sitemapUrl")
    condition &= not config.has_option("Target", "wizard")

    if condition:
        errMsg = "missing a mandatory option in the configuration file "
        errMsg += "(direct, url, logFile, bulkFile, googleDork, requestFile, sitemapUrl or wizard)"
        raise SqlmapMissingMandatoryOptionException(errMsg)

    for family, optionData in optDict.items():
        for option, datatype in optionData.items():
            datatype = unArrayizeValue(datatype)

            boolean = datatype == "boolean"
            integer = datatype == "integer"

            configFileProxy(family, option, boolean, integer)
def configFileParser ( configFile ) : global config debugMsg = "parsing configuration file" logger . debug ( debugMsg ) checkFile ( configFile ) configFP = openFile ( configFile , "rb" ) try : config = UnicodeRawConfigParser ( ) config . readfp ( configFP ) except Exception , ex : errMsg = "you have provided an invalid and/or unreadable configuration file ('%s')" % getSafeExString ( ex ) raise SqlmapSyntaxException ( errMsg ) if not config . has_section ( "Target" ) : errMsg = "missing a mandatory section 'Target' in the configuration file" raise SqlmapMissingMandatoryOptionException ( errMsg ) condition = not config . has_option ( "Target" , "direct" ) condition &= not config . has_option ( "Target" , "url" ) condition &= not config . has_option ( "Target" , "logFile" ) condition &= not config . has_option ( "Target" , "bulkFile" ) condition &= not config . has_option ( "Target" , "googleDork" ) condition &= not config . has_option ( "Target" , "requestFile" ) condition &= not config . has_option ( "Target" , "sitemapUrl" ) condition &= not config . has_option ( "Target" , "wizard" ) if condition : errMsg = "missing a mandatory option in the configuration file " errMsg += "(direct, url, logFile, bulkFile, googleDork, requestFile, sitemapUrl or wizard)" raise SqlmapMissingMandatoryOptionException ( errMsg ) for family , optionData in optDict . items ( ) : for option , datatype in optionData . items ( ) : datatype = unArrayizeValue ( datatype ) boolean = datatype == "boolean" integer = datatype == "integer" configFileProxy ( family , option , boolean , integer )