From 8f67103e85b48facaa549ae3ea7001432f49d304 Mon Sep 17 00:00:00 2001 From: Kaushik Date: Wed, 29 Jun 2022 19:21:29 +0530 Subject: [PATCH] scapy changes --- .gitignore | 11 ++++++++++- network_monitor.py | 12 ++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 51c34ef..c4b5e55 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,13 @@ *.pyc *.pyo *.csv -*.pcap \ No newline at end of file +*.pcap + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ \ No newline at end of file diff --git a/network_monitor.py b/network_monitor.py index 31f7bda..37da5b8 100644 --- a/network_monitor.py +++ b/network_monitor.py @@ -170,20 +170,20 @@ class NetworkMonitor(QMainWindow): def savePacketsPCAP(self): path = QFileDialog.getSaveFileName(self, 'Save File', '', 'pcap(*.pcap)') - if path[0] is not '': + if path[0] != '': path = str(path[0]) wrpcap(path, self.worker.packetList) def savePacketsBLIP(self): path = QFileDialog.getSaveFileName(self, 'Save File', '', 'pcap(*.pcap)') - if path[0] is not '': + if path[0] != '': path = str(path[0]) wrpcap(path, self.worker.blackListAccess) self.worker.blackListAccess = [] def savePacketsCSV(self): path = QFileDialog.getSaveFileName(self, 'Save File', '', 'CSV(*.csv)') - if path[0] is not '': + if path[0] != '': with open(path[0], 'w') as stream: writer = csv.writer(stream, lineterminator='\n') for row in range(self.tableWidget.rowCount()): @@ -201,8 +201,8 @@ class InterfacePick(QDialog): def __init__(self, parent=None): super().__init__() self.setWindowTitle('Choose Interface to Monitor') - self.width = 400 - self.height = 400 + self.width = 600 + self.height = 600 self.setMinimumSize(self.width, self.height) @@ -222,7 +222,7 @@ class InterfacePick(QDialog): for iface_name in sorted(ifaces.keys()): dev = ifaces[iface_name] mac = dev.mac - if iface_name != LOOPBACK_NAME: + if iface_name != conf.loopback_name: mac = conf.manufdb._resolve_MAC(mac) if str(dev.ip) != "None" and not str(dev.name).startswith("VM"):