Giter VIP home page Giter VIP logo

zerohosts's Introduction

zerohosts

Simple script that fetches and updates your hosts file with zerohost data. It fetches the hosts file from http://someonewhocares.org/hosts/zero/

The fetched hosts file is not modified or easily modifyable in any way as of now. If you modify the result it will be overwritten on update.

The script inserts a BEGIN marker and an END marker. This way updates (re-running the script) will not append the remote file twice - if old data is found it will be removed (using the markers) before the new data is appended.

The script will ask for sudo privileges in order to perform the modifications of /etc/hosts. /etc/hosts will be backed up to /tmp/ in case of total disaster and other problems.

This script is distributed under the beerware license. Yay! ๐Ÿจ

Changes vs. original one

  1. changed from bash to sh
  2. removed sudo & tee dependency
  3. added option to specify non-default hosts location
  4. run through shellcheck & fixed warnings
  5. creating backups before every change
  6. united indentation & minor refactoring

zerohosts's People

Contributors

epleterte avatar karoltx avatar

Watchers

James Cloos avatar

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.