同步操作将从 yeqingchen1/sqlmap 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env python"""Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)See the file 'LICENSE' for copying permission"""import osimport refrom xml.etree import ElementTree as etfrom lib.core.common import getSafeExStringfrom lib.core.compat import xrangefrom lib.core.data import conffrom lib.core.data import pathsfrom lib.core.datatype import AttribDictfrom lib.core.exception import SqlmapInstallationExceptionfrom lib.core.settings import PAYLOAD_XML_FILESdef cleanupVals(text, tag):if tag == "clause" and '-' in text:text = re.sub(r"(\d+)-(\d+)", lambda match: ','.join(str(_) for _ in xrange(int(match.group(1)), int(match.group(2)) + 1)), text)if tag in ("clause", "where"):text = text.split(',')if hasattr(text, "isdigit") and text.isdigit():text = int(text)elif isinstance(text, list):count = 0for _ in text:text[count] = int(_) if _.isdigit() else _count += 1if len(text) == 1 and tag not in ("clause", "where"):text = text[0]return textdef parseXmlNode(node):for element in node.getiterator("boundary"):boundary = AttribDict()for child in element.getchildren():if child.text:values = cleanupVals(child.text, child.tag)boundary[child.tag] = valueselse:boundary[child.tag] = Noneconf.boundaries.append(boundary)for element in node.getiterator("test"):test = AttribDict()for child in element.getchildren():if child.text and child.text.strip():values = cleanupVals(child.text, child.tag)test[child.tag] = valueselse:if len(child.getchildren()) == 0:test[child.tag] = Nonecontinueelse:test[child.tag] = AttribDict()for gchild in child.getchildren():if gchild.tag in test[child.tag]:prevtext = test[child.tag][gchild.tag]test[child.tag][gchild.tag] = [prevtext, gchild.text]else:test[child.tag][gchild.tag] = gchild.textconf.tests.append(test)def loadBoundaries():try:doc = et.parse(paths.BOUNDARIES_XML)except Exception as ex:errMsg = "something appears to be wrong with "errMsg += "the file '%s' ('%s'). Please make " % (paths.BOUNDARIES_XML, getSafeExString(ex))errMsg += "sure that you haven't made any changes to it"raise SqlmapInstallationException(errMsg)root = doc.getroot()parseXmlNode(root)def loadPayloads():for payloadFile in PAYLOAD_XML_FILES:payloadFilePath = os.path.join(paths.SQLMAP_XML_PAYLOADS_PATH, payloadFile)try:doc = et.parse(payloadFilePath)except Exception as ex:errMsg = "something appears to be wrong with "errMsg += "the file '%s' ('%s'). Please make " % (payloadFilePath, getSafeExString(ex))errMsg += "sure that you haven't made any changes to it"raise SqlmapInstallationException(errMsg)root = doc.getroot()parseXmlNode(root)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。