mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 11:03:47 +03:00
minor refactoring/optimization
This commit is contained in:
parent
7314de3490
commit
0df768e24a
|
@ -39,7 +39,7 @@ def headersParser(headers):
|
||||||
}
|
}
|
||||||
|
|
||||||
for header in headers:
|
for header in headers:
|
||||||
if header in topHeaders.keys():
|
if header in topHeaders:
|
||||||
value = headers[header]
|
value = headers[header]
|
||||||
xmlfile = topHeaders[header]
|
xmlfile = topHeaders[header]
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,6 @@ class htmlHandler(ContentHandler):
|
||||||
|
|
||||||
self.__dbms = None
|
self.__dbms = None
|
||||||
self.__page = page
|
self.__page = page
|
||||||
self.__regexp = None
|
|
||||||
self.__match = None
|
|
||||||
|
|
||||||
self.dbms = None
|
self.dbms = None
|
||||||
|
|
||||||
|
@ -37,13 +35,9 @@ class htmlHandler(ContentHandler):
|
||||||
if name == "dbms":
|
if name == "dbms":
|
||||||
self.__dbms = attrs.get("value")
|
self.__dbms = attrs.get("value")
|
||||||
|
|
||||||
if name == "error":
|
elif name == "error":
|
||||||
self.__regexp = attrs.get("regexp")
|
if re.search(attrs.get("regexp"), self.__page, re.I):
|
||||||
self.__match = re.search(self.__regexp, self.__page, re.I)
|
|
||||||
|
|
||||||
if self.__match:
|
|
||||||
self.dbms = self.__dbms
|
self.dbms = self.__dbms
|
||||||
self.__match = None
|
|
||||||
threadData = getCurrentThreadData()
|
threadData = getCurrentThreadData()
|
||||||
threadData.lastErrorPage = (threadData.lastRequestUID, self.__page)
|
threadData.lastErrorPage = (threadData.lastRequestUID, self.__page)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user