def __init__(self, radio):
self.radio = radio
# start wireshark
spargs = dict(
args=['wireshark', '-k', '-i', '-'], # Read packets from stdin immediately
stdin=subprocess.PIPE,
stderr=open(os.devnull, 'w'),
)
if os.name == 'posix':
spargs['preexec_fn'] = os.setpgrp
elif os.name == 'nt':
spargs['creationflags'] = subprocess.CREATE_NEW_PROCESS_GROUP
self.wireshark_proc = subprocess.Popen(**spargs)
self.pd = killerbee.PcapDumper(killerbee.DLT_IEEE802_15_4, self.wireshark_proc.stdin,)
评论列表
文章目录