Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkFieseln authored Feb 17, 2024
1 parent 14c214c commit 7c881aa
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 4 deletions.
33 changes: 31 additions & 2 deletions IPRadar2/Ui_mainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1325, 542)
MainWindow.resize(1325, 540)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand Down Expand Up @@ -174,7 +174,7 @@ def setupUi(self, MainWindow):
self.statusKilledNodes.setGeometry(QtCore.QRect(75, 35, 30, 20))
self.statusKilledNodes.setObjectName("statusKilledNodes")
self.listWidgetKilledProcesses = QtWidgets.QListWidget(self.centralWidget)
self.listWidgetKilledProcesses.setGeometry(QtCore.QRect(338, 23, 161, 241))
self.listWidgetKilledProcesses.setGeometry(QtCore.QRect(338, 23, 161, 161))
self.listWidgetKilledProcesses.setObjectName("listWidgetKilledProcesses")
self.label = QtWidgets.QLabel(self.centralWidget)
self.label.setGeometry(QtCore.QRect(339, 3, 91, 16))
Expand Down Expand Up @@ -377,6 +377,27 @@ def setupUi(self, MainWindow):
self.label_6 = QtWidgets.QLabel(self.centralWidget)
self.label_6.setGeometry(QtCore.QRect(10, 492, 141, 16))
self.label_6.setObjectName("label_6")
self.groupBox_5 = QtWidgets.QGroupBox(self.centralWidget)
self.groupBox_5.setGeometry(QtCore.QRect(341, 190, 156, 81))
self.groupBox_5.setObjectName("groupBox_5")
self.statusProcessedPackets = QtWidgets.QLabel(self.groupBox_5)
self.statusProcessedPackets.setGeometry(QtCore.QRect(75, 38, 81, 20))
self.statusProcessedPackets.setObjectName("statusProcessedPackets")
self.labelRXBytes_2 = QtWidgets.QLabel(self.groupBox_5)
self.labelRXBytes_2.setGeometry(QtCore.QRect(10, 40, 64, 16))
self.labelRXBytes_2.setObjectName("labelRXBytes_2")
self.labelTXBytes_2 = QtWidgets.QLabel(self.groupBox_5)
self.labelTXBytes_2.setGeometry(QtCore.QRect(10, 19, 41, 16))
self.labelTXBytes_2.setObjectName("labelTXBytes_2")
self.statusInPackets = QtWidgets.QLabel(self.groupBox_5)
self.statusInPackets.setGeometry(QtCore.QRect(75, 17, 81, 20))
self.statusInPackets.setObjectName("statusInPackets")
self.labelRXTXBytes_2 = QtWidgets.QLabel(self.groupBox_5)
self.labelRXTXBytes_2.setGeometry(QtCore.QRect(10, 61, 51, 16))
self.labelRXTXBytes_2.setObjectName("labelRXTXBytes_2")
self.statusQueuedPackets = QtWidgets.QLabel(self.groupBox_5)
self.statusQueuedPackets.setGeometry(QtCore.QRect(75, 59, 81, 20))
self.statusQueuedPackets.setObjectName("statusQueuedPackets")
self.groupBox_7.raise_()
self.pbLiveCapture.raise_()
self.groupBoxShowGeneral.raise_()
Expand Down Expand Up @@ -421,6 +442,7 @@ def setupUi(self, MainWindow):
self.pbTraceroute.raise_()
self.groupBoxPing.raise_()
self.label_6.raise_()
self.groupBox_5.raise_()
MainWindow.setCentralWidget(self.centralWidget)

self.retranslateUi(MainWindow)
Expand Down Expand Up @@ -519,6 +541,13 @@ def retranslateUi(self, MainWindow):
self.pbNetstat.setText(_translate("MainWindow", "netstat"))
self.pbTraceroute.setText(_translate("MainWindow", "traceroute"))
self.label_6.setText(_translate("MainWindow", "Show owners"))
self.groupBox_5.setTitle(_translate("MainWindow", "Packets"))
self.statusProcessedPackets.setText(_translate("MainWindow", "0"))
self.labelRXBytes_2.setText(_translate("MainWindow", "Processed:"))
self.labelTXBytes_2.setText(_translate("MainWindow", "In:"))
self.statusInPackets.setText(_translate("MainWindow", "0"))
self.labelRXTXBytes_2.setText(_translate("MainWindow", "Queued:"))
self.statusQueuedPackets.setText(_translate("MainWindow", "0"))

############################################################
# IMPORTANT:
Expand Down
8 changes: 8 additions & 0 deletions IPRadar2/mainAppWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,14 @@ def updateGui(self):
self.statusRxBytes.setText(str(rxKiloBytes))
self.statusRxTxBytes.setText(str(rxKiloBytes + txKiloBytes))

# statistics of packets (input, processed, queued)
in_packets = self.sniffer.getNumberOfInPackets()
processed_packets = self.sniffer.getNumberOfProcessedPackets()
self.statusInPackets.setText(str(in_packets))
self.statusProcessedPackets.setText(str(processed_packets))
# self.statusQueuedPackets.setText(str(self.sniffer.getNumberOfQueuedPackets()))
self.statusQueuedPackets.setText(str(in_packets - processed_packets))

def threadCreateReportFile(self):
while True:
if self.create_report_file:
Expand Down
96 changes: 94 additions & 2 deletions IPRadar2/mainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1325</width>
<height>542</height>
<height>540</height>
</rect>
</property>
<property name="sizePolicy">
Expand Down Expand Up @@ -652,7 +652,7 @@
<x>338</x>
<y>23</y>
<width>161</width>
<height>241</height>
<height>161</height>
</rect>
</property>
</widget>
Expand Down Expand Up @@ -1448,6 +1448,97 @@
<string>Show owners</string>
</property>
</widget>
<widget class="QGroupBox" name="groupBox_5">
<property name="geometry">
<rect>
<x>341</x>
<y>190</y>
<width>156</width>
<height>81</height>
</rect>
</property>
<property name="title">
<string>Packets</string>
</property>
<widget class="QLabel" name="statusProcessedPackets">
<property name="geometry">
<rect>
<x>75</x>
<y>38</y>
<width>81</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
<widget class="QLabel" name="labelRXBytes_2">
<property name="geometry">
<rect>
<x>10</x>
<y>40</y>
<width>64</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Processed:</string>
</property>
</widget>
<widget class="QLabel" name="labelTXBytes_2">
<property name="geometry">
<rect>
<x>10</x>
<y>19</y>
<width>41</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>In:</string>
</property>
</widget>
<widget class="QLabel" name="statusInPackets">
<property name="geometry">
<rect>
<x>75</x>
<y>17</y>
<width>81</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
<widget class="QLabel" name="labelRXTXBytes_2">
<property name="geometry">
<rect>
<x>10</x>
<y>61</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Queued:</string>
</property>
</widget>
<widget class="QLabel" name="statusQueuedPackets">
<property name="geometry">
<rect>
<x>75</x>
<y>59</y>
<width>81</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</widget>
<zorder>groupBox_7</zorder>
<zorder>pbLiveCapture</zorder>
<zorder>groupBoxShowGeneral</zorder>
Expand Down Expand Up @@ -1492,6 +1583,7 @@
<zorder>pbTraceroute</zorder>
<zorder>groupBoxPing</zorder>
<zorder>label_6</zorder>
<zorder>groupBox_5</zorder>
</widget>
</widget>
<customwidgets>
Expand Down

0 comments on commit 7c881aa

Please sign in to comment.