mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
Patch for an Issue #919
This commit is contained in:
parent
06bb957d13
commit
cdbfb17408
|
@ -23,6 +23,9 @@ class SqlmapFilePathException(SqlmapBaseException):
|
||||||
class SqlmapGenericException(SqlmapBaseException):
|
class SqlmapGenericException(SqlmapBaseException):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
class SqlmapInstallationException(SqlmapBaseException):
|
||||||
|
pass
|
||||||
|
|
||||||
class SqlmapMissingDependence(SqlmapBaseException):
|
class SqlmapMissingDependence(SqlmapBaseException):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,7 @@ from lib.core.enums import WIZARD
|
||||||
from lib.core.exception import SqlmapConnectionException
|
from lib.core.exception import SqlmapConnectionException
|
||||||
from lib.core.exception import SqlmapFilePathException
|
from lib.core.exception import SqlmapFilePathException
|
||||||
from lib.core.exception import SqlmapGenericException
|
from lib.core.exception import SqlmapGenericException
|
||||||
|
from lib.core.exception import SqlmapInstallationException
|
||||||
from lib.core.exception import SqlmapMissingDependence
|
from lib.core.exception import SqlmapMissingDependence
|
||||||
from lib.core.exception import SqlmapMissingMandatoryOptionException
|
from lib.core.exception import SqlmapMissingMandatoryOptionException
|
||||||
from lib.core.exception import SqlmapMissingPrivileges
|
from lib.core.exception import SqlmapMissingPrivileges
|
||||||
|
@ -402,7 +403,13 @@ def _loadQueries():
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
tree = ElementTree()
|
tree = ElementTree()
|
||||||
|
try:
|
||||||
tree.parse(paths.QUERIES_XML)
|
tree.parse(paths.QUERIES_XML)
|
||||||
|
except Exception, ex:
|
||||||
|
errMsg = "something seems to be wrong with "
|
||||||
|
errMsg += "the file '%s' ('%s'). Please make " % (paths.QUERIES_XML, ex)
|
||||||
|
errMsg += "sure that you haven't made any changes to it"
|
||||||
|
raise SqlmapInstallationException, errMsg
|
||||||
|
|
||||||
for node in tree.findall("*"):
|
for node in tree.findall("*"):
|
||||||
queries[node.attrib['value']] = iterate(node)
|
queries[node.attrib['value']] = iterate(node)
|
||||||
|
|
|
@ -10,6 +10,7 @@ from xml.etree import ElementTree as et
|
||||||
from lib.core.data import conf
|
from lib.core.data import conf
|
||||||
from lib.core.data import paths
|
from lib.core.data import paths
|
||||||
from lib.core.datatype import AttribDict
|
from lib.core.datatype import AttribDict
|
||||||
|
from lib.core.exception import SqlmapInstallationException
|
||||||
|
|
||||||
def cleanupVals(text, tag):
|
def cleanupVals(text, tag):
|
||||||
if tag in ("clause", "where"):
|
if tag in ("clause", "where"):
|
||||||
|
@ -67,6 +68,13 @@ def parseXmlNode(node):
|
||||||
conf.tests.append(test)
|
conf.tests.append(test)
|
||||||
|
|
||||||
def loadPayloads():
|
def loadPayloads():
|
||||||
|
try:
|
||||||
doc = et.parse(paths.PAYLOADS_XML)
|
doc = et.parse(paths.PAYLOADS_XML)
|
||||||
|
except Exception, ex:
|
||||||
|
errMsg = "something seems to be wrong with "
|
||||||
|
errMsg += "the file '%s' ('%s'). Please make " % (paths.PAYLOADS_XML, ex)
|
||||||
|
errMsg += "sure that you haven't made any changes to it"
|
||||||
|
raise SqlmapInstallationException, errMsg
|
||||||
|
|
||||||
root = doc.getroot()
|
root = doc.getroot()
|
||||||
parseXmlNode(root)
|
parseXmlNode(root)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user