mirror of
https://bitbucket.org/anticensority/antizapret-pac-generator-light.git
synced 2024-11-22 21:26:04 +03:00
Update
This commit is contained in:
parent
82b7c38a1e
commit
cdf2a6a5fb
5
doall.sh
5
doall.sh
@ -5,6 +5,7 @@ set -e
|
|||||||
HERE="$(dirname "$(readlink -f "${0}")")"
|
HERE="$(dirname "$(readlink -f "${0}")")"
|
||||||
cd "$HERE"
|
cd "$HERE"
|
||||||
|
|
||||||
./update.sh
|
#./update.sh
|
||||||
./parse.sh
|
./parse.sh
|
||||||
./process.sh
|
#./process.sh
|
||||||
|
./generate-pac.sh
|
||||||
|
16
parse.sh
16
parse.sh
@ -13,10 +13,10 @@ awk -F ';' '{print $2}' temp/list.csv | sort -u | awk '/^$/ {next} /\\/ {next} /
|
|||||||
# FIXME: nxdomain list parsing is disabled due to its instability on z-i
|
# FIXME: nxdomain list parsing is disabled due to its instability on z-i
|
||||||
###cat exclude.txt temp/nxdomain.txt > temp/exclude.txt
|
###cat exclude.txt temp/nxdomain.txt > temp/exclude.txt
|
||||||
|
|
||||||
sort -u config/exclude-hosts-{dist,custom}.txt > temp/exclude-hosts.txt
|
#sort -u config/exclude-hosts-{dist,custom}.txt > temp/exclude-hosts.txt
|
||||||
sort -u config/exclude-ips-{dist,custom}.txt > temp/exclude-ips.txt
|
#sort -u config/exclude-ips-{dist,custom}.txt > temp/exclude-ips.txt
|
||||||
sort -u config/include-hosts-{dist,custom}.txt > temp/include-hosts.txt
|
#sort -u config/include-hosts-{dist,custom}.txt > temp/include-hosts.txt
|
||||||
sort -u config/include-ips-{dist,custom}.txt > temp/include-ips.txt
|
#sort -u config/include-ips-{dist,custom}.txt > temp/include-ips.txt
|
||||||
sort -u temp/include-hosts.txt result/hostlist_original.txt > temp/hostlist_original_with_include.txt
|
sort -u temp/include-hosts.txt result/hostlist_original.txt > temp/hostlist_original_with_include.txt
|
||||||
|
|
||||||
awk -F ';' '{split($1, a, /\|/); for (i in a) {print a[i]";"$2}}' temp/list.csv | \
|
awk -F ';' '{split($1, a, /\|/); for (i in a) {print a[i]";"$2}}' temp/list.csv | \
|
||||||
@ -24,11 +24,11 @@ awk -F ';' '{split($1, a, /\|/); for (i in a) {print a[i]";"$2}}' temp/list.csv
|
|||||||
|
|
||||||
awk -f scripts/getzones.awk temp/hostlist_original_with_include.txt | grep -v -F -x -f temp/exclude-hosts.txt | sort -u > result/hostlist_zones.txt
|
awk -f scripts/getzones.awk temp/hostlist_original_with_include.txt | grep -v -F -x -f temp/exclude-hosts.txt | sort -u > result/hostlist_zones.txt
|
||||||
|
|
||||||
if [[ "$RESOLVE_NXDOMAIN" == "yes" ]];
|
#if [[ "$RESOLVE_NXDOMAIN" == "yes" ]];
|
||||||
then
|
#then
|
||||||
timeout 2h scripts/resolve-dns-nxdomain.py result/hostlist_zones.txt >> temp/exclude-hosts.txt
|
# timeout 2h scripts/resolve-dns-nxdomain.py result/hostlist_zones.txt >> temp/exclude-hosts.txt
|
||||||
awk -f scripts/getzones.awk temp/hostlist_original_with_include.txt | grep -v -F -x -f temp/exclude-hosts.txt | sort -u > result/hostlist_zones.txt
|
awk -f scripts/getzones.awk temp/hostlist_original_with_include.txt | grep -v -F -x -f temp/exclude-hosts.txt | sort -u > result/hostlist_zones.txt
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
# Generate a list of IP addresses
|
# Generate a list of IP addresses
|
||||||
awk -F';' '$1 ~ /\// {print $1}' temp/list.csv | grep -P '([0-9]{1,3}\.){3}[0-9]{1,3}\/[0-9]{1,2}' -o | sort -Vu > result/iplist_special_range.txt
|
awk -F';' '$1 ~ /\// {print $1}' temp/list.csv | grep -P '([0-9]{1,3}\.){3}[0-9]{1,3}\/[0-9]{1,2}' -o | sort -Vu > result/iplist_special_range.txt
|
||||||
|
9
result/blocked-ranges.txt
Normal file
9
result/blocked-ranges.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
103.246.200.0/22
|
||||||
|
178.239.88.0/21
|
||||||
|
185.104.45.0/24
|
||||||
|
193.105.213.36/30
|
||||||
|
203.104.128.0/20
|
||||||
|
203.104.144.0/21
|
||||||
|
203.104.152.0/22
|
||||||
|
68.171.224.0/19
|
||||||
|
74.82.64.0/19
|
127293
result/dnsmasq-aliases-alt.conf
Normal file
127293
result/dnsmasq-aliases-alt.conf
Normal file
File diff suppressed because it is too large
Load Diff
432347
result/hostlist_original.txt
Normal file
432347
result/hostlist_original.txt
Normal file
File diff suppressed because it is too large
Load Diff
127293
result/hostlist_zones.txt
Normal file
127293
result/hostlist_zones.txt
Normal file
File diff suppressed because it is too large
Load Diff
147836
result/iplist_all.txt
Normal file
147836
result/iplist_all.txt
Normal file
File diff suppressed because it is too large
Load Diff
6851
result/iplist_blockedbyip.txt
Normal file
6851
result/iplist_blockedbyip.txt
Normal file
File diff suppressed because it is too large
Load Diff
6654
result/iplist_blockedbyip_noid2971.txt
Normal file
6654
result/iplist_blockedbyip_noid2971.txt
Normal file
File diff suppressed because it is too large
Load Diff
6649
result/iplist_blockedbyip_noid2971_collapsed.txt
Normal file
6649
result/iplist_blockedbyip_noid2971_collapsed.txt
Normal file
File diff suppressed because it is too large
Load Diff
9
result/iplist_special_range.txt
Normal file
9
result/iplist_special_range.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
68.171.224.0/19
|
||||||
|
74.82.64.0/19
|
||||||
|
103.246.200.0/22
|
||||||
|
178.239.88.0/21
|
||||||
|
185.104.45.0/24
|
||||||
|
193.105.213.36/30
|
||||||
|
203.104.128.0/20
|
||||||
|
203.104.144.0/21
|
||||||
|
203.104.152.0/22
|
127295
result/knot-aliases-alt.conf
Normal file
127295
result/knot-aliases-alt.conf
Normal file
File diff suppressed because it is too large
Load Diff
9
result/openvpn-blocked-ranges.txt
Normal file
9
result/openvpn-blocked-ranges.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
push "route 103.246.200.0 255.255.252.0"
|
||||||
|
push "route 178.239.88.0 255.255.248.0"
|
||||||
|
push "route 185.104.45.0 255.255.255.0"
|
||||||
|
push "route 193.105.213.36 255.255.255.252"
|
||||||
|
push "route 203.104.128.0 255.255.240.0"
|
||||||
|
push "route 203.104.144.0 255.255.248.0"
|
||||||
|
push "route 203.104.152.0 255.255.252.0"
|
||||||
|
push "route 68.171.224.0 255.255.224.0"
|
||||||
|
push "route 74.82.64.0 255.255.224.0"
|
4305
result/proxy-host-nossl.pac
Normal file
4305
result/proxy-host-nossl.pac
Normal file
File diff suppressed because one or more lines are too long
4315
result/proxy-host-ssl.pac
Normal file
4315
result/proxy-host-ssl.pac
Normal file
File diff suppressed because one or more lines are too long
127293
result/squid-whitelist-zones.conf
Normal file
127293
result/squid-whitelist-zones.conf
Normal file
File diff suppressed because it is too large
Load Diff
51011
temp/exclude-hosts.txt
Normal file
51011
temp/exclude-hosts.txt
Normal file
File diff suppressed because it is too large
Load Diff
16
temp/exclude-ips.txt
Normal file
16
temp/exclude-ips.txt
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
0.0.0.
|
||||||
|
10.0.0.
|
||||||
|
1.1.1.1
|
||||||
|
1.2.3.4
|
||||||
|
127.0.0.1
|
||||||
|
172.16.0.
|
||||||
|
178.248.233.33
|
||||||
|
192.168.0.
|
||||||
|
192.168.1.
|
||||||
|
192.168.100.
|
||||||
|
192.168.2.
|
||||||
|
192.168.44.
|
||||||
|
192.168.88.
|
||||||
|
82.192.95.170
|
||||||
|
fe80::
|
428029
temp/hostlist_original_with_include.txt
Normal file
428029
temp/hostlist_original_with_include.txt
Normal file
File diff suppressed because it is too large
Load Diff
24
temp/include-hosts.txt
Normal file
24
temp/include-hosts.txt
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
acf.international
|
||||||
|
bbci.co.uk
|
||||||
|
cdninstagram.com
|
||||||
|
fbcdn.net
|
||||||
|
fb.com
|
||||||
|
game-debate.com
|
||||||
|
lib.ru
|
||||||
|
licdn.com
|
||||||
|
lostfilm.tv
|
||||||
|
messenger.com
|
||||||
|
news.google.com
|
||||||
|
nnmclub.ch
|
||||||
|
nnm-club.ws
|
||||||
|
play.google.com
|
||||||
|
pravdabeslana.ru
|
||||||
|
radiojar.com
|
||||||
|
rebrand.ly
|
||||||
|
rutrk.org
|
||||||
|
simsync.io
|
||||||
|
t.co
|
||||||
|
theins.ru
|
||||||
|
t-ru.org
|
||||||
|
twimg.com
|
1
temp/include-ips.txt
Normal file
1
temp/include-ips.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
577965
temp/list.csv
Normal file
577965
temp/list.csv
Normal file
File diff suppressed because one or more lines are too long
577965
temp/list_orig.csv
Normal file
577965
temp/list_orig.csv
Normal file
File diff suppressed because one or more lines are too long
63374
temp/nxdomain.txt
Normal file
63374
temp/nxdomain.txt
Normal file
File diff suppressed because it is too large
Load Diff
1
temp/pacpatterns.js
Normal file
1
temp/pacpatterns.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
{'!A': 'loud', '!B': 'ront', '!C': '.cfd', '!D': 'kino', '!E': 'film', '!F': 'azin', '!G': 'porn', '!H': 'oker', '!I': 'line', '!J': 'game', '!K': 'lord', '!L': 'xn--', '!M': 'pdom', '!N': 'seri', '!O': 'prav', '!P': 'slot', '!Q': 'club', '!R': '.com', '!S': 'play', '!T': 'inup', '!U': 'mone', '!V': 'vest', '!W': 'port', '!X': 'shop', '!Y': 'obet', '!Z': 'mega', 'A': 'in', 'B': 'st', 'C': 'er', 'D': 'ar', 'E': 'or', 'F': 'al', 'G': 'et', 'H': 'on', 'I': 'an', 'J': 'en', 'K': 'ro', 'L': 're', 'M': 'at', 'N': 'it', 'O': 'se', 'P': 'co', 'Q': 'ch', 'R': 'ra', 'S': 'as', 'T': 'am', 'U': 'ol', 'V': 'el', 'W': 'es', 'X': 'ic', 'Y': 'om', 'Z': 'us', '@': 'ed', '#': 'is', '$': 'ka', '%': 'ot', '^': 'os', '&': 'im', '*': 'ad', '(': 'ov', ')': 'le', '=': 'op', '+': 'id', '/': 'iv', ',': 'a-', '<': 'sp', '>': 'ir', '~': 'ig', '[': 'i-', ']': 'ap', '{': 'ut', '}': 'il', '`': 'em', ':': 'od', ';': 'un', '?': 'ag'}
|
78
temp/replace-common-sequences.awk
Normal file
78
temp/replace-common-sequences.awk
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
{
|
||||||
|
gsub(/loud/, "!A", domainname)
|
||||||
|
gsub(/ront/, "!B", domainname)
|
||||||
|
gsub(/\.cfd/, "!C", domainname)
|
||||||
|
gsub(/kino/, "!D", domainname)
|
||||||
|
gsub(/film/, "!E", domainname)
|
||||||
|
gsub(/azin/, "!F", domainname)
|
||||||
|
gsub(/porn/, "!G", domainname)
|
||||||
|
gsub(/oker/, "!H", domainname)
|
||||||
|
gsub(/line/, "!I", domainname)
|
||||||
|
gsub(/game/, "!J", domainname)
|
||||||
|
gsub(/lord/, "!K", domainname)
|
||||||
|
gsub(/xn--/, "!L", domainname)
|
||||||
|
gsub(/pdom/, "!M", domainname)
|
||||||
|
gsub(/seri/, "!N", domainname)
|
||||||
|
gsub(/prav/, "!O", domainname)
|
||||||
|
gsub(/slot/, "!P", domainname)
|
||||||
|
gsub(/club/, "!Q", domainname)
|
||||||
|
gsub(/\.com/, "!R", domainname)
|
||||||
|
gsub(/play/, "!S", domainname)
|
||||||
|
gsub(/inup/, "!T", domainname)
|
||||||
|
gsub(/mone/, "!U", domainname)
|
||||||
|
gsub(/vest/, "!V", domainname)
|
||||||
|
gsub(/port/, "!W", domainname)
|
||||||
|
gsub(/shop/, "!X", domainname)
|
||||||
|
gsub(/obet/, "!Y", domainname)
|
||||||
|
gsub(/mega/, "!Z", domainname)
|
||||||
|
gsub(/in/, "A", domainname)
|
||||||
|
gsub(/st/, "B", domainname)
|
||||||
|
gsub(/er/, "C", domainname)
|
||||||
|
gsub(/ar/, "D", domainname)
|
||||||
|
gsub(/or/, "E", domainname)
|
||||||
|
gsub(/al/, "F", domainname)
|
||||||
|
gsub(/et/, "G", domainname)
|
||||||
|
gsub(/on/, "H", domainname)
|
||||||
|
gsub(/an/, "I", domainname)
|
||||||
|
gsub(/en/, "J", domainname)
|
||||||
|
gsub(/ro/, "K", domainname)
|
||||||
|
gsub(/re/, "L", domainname)
|
||||||
|
gsub(/at/, "M", domainname)
|
||||||
|
gsub(/it/, "N", domainname)
|
||||||
|
gsub(/se/, "O", domainname)
|
||||||
|
gsub(/co/, "P", domainname)
|
||||||
|
gsub(/ch/, "Q", domainname)
|
||||||
|
gsub(/ra/, "R", domainname)
|
||||||
|
gsub(/as/, "S", domainname)
|
||||||
|
gsub(/am/, "T", domainname)
|
||||||
|
gsub(/ol/, "U", domainname)
|
||||||
|
gsub(/el/, "V", domainname)
|
||||||
|
gsub(/es/, "W", domainname)
|
||||||
|
gsub(/ic/, "X", domainname)
|
||||||
|
gsub(/om/, "Y", domainname)
|
||||||
|
gsub(/us/, "Z", domainname)
|
||||||
|
gsub(/ed/, "@", domainname)
|
||||||
|
gsub(/is/, "#", domainname)
|
||||||
|
gsub(/ka/, "$", domainname)
|
||||||
|
gsub(/ot/, "%", domainname)
|
||||||
|
gsub(/os/, "^", domainname)
|
||||||
|
gsub(/im/, "\\&", domainname)
|
||||||
|
gsub(/ad/, "*", domainname)
|
||||||
|
gsub(/ov/, "(", domainname)
|
||||||
|
gsub(/le/, ")", domainname)
|
||||||
|
gsub(/op/, "=", domainname)
|
||||||
|
gsub(/id/, "+", domainname)
|
||||||
|
gsub(/iv/, "/", domainname)
|
||||||
|
gsub(/a-/, ",", domainname)
|
||||||
|
gsub(/sp/, "<", domainname)
|
||||||
|
gsub(/ir/, ">", domainname)
|
||||||
|
gsub(/ig/, "~", domainname)
|
||||||
|
gsub(/i-/, "[", domainname)
|
||||||
|
gsub(/ap/, "]", domainname)
|
||||||
|
gsub(/ut/, "{", domainname)
|
||||||
|
gsub(/il/, "}", domainname)
|
||||||
|
gsub(/em/, "`", domainname)
|
||||||
|
gsub(/od/, ":", domainname)
|
||||||
|
gsub(/un/, ";", domainname)
|
||||||
|
gsub(/ag/, "?", domainname)
|
||||||
|
}
|
49
temp/replace-common-words.awk
Normal file
49
temp/replace-common-words.awk
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
gsub(/at/, "A", domainname)
|
||||||
|
gsub(/do/, "B", domainname)
|
||||||
|
gsub(/le/, "C", domainname)
|
||||||
|
gsub(/de/, "D", domainname)
|
||||||
|
gsub(/ga/, "E", domainname)
|
||||||
|
gsub(/it/, "F", domainname)
|
||||||
|
gsub(/cl/, "G", domainname)
|
||||||
|
gsub(/ot/, "H", domainname)
|
||||||
|
gsub(/ou/, "I", domainname)
|
||||||
|
gsub(/fi/, "J", domainname)
|
||||||
|
gsub(/il/, "K", domainname)
|
||||||
|
gsub(/os/, "L", domainname)
|
||||||
|
gsub(/la/, "M", domainname)
|
||||||
|
gsub(/ca/, "N", domainname)
|
||||||
|
gsub(/co/, "O", domainname)
|
||||||
|
gsub(/ki/, "P", domainname)
|
||||||
|
gsub(/ri/, "Q", domainname)
|
||||||
|
gsub(/as/, "R", domainname)
|
||||||
|
gsub(/ta/, "S", domainname)
|
||||||
|
gsub(/te/, "T", domainname)
|
||||||
|
gsub(/me/, "U", domainname)
|
||||||
|
gsub(/am/, "V", domainname)
|
||||||
|
gsub(/en/, "W", domainname)
|
||||||
|
gsub(/se/, "X", domainname)
|
||||||
|
gsub(/ma/, "Y", domainname)
|
||||||
|
gsub(/be/, "Z", domainname)
|
||||||
|
gsub(/to/, "!", domainname)
|
||||||
|
gsub(/li/, "@", domainname)
|
||||||
|
gsub(/ne/, "#", domainname)
|
||||||
|
gsub(/om/, "$", domainname)
|
||||||
|
gsub(/nt/, "%", domainname)
|
||||||
|
gsub(/ra/, "^", domainname)
|
||||||
|
gsub(/al/, "\\&", domainname)
|
||||||
|
gsub(/es/, "*", domainname)
|
||||||
|
gsub(/ar/, "(", domainname)
|
||||||
|
gsub(/an/, ")", domainname)
|
||||||
|
gsub(/po/, "=", domainname)
|
||||||
|
gsub(/re/, "+", domainname)
|
||||||
|
gsub(/no/, "/", domainname)
|
||||||
|
gsub(/et/, ",", domainname)
|
||||||
|
gsub(/st/, "<", domainname)
|
||||||
|
gsub(/lo/, ">", domainname)
|
||||||
|
gsub(/ro/, "~", domainname)
|
||||||
|
gsub(/on/, "[", domainname)
|
||||||
|
gsub(/er/, "]", domainname)
|
||||||
|
gsub(/or/, "{", domainname)
|
||||||
|
gsub(/in/, "}", domainname)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user