MCPcopy Create free account
hub / github.com/fortra/impacket / __init__

Method __init__

examples/split.py:72–83  ·  view source on GitHub ↗
(self, pcapObj)

Source from the content-addressed store, hash-verified

70
71class Decoder:
72 def __init__(self, pcapObj):
73 # Query the type of the link and instantiate a decoder accordingly.
74 datalink = pcapObj.datalink()
75 if pcapy.DLT_EN10MB == datalink:
76 self.decoder = EthDecoder()
77 elif pcapy.DLT_LINUX_SLL == datalink:
78 self.decoder = LinuxSLLDecoder()
79 else:
80 raise Exception("Datalink type not supported: " % datalink)
81
82 self.pcap = pcapObj
83 self.connections = {}
84
85 def start(self):
86 # Sniff ad infinitum.

Callers

nothing calls this directly

Calls 2

EthDecoderClass · 0.90
LinuxSLLDecoderClass · 0.90

Tested by

no test coverage detected