lol. this was a pesky bug. heuristic wasn't working on one mssql test site and i couldn't find why. at end the problem was that when the HTTP code was raised (like 500) no parseResponse was called.

This commit is contained in:
Miroslav Stampar 2010-12-22 19:12:46 +00:00
parent 7c06dbffc3
commit 8fc60215ed
3 changed files with 4 additions and 1 deletions

View File

@ -444,7 +444,8 @@ def heuristicCheckSqlInjection(place, parameter, value):
payload = "%s%s%s%s" % (value, prefix, randomStr(length=10, alphabet=['"', '\'', ')', '(']), suffix)
payload = agent.payload(place, parameter, value, payload)
page, _ = Request.queryPage(payload, place, content=True, raise404=False)
Request.queryPage(payload, place, content=False, raise404=False)
result = wasLastRequestDBMSError()
infoMsg = "heuristic test shows that %s " % place

View File

@ -266,6 +266,7 @@ class Connect:
else:
debugMsg = "got HTTP error code: %d (%s)" % (code, status)
logger.debug(debugMsg)
parseResponse(page, responseHeaders)
return page, responseHeaders
except (urllib2.URLError, socket.error, socket.timeout, httplib.BadStatusLine, httplib.IncompleteRead), e:

View File

@ -23,6 +23,7 @@
<error regexp="OLE DB.*SQL Server"/>
<error regexp="SQL Server.*Driver"/>
<error regexp="Warning.*mssql_.*"/>
<error regexp="SQL Server.*[0-9a-fA-F]{8}"/>
</dbms>
<!-- Microsoft Access -->