A Python-based tool to scan and discover network devices on your local network. The script dynamically detects available network adapters, allows you to choose the correct one, and performs a fast ARP-based scan to find active devices, their hostnames, MAC addresses, and manufacturers.
- Dynamic Network Adapter Detection: Lists all available network adapters and their IP addresses for selection.
- Concurrent Scanning: Uses multithreading for fast network scanning.
- Tabular Output: Displays discovered devices in a clean table format.
- Hostname Resolution: Attempts to resolve the hostname of discovered devices.
- MAC Address and Manufacturer Lookup: Retrieves the MAC address and vendor/manufacturer details of each device.
- Python: Version 3.8 or higher
- Npcap: Required for low-level network operations (download and install from Npcap).
- Python Libraries:
scapy
tabulate
psutil
mac-vendor-lookup
-
Clone the repository:
git clone https://github.com/your-username/network-device-scanner.git cd network-device-scanner
-
Install Npcap:
- Download and install Npcap from Npcap Official Website.
-
Install the required Python dependencies:
pip install -r requirements.txt
-
Run the script:
python network_scanner.py
-
Select a network adapter from the list:
Available Network Adapters: [0] Ethernet (192.168.1.100) [1] Wi-Fi (192.168.0.101) [2] VPN (10.0.0.1) Select the network adapter to use (number):
-
Wait for the scan to complete. The results will be displayed in a table format:
+----------------+-------------------+-----------------+------------------------+ | IP Address | MAC Address | Device Name | Manufacturer | +================+===================+=================+========================+ | 192.168.0.1 | 00:11:22:33:44:55 | router.home | Cisco Systems | | 192.168.0.102 | 66:77:88:99:AA:BB | laptop.local | Dell Inc. | | 192.168.0.103 | CC:DD:EE:FF:00:11 | phone.local | Samsung Electronics | +----------------+-------------------+-----------------+------------------------+
Available Network Adapters:
[0] Ethernet (192.168.1.100)
[1] Wi-Fi (192.168.0.101)
[2] VPN (10.0.0.1)
Select the network adapter to use (number): 1
Scanning network: 192.168.0.0/24
+----------------+-------------------+-----------------+------------------------+
| IP Address | MAC Address | Device Name | Manufacturer |
+================+===================+=================+========================+
| 192.168.0.1 | 00:11:22:33:44:55 | router.home | Cisco Systems |
| 192.168.0.102 | 66:77:88:99:AA:BB | laptop.local | Dell Inc. |
| 192.168.0.103 | CC:DD:EE:FF:00:11 | phone.local | Samsung Electronics |
+----------------+-------------------+-----------------+------------------------+
Contributions are welcome! Feel free to open issues or submit pull requests for enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.
This tool is intended for use on your own network. Scanning networks without permission is illegal and unethical. Use responsibly.