This bash script is designed to continuously scan a local network using nmap
, extract MAC addresses from the scan results, and search for corresponding names in a text file. It provides a simple and effective way to monitor network activity and detect any unauthorized devices.
nmap
andbash
installed on the system- Text file (
list.txt
) containing MAC addresses and corresponding names
- Devices can manually set their MAC addresses, potentially leading to inaccuracies in identification.
- Example
list.txt
Format- Make sure that all capital letters
00:11:22:33:44:55 = Device1 AA:BB:CC:DD:EE:FF = Device2
- Manually put your target IP range in the script:
# Run the nmap command and store the output in a variable # change your target here nmap_output=$(sudo nmap -sn YOUR_TARGET_IP_RANGE)
- Make the script executable:
chmod +x mac_address_finder.sh
- Execute the script:
./mac_address_finder.sh
This script is provided as-is and should be used responsibly and in accordance with local laws and regulations. The author is not responsible for any misuse or unauthorized access to networks.