MCPcopy Create free account
hub / github.com/secdev/scapy / resolve

Method resolve

scapy/fields.py:876–886  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

874 return cast(str, x)
875
876 def resolve(self, x):
877 # type: (str) -> str
878 if self in conf.resolve:
879 try:
880 ret = socket.gethostbyaddr(x)[0]
881 except Exception:
882 pass
883 else:
884 if ret:
885 return ret
886 return x
887
888 def i2m(self, pkt, x):
889 # type: (Optional[Packet], Optional[Union[str, Net]]) -> bytes

Callers 2

i2reprMethod · 0.95
_probe_xdg_folderFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected