Created
June 6, 2026 16:34
-
-
Save cfultz/a0af4fa32ee087407a63b0c7c607ba09 to your computer and use it in GitHub Desktop.
A RPi finding nmap script for /usr/bin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Target subnet to scan. Defaults to 192.168.0.0/24 if no argument is provided because this is the local area I use. | |
| TARGET=${1:-192.168.0.0/24} | |
| # Run the nmap scan, parse the output, and filter for known Raspberry Pi MAC addresses | |
| sudo nmap -n -sP "$TARGET" | awk '/Nmap scan report/{printf "%s ", $5; getline; getline; print $3;}' | grep -E -i "(B8:27:EB|DC:A6:32|E4:5F:01|28:CD:C1|D8:3A:DD|2C:CF:67|3A:35:41|88:A2:9E|98:FE:54)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment