Link to this headingmDNS (multicast DNS)

DNS on the local network using multicast

Runs on udp port 5353

Link to this headingDNS-SD (DNS Service Discovery)

dns-sd -B _http._tcp dns-sd -Z _http._tcp dns-sd -G v4v6 test.local dns-sd -B _print._udp

Link to this headingPython Scanner

>>> cat ~/programing/mdns_scanner.py from zeroconf import Zeroconf, ServiceBrowser, ServiceListener import threading import time discovered_types = set() class ServiceInstanceListener(ServiceListener): def add_service(self, zeroconf, type, name): info = zeroconf.get_service_info(type, name) if info: print(f"[+] Instance Found: {name}") print(f" 🔹 Server: {info.server}") print(f" 🔹 Port: {info.port}") print(f" 🔹 Addresses: {info.parsed_addresses()}") print(f" 🔹 Weight: {info.weight}") print(f" 🔹 Priority: {info.priority}") print(f" 🔹 Properties:") for key, value in info.properties.items(): try: print(f" - {key.decode('utf-8')}: {value.decode('utf-8')}") except: print(f" - {key}: {value}") else: print(f" [!] No info available for {name}") def update_service(self, zeroconf, type, name): # Optional: print updates if you want print(f"[~] Service updated: {name}") def remove_service(self, zeroconf, type, name): print(f"[-] Service removed: {name}") class TypeDiscoveryListener(ServiceListener): def add_service(self, zeroconf, type, name): # Only handle new types if name.endswith(".local.") and name not in discovered_types: discovered_types.add(name) print(f"[🔎] Discovered Service Type: {name}") # Start browser for each service type ServiceBrowser(zeroconf, name, ServiceInstanceListener()) def main(): zeroconf = Zeroconf() print("[*] Scanning for mDNS services on your local network...") ServiceBrowser(zeroconf, "_services._dns-sd._udp.local.", TypeDiscoveryListener()) try: while True: time.sleep(0.5) except KeyboardInterrupt: print("[!] Stopping scan.") zeroconf.close() if __name__ == "__main__": main()