MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / queryPage

Method queryPage

lib/request/connect.py:1029–1652  ·  view source on GitHub ↗

This method calls a function to get the target URL page content and returns its page ratio (0 <= ratio <= 1) or a boolean value representing False/True match in case of !getRatioValue

(value=None, place=None, content=False, getRatioValue=False, silent=False, method=None, timeBasedCompare=False, noteResponseTime=True, auxHeaders=None, response=False, raise404=None, removeReflection=True, disableTampering=False, ignoreSecondOrder=False)

Source from the content-addressed store, hash-verified

1027 @staticmethod
1028 @stackedmethod
1029 def queryPage(value=None, place=None, content=False, getRatioValue=False, silent=False, method=None, timeBasedCompare=False, noteResponseTime=True, auxHeaders=None, response=False, raise404=None, removeReflection=True, disableTampering=False, ignoreSecondOrder=False):
1030 """
1031 This method calls a function to get the target URL page content
1032 and returns its page ratio (0 <= ratio <= 1) or a boolean value
1033 representing False/True match in case of !getRatioValue
1034 """
1035
1036 if conf.direct:
1037 return direct(value, content)
1038
1039 get = None
1040 post = None
1041 cookie = None
1042 ua = None
1043 referer = None
1044 host = None
1045 page = None
1046 pageLength = None
1047 uri = None
1048 code = None
1049
1050 if not place:
1051 place = kb.injection.place or PLACE.GET
1052
1053 kb.place = place
1054
1055 if not auxHeaders:
1056 auxHeaders = {}
1057
1058 raise404 = place != PLACE.URI if raise404 is None else raise404
1059 method = method or conf.method
1060
1061 postUrlEncode = kb.postUrlEncode
1062
1063 value = agent.adjustLateValues(value)
1064 payload = agent.extractPayload(value)
1065 threadData = getCurrentThreadData()
1066
1067 if conf.httpHeaders:
1068 headers = OrderedDict(conf.httpHeaders)
1069 contentType = max(headers[_] or "" if _.upper() == HTTP_HEADER.CONTENT_TYPE.upper() else "" for _ in headers) or None
1070
1071 if (kb.postHint or conf.skipUrlEncode) and postUrlEncode:
1072 postUrlEncode = False
1073 if not (conf.skipUrlEncode and contentType): # NOTE: https://github.com/sqlmapproject/sqlmap/issues/5092
1074 conf.httpHeaders = [_ for _ in conf.httpHeaders if _[1] != contentType]
1075 contentType = POST_HINT_CONTENT_TYPES.get(kb.postHint, PLAIN_TEXT_CONTENT_TYPE)
1076 conf.httpHeaders.append((HTTP_HEADER.CONTENT_TYPE, contentType))
1077 if "urlencoded" in contentType:
1078 postUrlEncode = True
1079
1080 if payload:
1081 delimiter = conf.paramDel or (DEFAULT_GET_POST_DELIMITER if place != PLACE.COOKIE else DEFAULT_COOKIE_DELIMITER)
1082
1083 if not disableTampering and kb.tamperFunctions:
1084 for function in kb.tamperFunctions:
1085 hints = {}
1086

Callers 15

checkSqlInjectionFunction · 0.80
checkDynParamFunction · 0.80
checkDynamicContentFunction · 0.80
checkStabilityFunction · 0.80
checkWafFunction · 0.80
checkConnectionFunction · 0.80
_goBooleanProxyFunction · 0.80
goStackedFunction · 0.80
getPageTemplateFunction · 0.80
_findPageFormsFunction · 0.80
_webFileInjectMethod · 0.80

Calls 15

directFunction · 0.90
OrderedDictClass · 0.90
getSafeExStringFunction · 0.90
safecharencodeFunction · 0.90
escapeJsonValueFunction · 0.90
readInputFunction · 0.90
urlencodeFunction · 0.90
singleTimeWarnMessageFunction · 0.90
AttribDictClass · 0.90
urldecodeFunction · 0.90

Tested by 4

_orderByTestFunction · 0.64
_findUnionCharCountFunction · 0.64
_fuzzUnionColsFunction · 0.64
_unionPositionFunction · 0.64