diff --git a/scripts/fetch_blacklists.py b/scripts/fetch_blacklists.py index 1a18026..76cd287 100644 --- a/scripts/fetch_blacklists.py +++ b/scripts/fetch_blacklists.py @@ -19,10 +19,19 @@ SOURCES = [ - ("stamparm_ipsum", "https://raw.githubusercontent.com/stamparm/ipsum/master/ipsum.txt"), + ( + "stamparm_ipsum", + "https://raw.githubusercontent.com/stamparm/ipsum/master/ipsum.txt", + ), ("spamhaus_drop", "https://www.spamhaus.org/drop/drop.txt"), - ("emerging_block_ips", "https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt"), - ("ransomwaretracker_rw_ipbl", "https://ransomwaretracker.abuse.ch/downloads/RW_IPBL.txt"), + ( + "emerging_block_ips", + "https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt", + ), + ( + "ransomwaretracker_rw_ipbl", + "https://ransomwaretracker.abuse.ch/downloads/RW_IPBL.txt", + ), ("zeus_abusech", "https://zeustracker.abuse.ch/blocklist.php?download=ipblocklist"), ] @@ -138,8 +147,12 @@ def main(): # The pipeline's `process_badips.py` will merge `data/new_ips.csv` and # other `data/*.csv` sources into `badip_list.csv` and update the DB. if new_ips: - print(f"Found {len(new_ips)} new IPs (not in badip_list.csv); leaving merge to process_badips.py") + print( + f"Found {len(new_ips)} new IPs (not in badip_list.csv); leaving merge to process_badips.py" + ) else: print("No new IPs detected; nothing to merge") + + if __name__ == "__main__": main() diff --git a/scripts/update_readme.py b/scripts/update_readme.py index fc39b00..ad245da 100644 --- a/scripts/update_readme.py +++ b/scripts/update_readme.py @@ -22,7 +22,9 @@ def format_time(iso_str): def build_block(stats): - update_time = format_time(stats.get("update_time") or stats.get("update_time_iso") or "") + update_time = format_time( + stats.get("update_time") or stats.get("update_time_iso") or "" + ) total = stats.get("total_ips", 0) countries = stats.get("countries_affected") or stats.get("countries") or 0 severity = stats.get("severity_avg") or stats.get("average_severity") or 0.0