Jump to content

Adblock site blocking


englishmen

Recommended Posts

I wanted to make a block list of bad sites i could use in the firefox extension adblock. I was going to use the sites from my hostilfe but the are thousands of entries. Does anyone know how i can select specific text in a .txt document without selecting the entries line.

Link to comment
Share on other sites

  • Moderators

If I'm understanding correctly you wish to convert your HOSTS file into a Mozilla/Mozilla Firefox block list.

 

This is what I do:

1. Open three text editor Windows, e.g.; open Notepad three times.

2. Open the HOSTS file in one Notepad window.

3. Copy all the HOSTS file entries and paste them into the second Notepad window.

4. Copy all the HOSTS file entries and paste them into the third Notepad window.

5. Close the HOSTS window, leaving the other two Notepad windows open

-------------

Changing the format string to work with Mozilla/Mozilla Firefox

 

Converting the HOSTS format into the blocked Mozilla/Mozilla Firefox cookies format:

1. Open your userprofile\Application Data folder that contains the Mozilla Firefox folder. Find this file: hostperm.1

2. Open hostperm.1 with Notepad.

3. Highlight the HOSTS format string in one of the two open Notepad windows which is either 127.0.0.1 or 0.0.0.0

and replace all using the file menu tool Edit>Replace>Replace All it with this:

host	cookie	2	

 

leave this Notepad window open.

4. Go to the other Notepad window and highlight the HOSTS format string in one of the two open Notepad windows which is either 127.0.0.1 or 0.0.0.0 and replace all using the file menu tool Edit>Replace>Replace All it with this:

host	image	2	

 

5. Copy one of the Notepad window contents into the other Notepad window to combine all the entries. Now copy those entries into the Mozilla/Mozilla Firefox hostperm.1 file and save the file.

6. Open and then close Mozilla Firefox so that it can automatically sort the list.

7. You may want to confirm the settings by looking at the block site/cookie list in Mozilla Firefox. Remember to backup the hostperm.1 file!

 

Example:

mozsui_mozff_hostsfile_security_settings.png

Link to comment
Share on other sites

Andavari i actually wanted to put the sites listed in the hostile in to the adblock extension so i could then block access to the sites. Adblock also tells you when one of the sites listed is being blocked. I will however try your way and say how it works, thanks.

Link to comment
Share on other sites

  • Moderators

I will however try your way and say how it works, thanks.

 

That's the only way I know of to make blocked site's compatibly with multiple programs since I input them into CookieCop, Mozilla Suite, and the HOSTS file and wouldn't you know it they all have a different format of how sites are entered. It would be nice if all web browsers could at least read the HOSTS file to import it's blocked list to take out all the manual copying and pasting which takes for ever when there's thousands of entries. At least you're not trying to do it with Internet Explorer, hence you'd be copying each site into the Restricted Cookies/Sites one by one for several days/weeks/months.

Link to comment
Share on other sites

Check out the screen shot below, Adblock Filterset.G allows you to add filters that are not removed/replaced every time the adblock filter is automatically update. So i wanted to add a load of bad sites to that list to stop me from going on them and there for help keep my pc safer.

 

http://files.to/get.php?cid=2af3e572923b3f88e235e5e05d2f8305

 

It is only possible however to import filters with just the sites listed i.e.

 

 

www.mysite.com

 

 

there for i have to get rid of all the 127.0.0.1 at the beginning of all the sites listed in the host file in order to get it working.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.