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

Function cleanupVals

lib/parse/payloads.py:21–41  ·  view source on GitHub ↗
(text, tag)

Source from the content-addressed store, hash-verified

19from lib.core.settings import PAYLOAD_XML_FILES
20
21def cleanupVals(text, tag):
22 if tag == "clause" and '-' in text:
23 text = re.sub(r"(\d+)-(\d+)", lambda match: ','.join(str(_) for _ in xrange(int(match.group(1)), int(match.group(2)) + 1)), text)
24
25 if tag in ("clause", "where"):
26 text = text.split(',')
27
28 if hasattr(text, "isdigit") and text.isdigit():
29 text = int(text)
30
31 elif isinstance(text, list):
32 count = 0
33
34 for _ in text:
35 text[count] = int(_) if _.isdigit() else _
36 count += 1
37
38 if len(text) == 1 and tag not in ("clause", "where"):
39 text = text[0]
40
41 return text
42
43def parseXmlNode(node):
44 for element in node.findall("boundary"):

Callers 1

parseXmlNodeFunction · 0.85

Calls 1

xrangeClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…