The Network Device Discovery Script is a Python tool that allows you to discover devices on your local network using ARP requests.
To use the Network Device Discovery Script, follow these steps:
-
Make sure you have the
scapylibrary installed. You can install it using pip:pip install scapy -
Install
Npcapfrom https://npcap.com/#download and install it. -
Import the library in your Python script.
import network_discovery -
Use the
scanfunction to scan the devices in a ip range:import network_discovery if __name__ == "__main__": target_ip_range = "xxx.xxx.xxx.xxx/24" print("Scanning for devices on the network...") devices = network_discovery.scan(target_ip_range) if devices: print("Discovered devices:") for device in devices: print(f"IP: {device['ip']} | MAC: {device['mac']}") else: print("No devices found on the network.")
-
Modify the
target_ip_rangevariable with the desired IP range to scan. -
Run your Python script to perform the network device discovery:
python discover_devices.py -
The script will display the discovered devices' information, including their IP and MAC addresses.
Npcap: https://npcap.com/scapy: https://scapy.net/