forked from StevenBlack/hosts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sourcestats.sh
84 lines (80 loc) · 1.96 KB
/
sourcestats.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/sh
lists="
alternates/fakenews
alternates/fakenews-gambling
alternates/fakenews-gambling-only
alternates/fakenews-gambling-porn
alternates/fakenews-gambling-porn-only
alternates/fakenews-gambling-porn-social
alternates/fakenews-gambling-porn-social-only
alternates/fakenews-gambling-social
alternates/fakenews-gambling-social-only
alternates/fakenews-only
alternates/fakenews-porn
alternates/fakenews-porn-only
alternates/fakenews-porn-social
alternates/fakenews-porn-social-only
alternates/fakenews-social
alternates/fakenews-social-only
alternates/gambling
alternates/gambling-only
alternates/gambling-porn
alternates/gambling-porn-only
alternates/gambling-porn-social
alternates/gambling-porn-social-only
alternates/gambling-social
alternates/gambling-social-only
alternates/porn
alternates/porn-only
alternates/porn-social
alternates/porn-social-only
alternates/social
alternates/social-only
data/Badd-Boyz-Hosts
data/KADhosts
data/StevenBlack
data/URLHaus
data/UncheckyAds
data/adaway.org
data/add.2o7Net
data/add.Dead
data/add.Risk
data/add.Spam
data/hostsVN
data/minecraft-hosts
data/mvps.org
data/someonewhocares.org
data/tiuxo
data/yoyo.org
extensions/fakenews
extensions/gambling
extensions/gambling/bigdargon
extensions/gambling/sinfonietta
extensions/porn
extensions/porn/bigdargon
extensions/porn/brijrajparmar27
extensions/porn/clefspeare13
extensions/porn/sinfonietta
extensions/porn/sinfonietta-snuff
extensions/porn/tiuxo
extensions/social
extensions/social/sinfonietta
extensions/social/tiuxo
"
IFS='
'
for item in $lists; do
echo "" > $item/stats.out
for HASH_DATE in $(git log --reverse --format="%t,%as" -- $item); do
# echo $item $HASH_DATE
IFS=" "
split=(${HASH_DATE//,/ })
git checkout ${split[0]} ${item}/hosts 1> /dev/null 2> /dev/null
domains=$(rh -q -m $item/hosts)
echo $item ${split[1]} ${domains}
echo ${split[1]},${domains} >> ${item}/stats.out
IFS='
'
done
git checkout HEAD^ ${item}/hosts 1> /dev/null 2> /dev/null
done