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

Function configUnion

lib/techniques/union/use.py:206–237  ·  view source on GitHub ↗
(char=None, columns=None)

Source from the content-addressed store, hash-verified

204 return retVal
205
206def configUnion(char=None, columns=None):
207 def _configUnionChar(char):
208 if not isinstance(char, six.string_types):
209 return
210
211 kb.uChar = char
212
213 if conf.uChar is not None:
214 kb.uChar = char.replace("[CHAR]", conf.uChar if isDigit(conf.uChar) else "'%s'" % conf.uChar.strip("'"))
215
216 def _configUnionCols(columns):
217 if not isinstance(columns, six.string_types):
218 return
219
220 columns = columns.replace(' ', "")
221 if '-' in columns:
222 colsStart, colsStop = columns.split('-')
223 else:
224 colsStart, colsStop = columns, columns
225
226 if not isDigit(colsStart) or not isDigit(colsStop):
227 raise SqlmapSyntaxException("--union-cols must be a range of integers")
228
229 conf.uColsStart, conf.uColsStop = int(colsStart), int(colsStop)
230
231 if conf.uColsStart > conf.uColsStop:
232 errMsg = "--union-cols range has to represent lower to "
233 errMsg += "higher number of columns"
234 raise SqlmapSyntaxException(errMsg)
235
236 _configUnionChar(char)
237 _configUnionCols(conf.uCols or columns)
238
239def unionUse(expression, unpack=True, dump=False):
240 """

Callers 1

checkSqlInjectionFunction · 0.90

Calls 2

_configUnionCharFunction · 0.85
_configUnionColsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…