Skip to content

Finding services advertised with Bonjour via Flame

Have you ever had an issue with someone sharing an iTunes library, and you want to quickly track down the IP of the offending user?

Here is a quick little guide on getting that done.

dns-sd is a service discovery application that can make tracking down users sharing various information quite easily. It also has a great API for accessing various information about local DNS information, and setting local DNS advertising quite easily.

First, an example:

With these commands, it gives you the hostname, which you can always resolve by pinging it. This is a slightly edited output for readability. (spaces and newlines are escaped in the shell, but you see all the slashes)

How is this better than other solutions like Flame or Bonjour Browser?
Well, with this approach, we can actually script the entire event into one bash script, without too much work.
A minute of checking the man pages for sed and cut yields:

…and by a minute, I meant more like an hour. I commented most of the material, and the source can also be found at https://gist.github.com/ConstantineK/d2179abf2f31c041c1e1.

A lot more went into this than initially expected, but that is always the case when it comes to bash.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *