From 38489c77166c78941cb9bba8ab17a005059bf258 Mon Sep 17 00:00:00 2001 From: Be Date: Mon, 4 Mar 2024 01:41:29 +0100 Subject: [PATCH] blacklists_updater.sh --- blacklists_updater.sh | 13 ++++++++----- lists/ru-gov-asns.txt | 11 ----------- 2 files changed, 8 insertions(+), 16 deletions(-) delete mode 100644 lists/ru-gov-asns.txt diff --git a/blacklists_updater.sh b/blacklists_updater.sh index 19f3ce1..bb0fc98 100755 --- a/blacklists_updater.sh +++ b/blacklists_updater.sh @@ -3,11 +3,14 @@ outfile_wo_comments="auto/blacklist.txt" outfile_w_comments="auto/blacklist_with_comments.txt" -url_asns="https://raw.githubusercontent.com/C24Be/AS_Network_List/main/lists/ru-gov-asns.txt" -url_nets="https://raw.githubusercontent.com/C24Be/AS_Network_List/main/lists/ru-gov-netnames.txt" +auto_black_ass="auto/black_ass.txt" -./network_list_from_as.py ${url_asns} > ${outfile_w_comments} -./network_list_from_netname.py ${url_nets} >> ${outfile_w_comments} +grep -iE "uvd|fgup|grchc|roskomnad" auto/all-ru-asn.txt | awk '{ print "# AS-Name: " $0 "\n" $1}' > ${auto_black_ass} + +./network_list_from_as.py ${auto_black_ass} > ${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 "uvd|fgup|grchc|roskomnad" auto/ripe-ru-ipv4.txt | awk '{ print "# AS-Name: " $0 "\n" $1}' >> ${outfile_w_comments} # Remove comments by sed to avoid flooding WHOIS servers -grep -v "#" ${outfile_w_comments} > ${outfile_wo_comments} +grep -v "#" ${outfile_w_comments} | sort | uniq > ${outfile_wo_comments} diff --git a/lists/ru-gov-asns.txt b/lists/ru-gov-asns.txt deleted file mode 100644 index a6cf390..0000000 --- a/lists/ru-gov-asns.txt +++ /dev/null @@ -1,11 +0,0 @@ -# ---------- -# -# Just list of strings started with AS... -# -# AS31430 -# AS61280 -# -# ---------- - -# Номер автономки у ГРЧЦ и подконтрольному ему ДЦОА -AS61280