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

Function parseXmlNode

lib/parse/payloads.py:43–77  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

41 return text
42
43def parseXmlNode(node):
44 for element in node.findall("boundary"):
45 boundary = AttribDict()
46
47 for child in element:
48 if child.text:
49 values = cleanupVals(child.text, child.tag)
50 boundary[child.tag] = values
51 else:
52 boundary[child.tag] = None
53
54 conf.boundaries.append(boundary)
55
56 for element in node.findall("test"):
57 test = AttribDict()
58
59 for child in element:
60 if child.text and child.text.strip():
61 values = cleanupVals(child.text, child.tag)
62 test[child.tag] = values
63 else:
64 if len(child.findall("*")) == 0:
65 test[child.tag] = None
66 continue
67 else:
68 test[child.tag] = AttribDict()
69
70 for gchild in child:
71 if gchild.tag in test[child.tag]:
72 prevtext = test[child.tag][gchild.tag]
73 test[child.tag][gchild.tag] = [prevtext, gchild.text]
74 else:
75 test[child.tag][gchild.tag] = gchild.text
76
77 conf.tests.append(test)
78
79def loadBoundaries():
80 """

Callers 2

loadBoundariesFunction · 0.85
loadPayloadsFunction · 0.85

Calls 3

AttribDictClass · 0.90
cleanupValsFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…