Giter Club home page Giter Club logo

pdnsf-hosts-collection's People

Contributors

badmojr avatar j-moriarti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pdnsf-hosts-collection's Issues

Hosts file clean up

Hi there!

I was looking at your hosts file and the link below contains a list with all non valid or non existing entries.
Hope you enjoy this.

If you want to block domains as like as this one:
автодиагностика.рф
you need to convert this to punycode or it will be not blocked. (punycoder.com)
автодиагностика.рф = xn--80aaagge2acs2agf3bgi.xn--p1ai

Here is the list of removeable entries within your hosts file. All IP addresses are excluded because they are ignored anyway within a hosts file:

https://pastebin.com/raw/VHtQvMm7

Greetings!

Avoid repetition... use functions

Hello!
I believe you can reduce the code size if repetitions were avoided.
eg:

cURL() { curl -L -R -s --compressed --connect-timeout 10 --retry 5 --retry-connrefused --retry-delay 5 -A 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36' "$@"; }

You can also save time used for downloads if parallel is used with cURL.
e.g:

URLs=(
badmojr_1hosts_xtra_domains.txt.raw,https://badmojr.github.io/1Hosts/Xtra/domains.txt
shadowwhisperer_malware.txt.raw,https://raw.githubusercontent.com/ShadowWhisperer/BlockLists/master/Lists/Malware
)

export -f cURL
parallel -j2 --colsep "," cURL -o '{1}' '{2}' :::: <<< $(printf "%s\n" ${URLs[@]})

Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.