mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03:00
minor optimization
This commit is contained in:
parent
2e10de8921
commit
501fd85fa1
|
@ -45,7 +45,11 @@ class FingerprintHandler(ContentHandler):
|
|||
def startElement(self, name, attrs):
|
||||
if name == "regexp":
|
||||
self.__regexp = sanitizeStr(attrs.get("value"))
|
||||
_ = re.match("\A[A-Za-z0-9]+", self.__regexp) # minor trick avoiding compiling of large amount of regexes
|
||||
if _ and _.group(0).lower() in self.__banner.lower() or not _:
|
||||
self.__match = re.search(self.__regexp, self.__banner, re.I | re.M)
|
||||
else:
|
||||
self.__match = None
|
||||
|
||||
if name == "info" and self.__match:
|
||||
self.__feedInfo("type", attrs.get("type"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user