How to detect an iPhone connecting a network?
- by JayCrossler
I've noticed through watching Wireshark that when an iPhone connects to a wifi network, it sends out a few IGMP/MDNS packets to 224.0.0.251 (LAN broadcast, I think). Is there any easy way to watch for these packets and then either run a script or send an event?
Or, is the best way to just run a packet sniffer? Any simple ones that can send events or execute curl commands when a filter is triggered?
When I run nc -u -l 5353
I get:
My-Name-iPhonelocal???
x???)??
??cc^C
Can I do something like:
nc -u -l 5353 | grep iPhonelocal | execute command...