Comments (11)
Normally I just refresh the source hosts files, whose authors do a pretty good (albeit sometimes spotty) job of it.
Another consideration: just because a donain is "parked" or displays a "parked" home page doesn't mean it doesn't serve ads, or malware, or other things.
Do you sense that I understood your question? If not please clarify.
from hosts.
Ok, thank you!
It is just to clean my own hosts file (ads/tracker/malware/adult) which becomes a little large ~100.000 lines.
This is how i try to do:
@echo off
for /f %%i in (domains.txt) do ping -n 1 %%i >nul && echo UP %%i&& echo 0.0.0.0 %%i>>hosts-up.txt||echo Down %%i&& echo %%i>>hosts-down.txt
or
#!/bin/bash
for file in domaines.txt; do
while IFS= read -r host; do
ping -qc 1 "$host" && echo "$host" >> result.txt;
echo -e "$(sed '1d' domaines.txt)\n" > domaines.txt
done < "$file"
done
from hosts.
Thing is, ping
uses the ICMP which can be turned off even though the server still responds to http and https requests.
from hosts.
Can you suggest me an other way to clean down host?
Thanks!
from hosts.
I usually clear hosts records when they block services I need.
For example, an earlier version of the consolidated hosts file blocked professional ice hokey feeds. I live in Canada so I fixed that pretty quick :-)
On another occasion several Vimeo servers were blocked.
But there's no harm in blocking obsolete ad servers. I don't worry about that.
from hosts.
Ok, i really appreciate your help. Thank you very much.
Best regards,
Med 😸
from hosts.
Some coding ideas;
- You can scan port 80 and 443/tcp.
- Use curl to capture the body, and search this string "Sedo" "parking" "buy this domain"
from hosts.
@Espress0 can you help me to write script?
from hosts.
can you help me to write script?
Still interested?
Which OS are you using, Windows or Linux? I'll write a code and send it for you(license: WTFPL).
from hosts.
1.You can scan port 80 and 443/tcp.
You can use scan() for port scanning(and if your ISP is not friendly, scan via Tor).
http://www.catonmat.net/blog/tcp-port-scanner-in-bash/
e.g., scan domain.maybe.parked.server 25,80,443,587
- Use curl to capture the body, and search this string "Sedo" "parking" "buy this domain"
You're using Linux, so curl will help:
curl "http://$HOSTSFQDN/robots.txt"|grep "llow"|wc -l
curl "https://$HOSTSFQDN/robots.txt"|grep "llow"|wc -l
check these 2 commands, and if it is not 0, there's a webpage.
- llow
to scan "(A|a)llow" or "(D|d)isallow"
from hosts.
@Espress0 Yes still interested, i'am using Linux (Manjaro/Arch).
I'll test and come back.
from hosts.
Related Issues (20)
- Addition to porn list
- add to porn blocklist
- block argo.svcmot.com HOT 5
- add to porn list HOT 2
- click.discord.com on fakenews-gambling-porn HOT 4
- block airtel analytics. HOT 6
- StevenBlack blocks GOG Store in Heroic Games Launcher HOT 2
- Mistake on line 22 HOT 2
- Sex vid HOT 1
- https://www.pornobereich.com/
- DNS Client overloaded when using biggest host file, causing "permanent" internet connection loss HOT 5
- allow statcounter it is just a website which track os and other stuff HOT 1
- Add Snapchat to the social list HOT 10
- Amplitude.com completely blacklisted by Adaway HOT 2
- Please add spiegel.com because it's NOT the english version of german newspaper spiegel.de HOT 2
- allow stat counter HOT 1
- adbox.lv and b.adbox.lv HOT 4
- Unblock fast.appcues.com HOT 2
- ## Inefficient regular expression HOT 3
- Authentic domain being blocked HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hosts.