MCPcopy
hub / github.com/evilsocket/opensnitch / _unmonitor_node_netstat

Method _unmonitor_node_netstat

ui/opensnitch/dialogs/stats.py:2959–2981  ·  view source on GitHub ↗
(self, node_addr)

Source from the content-addressed store, hash-verified

2957 self.LAST_NETSTAT_NODE = node_addr
2958
2959 def _unmonitor_node_netstat(self, node_addr):
2960 self.netstatLabel.hide()
2961 self.netstatLabel.setText("")
2962 if node_addr == "":
2963 print("unmonitor_netstat_node: no nodes")
2964 return
2965
2966 if not self._nodes.is_connected(node_addr):
2967 print("unmonitor_node_netstat, node not connected:", node_addr)
2968 else:
2969 noti = ui_pb2.Notification(
2970 clientName="",
2971 serverName="",
2972 type=ui_pb2.TASK_STOP,
2973 data='{"name": "sockets-monitor", "data": {}}',
2974 rules=[])
2975 nid = self._nodes.send_notification(
2976 node_addr, noti, self._notification_callback
2977 )
2978 if nid != None:
2979 self._notifications_sent[nid] = noti
2980
2981 self.LAST_NETSTAT_NODE = None
2982
2983 def _update_netstat_table(self, node_addr, data):
2984 netstat = json.loads(data)

Callers 4

_cb_tab_changedMethod · 0.95
_monitor_node_netstatMethod · 0.95

Calls 2

is_connectedMethod · 0.80
send_notificationMethod · 0.45

Tested by

no test coverage detected