{"id":20765790,"url":"https://github.com/hakerdefo/pmiab","last_synced_at":"2025-04-30T10:02:04.257Z","repository":{"id":31357585,"uuid":"34920434","full_name":"hakerdefo/pmiab","owner":"hakerdefo","description":"pmiab (Poor Man's Internet Ad Blocker) blocks ads system-wide.","archived":false,"fork":false,"pushed_at":"2021-11-11T18:02:25.000Z","size":23,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-01T15:01:31.252Z","etag":null,"topics":["adblocker","adblocking","bash","internet-advertisements","linux","script","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hakerdefo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-01T19:38:47.000Z","updated_at":"2022-03-18T21:32:47.000Z","dependencies_parsed_at":"2022-09-08T09:11:09.523Z","dependency_job_id":null,"html_url":"https://github.com/hakerdefo/pmiab","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakerdefo%2Fpmiab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakerdefo%2Fpmiab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakerdefo%2Fpmiab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakerdefo%2Fpmiab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hakerdefo","download_url":"https://codeload.github.com/hakerdefo/pmiab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225029370,"owners_count":17409695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adblocker","adblocking","bash","internet-advertisements","linux","script","shell"],"created_at":"2024-11-17T11:18:58.802Z","updated_at":"2024-11-17T11:18:59.486Z","avatar_url":"https://github.com/hakerdefo.png","language":"Shell","funding_links":["https://paypal.me/hakerdefo","https://www.buymeacoffee.com/hakerdefo","https://liberapay.com/hakerdefo/donate"],"categories":[],"sub_categories":[],"readme":"# pmiab\n\n**pmiab** (Poor Man's Internet Ad Blocker) is a simple bash script that blocks ads and other unwanted nasty stuff and makes surfing the ocean of Internet faster, better and safer experience. **pmiab** does this with the help of hosts file. Using hosts file to block ads has several distinct advantages over other ad-blocking methods.\n\n\n### Advantages :\n\n - No need to install and run any other applications.\n - Saves CPU, RAM and bandwidth.\n - Blocks IP calls on any port.\n - Faster web-page loading.\n - Enhances your privacy \u0026 security.\n - Hosts file can be edited in any text editor.\n - Works with any and every browser.\n\n\n### How does pmiab work?\n\n**pmiab** downloads ad-blocking hosts files from the following sources,\n\n1. [MPVS hosts file]\n2. [Dan Pollock's hosts file]\n3. [yoyo.org hosts file]\n4. [Badd Boyz hosts file]\n5. [Steven Black's hosts file]\n6. [ABUSE.ch hosts file]\n7. [AdAway hosts file]\n\nThen **pmiab** does some bash magic,\n\n - Creates a backup of original hosts file and sets it to read-only.\n - Removes MS-DOS carriage returns.\n - Removes all lines that don't begin with 127.0.0.1.\n - Removes any lines containing the word localhost.\n - Replaces 127.0.0.1 with 0.0.0.0.\n - Scrunches extraneous spaces into a single tab.\n - Removes any comments on lines.\n - Cleans leftover trailing blanks.\n - Removes duplicate entries.\n - Creates an ultimate ad-blocking hosts file.\n\n\n### Installation :\n\nInstallation is very simple. Download **[pmiab-master]** zip, extract its contents and copy the file **pmiab** to **/usr/local/bin/** directory,\n```sh\nsudo cp pmiab /usr/local/bin/\n```\nAnd make it executable,\n```sh\nsudo chmod 755 /usr/local/bin/pmiab\n```\n\n\n### Usage :\n\nSince **pmiab** deals with the hosts file it needs to be run with **sudo**. Open terminal \u0026 run,\n```sh\nsudo pmiab\n```\nOr if you prefer **su** over **sudo**,\n```sh\nsu -c pmiab\n```\nThen you can enable or disable advert blocking via a simple interactive menu of **pmiab**. To block the ads, select **Block Internet Adverts** option from the menu. Restart your browser if it is running, clean browser's cache and enjoy a smoother, safer and ad-free browsing. It is advised that you update the ad-blocking hosts file atleast once in a week. To update the ad-blocking hosts, you need to simply select **Block Internet Adverts** option from the menu.\n\n\n### Support :\n\nIf you like **pmiab**, please consider supporting it, even the smallest contribution goes a long way. It is quick \u0026 easy via PayPal, Buy Me a Coffee or Liberapay:  \n\n[![Support via PayPal](https://cdn.jsdelivr.net/gh/twolfson/paypal-github-button@1.0.0/dist/button.svg)](https://paypal.me/hakerdefo)  \n[![\"Buy Me A Coffee\"](https://user-images.githubusercontent.com/1376749/120938564-50c59780-c6e1-11eb-814f-22a0399623c5.png)](https://www.buymeacoffee.com/hakerdefo)  \n[![Support via Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/hakerdefo/donate)  \n\n\n### Credits :\n\n - _Steve Riley : This script originally was a brainchild of Steve. Incredibly this was the first bash script he wrote._\n - _Stuart Hanzlik : Stuarts articles on hosts file and its usage as ad blocker provided some valuable information._\n\n\n### License :\n\n[![Public Domain Mark](http://i.creativecommons.org/p/mark/1.0/88x31.png)](http://creativecommons.org/publicdomain/mark/1.0/)  \nThis work (\u003cspan property=\"dct:title\"\u003epmiab\u003c/span\u003e, by [\u003cspan property=\"dct:title\"\u003ehakerdefo\u003c/span\u003e](https://github.com/hakerdefo/pmiab)), identified by [\u003cspan property=\"dct:title\"\u003ehakerdefo\u003c/span\u003e](https://hakerdefo.blogspot.com), is free of known copyright restrictions.\n\n[MPVS hosts file]:http://winhelp2002.mvps.org/hosts.htm\n[Dan Pollock's hosts file]:https://someonewhocares.org/hosts/\n[yoyo.org hosts file]:https://pgl.yoyo.org/as/\n[Badd Boyz hosts file]:https://github.com/mitchellkrogza/Badd-Boyz-Hosts\n[Steven Black's hosts file]:https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts\n[ABUSE.ch hosts file]:https://abuse.ch/\n[AdAway hosts file]:https://github.com/AdAway/AdAway\n[pmiab-master]:https://github.com/hakerdefo/pmiab/archive/master.zip\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakerdefo%2Fpmiab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhakerdefo%2Fpmiab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakerdefo%2Fpmiab/lists"}