Hostname propagation

Hey there.

To be honest, I fail a little to see what this could be. As long as I trust wget to just not execute the content it downloads and as log as I trust my router not to try execute the leases file even it it happens to be executable. The worst thing I imagined was some file format the dnsmasq would not understand.

But I'm all ears for a better way.

Would you consider using some grep expressions filtering all lines not matching my expected lease file format a sufficient counter measure?

Something like this:

* *  * * *  wget http://192.168.1.1/dhcp.leases -q -O- | awk '{ print $1 " " $2 " " $3 " " $4 }' | grep -i -e '^[0-9]\{10\} [0-9a-f]\{2\}\(:[0-9a-f]\{2\}\)\{5\} [0-9]\{1,3\}\(\.[0-9]\{1,3\}\)\{3\} [a-z0-9_-]\{1,32\}$' | awk '{ print $1 " " $2 " " $3 " " $4 " " $2}' > /tmp/dhcp.leases

This should, in my mind, only let those files pass that match "unixtimestamp macadress ipv4address hostname".

Regards,
Stephan.