in_signature='', out_signature='')
def Start(self, filename=None):
# FIXME: Prevent double Start()
- device = self.device
if filename is None: # Then we do *not* want to read from a PCap file but rather a monitor device
self.setup_monitor(device)
+ device = self.device
+ else: # We have given a filename, so let's make PCap read from the file
+ device = filename
self.is_running = True
try:
self.cap = pcap.pcap(device)
return self.status
- def tear_down_monitor(device='mon0'):
+ def tear_down_monitor(self, device='mon0'):
cmd = '/sbin/ifconfig mon0 down'.split()
subprocess.call(cmd)
cmd = '/usr/sbin/iw dev mon0 del'.split()