Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help to convert list #10

Closed
vaheed opened this issue Jun 13, 2020 · 2 comments
Closed

Help to convert list #10

vaheed opened this issue Jun 13, 2020 · 2 comments

Comments

@vaheed
Copy link

vaheed commented Jun 13, 2020

Hello and thanks for a good job :)

I try to create a blacklist for using in DNSmasq and your list is amazing

can you help how can convert this list with sed or anything to DNSmasq list

this is your list
.sample.com

this is a sample of DNSmasq list
address=/sample.com/0.0.0.0

@elico
Copy link

elico commented Jun 14, 2020

@vaheed with something like a bash script?

@maravento
Copy link
Owner

maravento commented Jun 28, 2020

Blackweb is designed exclusively for Squid-Cache and due to the large number of blocked domains it is not recommended to use it in other environments (DNSMasq, Pi-Hole, Hosts File, etc.), as it could slow down or block your system. Use it at your own risk

Open your linux terminal and run:

For DNSmasq:

sed -r "s:^\.(.*):address=\1/0.0.0.0:g" blackweb.txt > blackweb_dnsmasq.txt

For Hosts File:

sed -r "s:^\.(.*):127.0.0.1 \1:g" blackweb.txt > blackweb_hosts.txt

or

sed "s:^\.\(.*\):127.0.0.1 \1:g" blackweb.txt > blackweb_hosts.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants