HOSTS file
When trying to find out why my comp didn't block ads despite /etc/hosts
I came across this
https://github.com/StevenBlack/hosts
Python script to keep an updated hosts file
Tried it when hacking in "other data" dir also
and got
seems like it's mixing 127.0.0.1 and 0.0.0.0 entries though
I came across this
https://github.com/StevenBlack/hosts
Python script to keep an updated hosts file
Tried it when hacking in "other data" dir also
and got
That is several entries, puhSuccess! Your shiny new hosts file has been prepared.
It contains 740574 unique entries
seems like it's mixing 127.0.0.1 and 0.0.0.0 entries though
If you request a page from the World wide web then they do have dns addresses. If the page has an onion address, then I don't see why you couldn't block a site based on an onion address. Tor lets you connect to it via a proxy such as a vpn, perhaps one could put a proxy between the browser and tor that would do hostfile type blocking based on addresses. Furthermore, I don't see why one couldn't use the hostfile for this filtering.linuxcbon wrote:Tor browser is out of topic. (Just to answer, it doesnt use hosts, because it uses its own dns. And using adblock or addons with tor is not good, because you never know what infos they could send about your pc etc. I even have doubts that tor is secure.).
Block lists to prevent JavaScript miners
https://github.com/hoshsadiq/adblock-nocoin-list
This is an adblock list to block "browser-based crypto mining".
For the blocking based on the HOSTS file use the below link:
https://raw.githubusercontent.com/hoshs ... /hosts.txt
Ctrl+S to save.
This is an adblock list to block "browser-based crypto mining".
For the blocking based on the HOSTS file use the below link:
https://raw.githubusercontent.com/hoshs ... /hosts.txt
Ctrl+S to save.
hblock
https://github.com/hectorm/hblock
This POSIX-compliant shell script, designed for Unix-like systems, gets a list of domains that serve ads, tracking scripts and malware from multiple sources and creates a hosts file (alternative formats are also supported) that prevents your system from connecting to them.
Installation
curl -o /tmp/hblock 'https://raw.githubusercontent.com/hecto ... 1.3/hblock' \
&& echo '5aa752ceee6f4d10bdeab372ca557aefc3c7f32e4e10cceb4dddb3a86f6db4d3 /tmp/hblock' | shasum -c \
&& sudo mv /tmp/hblock /usr/local/bin/hblock \
&& sudo chown root:root /usr/local/bin/hblock \
&& sudo chmod 755 /usr/local/bin/hblock
Usage
In your terminal : hblock
Result :
116888 blocked domains.
Optional :
You can use this Systemd timer to regularly update the hosts file for new additions :
https://github.com/hectorm/hblock/blob/ ... /README.md
The following commands will schedule a daily update of the hosts file :
curl -o '/tmp/hblock.#1' 'https://raw.githubusercontent.com/hecto ... vice,timer}' \
&& echo '70964235a03152d4bc68096a0b99cc59e3f77595b99330f8c55dcca79d7164ff /tmp/hblock.service' | shasum -c \
&& echo '79ecc28c13b2489400bd5ddc0ee61ddaf6c3225acb1d54b5cb4026f822ae60e8 /tmp/hblock.timer' | shasum -c \
&& sudo mv /tmp/hblock.{service,timer} /etc/systemd/system/ \
&& sudo chown root:root /etc/systemd/system/hblock.{service,timer} \
&& sudo chmod 644 /etc/systemd/system/hblock.{service,timer} \
&& sudo systemctl daemon-reload \
&& sudo systemctl enable hblock.timer \
&& sudo systemctl start hblock.timer
This POSIX-compliant shell script, designed for Unix-like systems, gets a list of domains that serve ads, tracking scripts and malware from multiple sources and creates a hosts file (alternative formats are also supported) that prevents your system from connecting to them.
Installation
curl -o /tmp/hblock 'https://raw.githubusercontent.com/hecto ... 1.3/hblock' \
&& echo '5aa752ceee6f4d10bdeab372ca557aefc3c7f32e4e10cceb4dddb3a86f6db4d3 /tmp/hblock' | shasum -c \
&& sudo mv /tmp/hblock /usr/local/bin/hblock \
&& sudo chown root:root /usr/local/bin/hblock \
&& sudo chmod 755 /usr/local/bin/hblock
Usage
In your terminal : hblock
Result :
116888 blocked domains.
Optional :
You can use this Systemd timer to regularly update the hosts file for new additions :
https://github.com/hectorm/hblock/blob/ ... /README.md
The following commands will schedule a daily update of the hosts file :
curl -o '/tmp/hblock.#1' 'https://raw.githubusercontent.com/hecto ... vice,timer}' \
&& echo '70964235a03152d4bc68096a0b99cc59e3f77595b99330f8c55dcca79d7164ff /tmp/hblock.service' | shasum -c \
&& echo '79ecc28c13b2489400bd5ddc0ee61ddaf6c3225acb1d54b5cb4026f822ae60e8 /tmp/hblock.timer' | shasum -c \
&& sudo mv /tmp/hblock.{service,timer} /etc/systemd/system/ \
&& sudo chown root:root /etc/systemd/system/hblock.{service,timer} \
&& sudo chmod 644 /etc/systemd/system/hblock.{service,timer} \
&& sudo systemctl daemon-reload \
&& sudo systemctl enable hblock.timer \
&& sudo systemctl start hblock.timer
Yoo-hoo! Labbe5!
You again forgot that Puppy runs as root, so it does not need the sudo command
before another command.
As to systemctl... we don't have it.
BFN.
You again forgot that Puppy runs as root, so it does not need the sudo command
before another command.
As to systemctl... we don't have it.
Code: Select all
[~]>systemctl
bash: systemctl: command not found
Last edited by musher0 on Mon 30 Dec 2019, 04:42, edited 1 time in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
If all also fails kill the daemon and then restart it!musher0 wrote:Yoo-hoo! Labbe5!
You again forgot that Puppy runs as root, so it does not need the sudo command
before another command.
As to systemctl... we con't have it.BFN.Code: Select all
[~]>systemctl bash: systemctl: command not found
BTW, there is a completely unrelated command called sysctl. I always get this one mixed up with systemctl.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].