|
36 | 36 | from lib.core.common import showStaticWords |
37 | 37 | from lib.core.common import singleTimeLogMessage |
38 | 38 | from lib.core.common import singleTimeWarnMessage |
39 | | -from lib.core.common import wasLastRequestDBMSError |
40 | | -from lib.core.common import wasLastRequestHTTPError |
| 39 | +from lib.core.common import wasLastResponseDBMSError |
| 40 | +from lib.core.common import wasLastResponseHTTPError |
41 | 41 | from lib.core.data import conf |
42 | 42 | from lib.core.data import kb |
43 | 43 | from lib.core.data import logger |
@@ -695,7 +695,7 @@ def heuristicCheckSqlInjection(place, parameter): |
695 | 695 | logger.debug(debugMsg) |
696 | 696 | return None |
697 | 697 |
|
698 | | - if wasLastRequestDBMSError(): |
| 698 | + if wasLastResponseDBMSError(): |
699 | 699 | debugMsg = "heuristic checking skipped " |
700 | 700 | debugMsg += "because original page content " |
701 | 701 | debugMsg += "contains DBMS error" |
@@ -723,7 +723,7 @@ def heuristicCheckSqlInjection(place, parameter): |
723 | 723 | page, _ = Request.queryPage(payload, place, content=True, raise404=False) |
724 | 724 |
|
725 | 725 | parseFilePaths(page) |
726 | | - result = wasLastRequestDBMSError() |
| 726 | + result = wasLastResponseDBMSError() |
727 | 727 |
|
728 | 728 | infoMsg = "heuristic test shows that %s " % place |
729 | 729 | infoMsg += "parameter '%s' might " % parameter |
@@ -1083,14 +1083,14 @@ def checkConnection(suppressOutput=False): |
1083 | 1083 |
|
1084 | 1084 | kb.errorIsNone = False |
1085 | 1085 |
|
1086 | | - if not kb.originalPage and wasLastRequestHTTPError(): |
| 1086 | + if not kb.originalPage and wasLastResponseHTTPError(): |
1087 | 1087 | errMsg = "unable to retrieve page content" |
1088 | 1088 | raise SqlmapConnectionException(errMsg) |
1089 | | - elif wasLastRequestDBMSError(): |
| 1089 | + elif wasLastResponseDBMSError(): |
1090 | 1090 | warnMsg = "there is a DBMS error found in the HTTP response body " |
1091 | 1091 | warnMsg += "which could interfere with the results of the tests" |
1092 | 1092 | logger.warn(warnMsg) |
1093 | | - elif wasLastRequestHTTPError(): |
| 1093 | + elif wasLastResponseHTTPError(): |
1094 | 1094 | warnMsg = "the web server responded with an HTTP error code (%d) " % getLastRequestHTTPError() |
1095 | 1095 | warnMsg += "which could interfere with the results of the tests" |
1096 | 1096 | logger.warn(warnMsg) |
|
0 commit comments