Showing 1 changed files with 24 additions and 9 deletions
+24 -9
hostsmod
... ...
@@ -1,25 +1,36 @@
1 1
 #!/bin/bash
2 2
 
3
+#array=("https://adaway.org/hosts.txt"
4
+#"https://kawi.fr/android-hosts.txt"
5
+#"http://winhelp2002.mvps.org/hosts.txt"
6
+#"https://hosts-file.net/ad_servers.txt"
7
+#"https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext"
8
+#"http://sysctl.org/cameleon/hosts"
9
+#"http://rlwpx.free.fr/WPFF/hosts.htm"
10
+#"http://someonewhocares.org/hosts/hosts"
11
+#"http://www.malwaredomainlist.com/hostslist/hosts.txt"
12
+#"http://www.hostsfile.org/Downloads/hosts.txt"
13
+#"https://sites.google.com/site/logroid/files/hosts.txt?attredirects=0"
14
+#"http://optimate.dl.sourceforge.net/project/adzhosts/HOSTS.txt"
15
+#"http://hosts.eladkarako.com/hosts.txt"
16
+#"https://github.com/StevenBlack/hosts/raw/master/hosts"
17
+#"https://github.com/yous/YousList/raw/master/hosts.txt"
18
+#)
19
+
3 20
 array=("https://adaway.org/hosts.txt"
21
+"https://kawi.fr/android-hosts.txt"
22
+"http://winhelp2002.mvps.org/hosts.txt"
4 23
 "https://hosts-file.net/ad_servers.txt"
5 24
 "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext"
6
-"http://winhelp2002.mvps.org/hosts.txt"
7 25
 "http://sysctl.org/cameleon/hosts"
8 26
 "http://rlwpx.free.fr/WPFF/hosts.htm"
9
-"http://someonewhocares.org/hosts/hosts"
10 27
 "http://www.malwaredomainlist.com/hostslist/hosts.txt"
11
-"http://www.hostsfile.org/Downloads/hosts.txt"
12
-"http://securemecca.com/Downloads/hosts.txt"
13
-"http://adblock.gjtech.net/?format=unix-hosts"
14
-"https://jansal.googlecode.com/svn/trunk/adblock/hosts"
15 28
 "https://sites.google.com/site/logroid/files/hosts.txt?attredirects=0"
16
-"http://optimate.dl.sourceforge.net/project/adzhosts/HOSTS.txt"
17
-"http://hosts.eladkarako.com/hosts.txt"
18
-"https://github.com/StevenBlack/hosts/raw/master/hosts"
19 29
 "https://github.com/yous/YousList/raw/master/hosts.txt"
20 30
 )
21 31
 
22 32
 REDIRECTION="127.0.0.1"
33
+#WGET="wget"
23 34
 WGET="wget -q"
24 35
 TEMPHTML="/tmp/host.txt"
25 36
 TEMPHTML2="/tmp/host2.txt"
... ...
@@ -34,12 +45,16 @@ function clean_temp_files()
34 45
 trap clean_temp_files EXIT
35 46
 
36 47
 rm -f $TEMPHTML $TEMPHTML2
48
+cpt=0
37 49
 for link in ${array[@]}
38 50
 do
39 51
   echo "+- Source [$link]"
40 52
   $WGET $link -O $TEMPHTML
41 53
   dos2unix $TEMPHTML &> /dev/null
42 54
   cat $TEMPHTML >> $TEMPHTML2
55
+  echo "# SOURCE: $link" > /home/ycawidro/host-$(printf "%02d" $cpt).txt
56
+  cat $TEMPHTML >> /home/ycawidro/host-$(printf "%02d" $cpt).txt
57
+  cpt=$(( $cpt + 1 ))
43 58
 done
44 59
 
45 60
 echo "+- Cleaning"