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

Method __init__

examples/sniff.py:41–52  ·  view source on GitHub ↗
(self, pcapObj)

Source from the content-addressed store, hash-verified

39
40class DecoderThread(Thread):
41 def __init__(self, pcapObj):
42 # Query the type of the link and instantiate a decoder accordingly.
43 datalink = pcapObj.datalink()
44 if pcapy.DLT_EN10MB == datalink:
45 self.decoder = EthDecoder()
46 elif pcapy.DLT_LINUX_SLL == datalink:
47 self.decoder = LinuxSLLDecoder()
48 else:
49 raise Exception("Datalink type not supported: " % datalink)
50
51 self.pcap = pcapObj
52 Thread.__init__(self)
53
54 def run(self):
55 # Sniff ad infinitum.

Callers

nothing calls this directly

Calls 2

EthDecoderClass · 0.90
LinuxSLLDecoderClass · 0.90

Tested by

no test coverage detected