同步操作将从 yeqingchen1/sqlmap 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env python"""Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)See the file 'LICENSE' for copying permission"""from lib.core.common import checkFilefrom lib.core.common import getSafeExStringfrom lib.core.common import openFilefrom lib.core.common import unArrayizeValuefrom lib.core.common import UnicodeRawConfigParserfrom lib.core.convert import getUnicodefrom lib.core.data import cmdLineOptionsfrom lib.core.data import conffrom lib.core.data import loggerfrom lib.core.enums import OPTION_TYPEfrom lib.core.exception import SqlmapMissingMandatoryOptionExceptionfrom lib.core.exception import SqlmapSyntaxExceptionfrom lib.core.optiondict import optDictconfig = Nonedef configFileProxy(section, option, datatype):"""Parse configuration file and save settings into the configurationadvanced dictionary."""if config.has_option(section, option):try:if datatype == OPTION_TYPE.BOOLEAN:value = config.getboolean(section, option) if config.get(section, option) else Falseelif datatype == OPTION_TYPE.INTEGER:value = config.getint(section, option) if config.get(section, option) else 0elif datatype == OPTION_TYPE.FLOAT:value = config.getfloat(section, option) if config.get(section, option) else 0.0else:value = config.get(section, option)except ValueError as ex:errMsg = "error occurred while processing the option "errMsg += "'%s' in provided configuration file ('%s')" % (option, getUnicode(ex))raise SqlmapSyntaxException(errMsg)if value:conf[option] = valueelse:conf[option] = Noneelse:debugMsg = "missing requested option '%s' (section " % optiondebugMsg += "'%s') into the configuration file, " % sectiondebugMsg += "ignoring. Skipping to next."logger.debug(debugMsg)def configFileParser(configFile):"""Parse configuration file and save settings into the configurationadvanced dictionary."""global configdebugMsg = "parsing configuration file"logger.debug(debugMsg)checkFile(configFile)configFP = openFile(configFile, "rb")try:config = UnicodeRawConfigParser()config.readfp(configFP)except Exception as 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)mandatory = Falsefor option in ("direct", "url", "logFile", "bulkFile", "googleDork", "requestFile", "sitemapUrl", "wizard"):if config.has_option("Target", option) and config.get("Target", option) or cmdLineOptions.get(option):mandatory = Truebreakif not mandatory: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)configFileProxy(family, option, datatype)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。