MCPcopy
hub / github.com/fortra/impacket / ICMPDecoder

Class ICMPDecoder

impacket/ImpactDecoder.py:337–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335 return i
336
337class ICMPDecoder(Decoder):
338 def __init__(self):
339 pass
340
341 def decode(self, aBuffer):
342 ic = ImpactPacket.ICMP(aBuffer)
343 self.set_decoded_protocol( ic )
344 off = ic.get_header_size()
345 if ic.get_icmp_type() == ImpactPacket.ICMP.ICMP_UNREACH:
346 self.ip_decoder = IPDecoderForICMP()
347 packet = self.ip_decoder.decode(aBuffer[off:])
348 else:
349 self.data_decoder = DataDecoder()
350 packet = self.data_decoder.decode(aBuffer[off:])
351 ic.contains(packet)
352 return ic
353
354class DataDecoder(Decoder):
355 def decode(self, aBuffer):

Callers 1

decodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…