MCPcopy
hub / github.com/cloudflare/flan / parse

Method parse

contrib/parsers/flan_xml_parser.py:41–55  ·  view source on GitHub ↗

Parse xmltodict output and fill internal collections :param data: xmltodict output

(self, data: Dict[str, Any])

Source from the content-addressed store, hash-verified

39 return set(self.results) - set(self.vulnerable_services)
40
41 def parse(self, data: Dict[str, Any]):
42 """
43 Parse xmltodict output and fill internal collections
44 :param data: xmltodict output
45 """
46 if 'host' not in data['nmaprun']:
47 return
48
49 hosts = data['nmaprun']['host']
50
51 if isinstance(hosts, list):
52 for h in hosts:
53 self.parse_host(h)
54 else:
55 self.parse_host(hosts)
56
57 def parse_vuln(self, app_name: str, vuln: List[Dict[str, Any]]):
58 vuln_name = ''

Callers 2

mainFunction · 0.95
read_xml_contentsMethod · 0.80

Calls 1

parse_hostMethod · 0.95

Tested by

no test coverage detected