def __init__(self, diag_input, reassemble_sibs, decrypt_nas, include_ip_traffic): wireshark = ( which('C:\Program Files\Wireshark\Wireshark.exe') or which('C:\Program Files (x86)\Wireshark\Wireshark.exe') or which('wireshark') or which('wireshark-gtk') ) if not wireshark: raise Exception('Could not find Wireshark in $PATH') if not IS_UNIX: self.detach_process = None wireshark_pipe = Popen([wireshark, '-k', '-i', '-'], stdin = PIPE, stdout = DEVNULL, stderr = STDOUT, preexec_fn = self.detach_process, bufsize = 0 ).stdin wireshark_pipe.appending_to_file = False super().__init__(diag_input, wireshark_pipe, reassemble_sibs, decrypt_nas, include_ip_traffic)