INNER CODE UNIT · Python

_load_interfaces

HaxL0p4/L0p4Map · ui/app.py:683

    def _load_interfaces(self):
        interfaces = get_network_interfaces()
        self.interfaces = interfaces

        self.iface_selector.blockSignals(True)
        self.iface_selector.clear()

        for iface in interfaces:
            self.iface_selector.addItem(f"{iface['name']} {iface['ip']}", userData=iface)

        self.iface_selector.blockSignals(False)

    def _on_iface_changed(self,index):
        iface = self.iface_selector.itemData(index)
        if not iface:
            return
        try:
            self.subnet_label.setText(get_local_subnet(iface["name"]))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…