This is probably in the wrong section but I'm going to bite anyways since it hasn't been moved. 

This python code should get you want you want to know. I'm not sure what operating system it's been tested on so you might have to tweak it.

http://osdir.com/ml/python.tutor/2002-06/msg00473.html

Linux and OSX will use resolv.conf

Windows will store it's in the registry.

Finding out how host names are resolved
I gave the site admin role permission to administer blocks, but the problem is in admin/structure/block page, there is a tab that shows the admin theme name (Rubik).

he can click on Rubik but doesn't have permission to see the page.
what I want is to hide the tab.

other issue is in admin_menu module under structure > blocks there is a Rubik item too, which shouldn't be there too since the user doesn't have the permission to edit admin theme blocks.

So I'm wondering why does rubik block page link shows up!
