update blacklists_updater.sh regexps

This commit is contained in:
C24Be
2024-04-01 11:58:09 +02:00
parent 78b348e4a1
commit 5b3ff1b900

View File

@@ -5,12 +5,16 @@ outfile_w_comments="blacklists/blacklist_with_comments.txt"
auto_black_ass="auto/black_ass.txt" auto_black_ass="auto/black_ass.txt"
grep -iE "uvd|fgup|grchc|roskomnad" auto/all-ru-asn.txt | awk '{ print "# AS-Name: " $0 "\n" $1}' > ${auto_black_ass} black_names="uvd|umvd|fgup|grchc|roskomnad|federalnaya sluzhba|ufsb|zonatelecom"
white_names="ruvds"
grep -iE "${black_names}" auto/all-ru-asn.txt | grep -viE "${white_names}" | awk '{ print "# AS-Name: " $0 "\n" $1}' > ${auto_black_ass}
./network_list_from_as.py ${auto_black_ass} > ${outfile_w_comments} ./network_list_from_as.py ${auto_black_ass} > ${outfile_w_comments}
./network_list_from_netname.py lists/ru-gov-netnames.txt >> ${outfile_w_comments} ./network_list_from_netname.py lists/ru-gov-netnames.txt >> ${outfile_w_comments}
grep -iE "uvd|fgup|grchc|roskomnad" auto/all-ru-ipv4.txt | awk '{ print "# AS-Name: " $0 "\n" $1}' >> ${outfile_w_comments} grep -iE "${black_names}" auto/*-ru-ipv4.txt | grep -viE "${white_names}" | awk '{ print "# NET-Name: " $0 "\n" $1}' >> ${outfile_w_comments}
grep -iE "uvd|fgup|grchc|roskomnad|federalnaya sluzhba|ufsb|zonatelecom" auto/ripe-ru-ipv4.txt | awk '{ print "# AS-Name: " $0 "\n" $1}' >> ${outfile_w_comments}
# Remove comments by sed to avoid flooding WHOIS servers # Remove comments by sed to avoid flooding WHOIS servers
grep -v "#" ${outfile_w_comments} | sort | uniq > ${outfile_wo_comments} grep -v "#" ${outfile_w_comments} | sort | uniq > ${outfile_wo_comments}
grep -iE "uvd" auto/*-ru-ipv4.txt