MCPcopy
hub / github.com/apache/caldera / parse

Method parse

app/learning/p_ip.py:13–16  ·  view source on GitHub ↗
(self, blob)

Source from the content-addressed store, hash-verified

11 self.trait = 'host.ip.address'
12
13 def parse(self, blob):
14 for ip in re.findall(r'\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b', blob):
15 if self._is_valid_ip(ip):
16 yield Fact.load(dict(trait=self.trait, value=ip))
17
18 @staticmethod
19 def _is_valid_ip(raw_ip):

Callers 9

restRequestFunction · 0.45
apiV2Function · 0.45
jquery.jsFile · 0.45
teFunction · 0.45
compare_versionsMethod · 0.45
learnMethod · 0.45
_saveMethod · 0.45
test_ipMethod · 0.45
test_pathMethod · 0.45

Calls 2

_is_valid_ipMethod · 0.95
loadMethod · 0.45

Tested by 2

test_ipMethod · 0.36
test_pathMethod · 0.36