Module: tools/device_scanner

tools.device_scanner.create_report(output_format)

Generates a report of the scan results in the specified format.

Parameters:

output_format (str) – The format of the report. Can be “html”, “csv”, or “json”.

Returns:

None

tools.device_scanner.scan()

Scans all IP addresses in the network for open ports.

Returns:

A dictionary containing the scan results. The keys are the IP addresses, and the values are lists of open ports.

Return type:

dict

tools.device_scanner.test_port(port)

Tests if a port is open or closed for a given IP address.

This function is called by each thread to ping all ports in the port_to_test list.

Parameters:

port (int) – The port to test.