samedi 8 mars 2014

Check if hosts still resolve (/etc/hosts ad-blocking) topic




Hello all,

this is my first post, so please bear with me :cowboy:

I stumbled on BSDgeek_Jake 's great AD-Blocking hosts list, at http://forum.xda-developers.com/show....php?t=1916098
(thanx BSDgeek_Jake!)

However, I took the educated guess that many of the spam hosts included are no longer valid (spammers change their stuff a lot)
So, there should exist a way to thin down the hosts list, thus reducing the payload for the linux (ie android) machine.

To make a long story short, i've written a python script that you can feed your hosts file and checks each and every host to see if it still resolves.
It then returns a hosts_thinned file, containing only the hosts that resolved.
You can find the script here:
https://bitbucket.org/techprolet/checkhosts/src

As always, use it only if you know what you're doing, and always at your own risk.
The code is GPL'ed and you are welcome to join me at bitbuckets and improve it!

NOTE: I know I should publish this at > Android Development and Hacking > Android Software and Hacking General [Developers Only]
but it's my first post and the system wouldn't let me post there. (I guess if I spammed the forum with 10 dummy messages it would be all right)

Cheers,
Pavlos


__________________________________________________ ________________________________________-
http://www.techprolet.com/





Aucun commentaire:

Enregistrer un commentaire