How to use the pyshark.InMemCapture function in pyshark

To help you get started, we’ve selected a few pyshark examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AntiSomnus / sniffer / main.py View on Github external
def TsharkInfo(self):
        """If pyshark is installed, displaying info on mouse event.

        """

        if (flag_pyshark):
            capture = pyshark.InMemCapture(only_summaries=True)
            l = []

            for i in share.list_packet:
                l.append(bytes(i.packet))
            capture.feed_packets(l)
            share.list_TsharkInfo = []
            for i in capture:
                share.list_TsharkInfo.append(i.info)