Expand description
Exposes the public network module.
Network-interface selection, ARP packet exchange, and scan timing.
StructsΒ§
- Network
Iterator - A network iterator for iterating over multiple network ranges in with a
low-memory approach. This iterator was crafted to allow iteration over huge
network ranges (192.168.0.0/16) without consuming excessive memory.
Describes the public
NetworkIteratortype. - Response
Summary - Gives high-level details about the scan response. This may include Ethernet
details (packet count, size, β¦) and other technical network aspects.
Describes the public
ResponseSummarytype. - Scan
Estimation - Contains scan estimation records. This will be computed before the scan
starts and should give insights about the scan.
Describes the public
ScanEstimationtype. - Target
Details - A target detail represents a single host on the local network with an IPv4
address and a linked MAC address. Hostnames are optional since some hosts
does not respond to the resolve call (or the numeric mode may be enabled).
Describes the public
TargetDetailstype.
ConstantsΒ§
- ARP_
PACKET_ πSIZE - DATALINK_
RCV_ TIMEOUT - Maximum receive wait between checks of the shared timeout flag, in ms.
- ETHERNET_
STD_ πPACKET_ SIZE - ETHERNET_
VLAN_ πPACKET_ SIZE - VLAN_
PACKET_ πSIZE - VLAN_
QOS_ πDEFAULT
FunctionsΒ§
- compute_
network_ configuration - Compute a network configuration based on the scan options and available
interfaces. This configuration will be used in the scan process to target a
specific network on a network interfaces.
Performs the public
compute_network_configurationoperation. - compute_
scan_ estimation - Based on the network size and given scan options, this function performs an
estimation of the scan impact (timing, bandwidth, β¦). Keep in mind that
this is only an estimation, real results may vary based on the network.
Performs the public
compute_scan_estimationoperation. - find_
hostname π - Find the local hostname linked to an IPv4 address. This will perform a reverse DNS request in the local network to find the IPv4 hostname.
- find_
interface_ πby_ index - find_
interface_ πby_ name - find_
source_ ip - Find the most adequate IPv4 address on a given network interface for sending
ARP requests. If the βforced_source_ipv4β parameter is set, it will take
the priority over the network interface address.
Performs the public
find_source_ipoperation. - receive_
arp_ responses - Wait at least N seconds and receive ARP network responses. The main
downside of this function is the blocking nature of the datalink receiver:
when the N seconds are elapsed, the receiver loop will therefore only stop
on the next received frame. Therefore, the receiver should have been
configured to stop at certain intervals (500ms for example).
Performs the public
receive_arp_responsesoperation. - send_
arp_ request - Send a single ARP request - using a datalink-layer sender, a given network
interface and a target IPv4 address. The ARP request will be broadcasted to
the whole local network with the first valid IPv4 address on the interface.
Performs the public
send_arp_requestoperation.