Skip to content

Instantly share code, notes, and snippets.

@drath
drath / gist:07bdeef0259bd68747a82ff80a5e350c
Created January 13, 2019 07:36
hosts file updater for pihole
#!/usr/bin/env python3.6
'''
Pihole is great, but the admin interface only displays device details
by IP address which can be confusing. This script changes the display
from IP address to a more recognizable hostname. And as a bonus, attaches
the profile (from fingerbank.org) of the device to the hostname as well -
so instead of something like 192.168.1.101, you see galaxys6-samsung.
Shweet.
Usage notes