dissect.target.plugins.general.network
¶
Module Contents¶
Classes¶
Generic implementation for network interfaces plugin. |
Attributes¶
- dissect.target.plugins.general.network.InterfaceRecord¶
- class dissect.target.plugins.general.network.NetworkPlugin(target: dissect.target.target.Target)¶
Bases:
dissect.target.plugin.Plugin
Generic 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
None
if 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() 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) Iterator[InterfaceRecord] ¶
- with_mac(mac: str) Iterator[InterfaceRecord] ¶
- in_cidr(cidr: str) Iterator[InterfaceRecord] ¶
- calculate_network(ips: int | flow.record.fieldtypes.net.ipv4.Address, subnets: int | flow.record.fieldtypes.net.ipv4.Address) Iterator[str] ¶