Skip to content

Instantly share code, notes, and snippets.

@dhcgn
Created January 12, 2026 18:55
Show Gist options
  • Select an option

  • Save dhcgn/d698ac4eede4a4dfece842d1177bb831 to your computer and use it in GitHub Desktop.

Select an option

Save dhcgn/d698ac4eede4a4dfece842d1177bb831 to your computer and use it in GitHub Desktop.
find all shelly devices in network and return result as json

Find All Shellies

find all shelly devices in network and return result as json

nmap -T5 --min-parallelism 100 -p 80 --open 192.168.3.20-255 -oG - | grep -i "shelly" | grep "Status: Up" | awk 'BEGIN {print "["} {gsub(/[()]/, "", $3); printf "%s{\"ip\": \"%s\", \"name\": \"%s\"}", separator, $2, $3; separator=","} END {print "]"}' | jq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment