fixup: make pcap read from the file
[pwnitter] / pwnitter.py
index faca125..6b176f1 100755 (executable)
@@ -42,7 +42,10 @@ class Pwnitter(dbus.service.Object):
     def Start(self, filename=None):
         # FIXME: Prevent double Start()
         if filename is None: # Then we do *not* want to read from a PCap file but rather a monitor device
-            self.setup_monitor(self.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)