A small command line tool for adding/removing the supertrick to an existing hosts file.
Command line:
hoststool add example.txt
This will parse the entries in the file example.txt and add them to the hosts file. But only those that are not yet present in the hosts file.
It should mark the added entries like this:
If there already is such a block of entries present in the hosts files then it should either insert new entries inside that block, or create a second block. Programmers decision.Quote:
(existing entries)
# BEGIN of Kazaa Lite K++ Supertrick
(added entries go here)
# END of Kazaa Lite K++ Supertrick
hoststool remove
This will remove the whole block (or blocks) that where created as shown above.
Before it does this it should prompt (preferably with a GUI) to ask if the supertrick should really be removed or not. When an extra parameter is used (/s) then it should skip the prompt.
hoststool removeall
This will empty the whole hosts file and only add one line:
127.0.0.1 localhost