gaenserich / hostsblock

an ad- and malware-blocking script for Linux
https://github.com/gaenserich/hostsblock
225 stars 28 forks source link

database format and _check_url #43

Closed Lompik closed 9 years ago

Lompik commented 9 years ago

I am just trying to understand the format for the file /var/lib/hostsblock.db. It seems to me it is something like "%IP %address ! %source" However

gaenserich commented 9 years ago

1 Thanks for catching that error. It is fixed in d4ebbf4.

2 I assigned the "!" as a special marker arbitrarily. It's intended to be there, but I'm perfectly fine changing that if it becomes a hinderance.

Lompik commented 9 years ago

Is the maker "!" or "!" ?? The fix d4ebbf43bc86106c9fcba3020f0e6adbef1436f5 won't cut it for the first case. (There is no need to escape "!" in calls to grep and sed). Right now my database uses two delimiter: "!" and "!". Can this be due to a version mistmatch ? I have the version 0.999.2-1 installed.

PS: github seems to merge "\ !" without space.