dissect.target.plugins.os.default.network¶
Module Contents¶
Classes¶
Generic implementation for network interfaces plugin. |
Attributes¶
- dissect.target.plugins.os.default.network.InterfaceRecord¶
- class dissect.target.plugins.os.default.network.NetworkPlugin(target: dissect.target.target.Target)¶
Bases:
dissect.target.plugin.PluginGeneric implementation for network interfaces plugin.
- __namespace__ = 'network'¶
Defines the plugin namespace.
- check_compatible() None¶
Perform a compatibility check with the target.
This function should return
Noneif the plugin is compatible with the current target (self.target). For example, check if a certain file exists. Otherwise it should raise anUnsupportedPluginError.- Raises:
UnsupportedPluginError – If the plugin could not be loaded.
- interfaces(*args, **kwargs) collections.abc.Iterator[InterfaceRecord]¶
Yield interfaces.
- ips() list[flow.record.fieldtypes.net.IPAddress]¶
Return IP addresses as list of
IPAddress.
- gateways() list[flow.record.fieldtypes.net.IPAddress]¶
Return gateways as list of
IPAddress.
- macs() list[str]¶
Return MAC addresses as list of
str.
- dns() list[str | flow.record.fieldtypes.net.IPAddress]¶
Return DNS addresses as list of
str.
- with_ip(ip_addr: str) collections.abc.Iterator[InterfaceRecord]¶
Yield all interfaces with the given IP address.
- with_mac(mac: str) collections.abc.Iterator[InterfaceRecord]¶
Yield all interfaces with the given full or partial MAC address.
- in_cidr(cidr: str) collections.abc.Iterator[InterfaceRecord]¶
Yield all interfaces with IP addresses in the given CIDR range.