Opengist

Explore

  • All gists
  • Topics
  • Users
Give feedback on the new UI Powered by Opengist ⋅ 66ms

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Login
b

blacklist

Recently created Least recently created Recently updated Least recently updated

timmy / DNSBL 黑名單查詢工具

Last active 6 hours ago blacklist dns dnsbl email-security networking python spam-detection

這段程式碼是一個 DNSBLChecker 工具,用於檢查指定的 IP 是否被列入常見的 DNS 黑名單(DNSBL)。支持動態添加或移除 DNSBL 提供者,並顯示檢查結果,包括列入的黑名單列表。

0 0 0 1
1 import dns.resolver
2
3 class DNSBLChecker:
4 def __init__(self, providers=None):
5 """
6 初始化 DNSBLChecker,允許自定義 DNSBL 提供者列表。
7 :param providers: DNSBL 提供者列表 (可選,默認為常用黑名單提供者)
8 """
9 self.providers = providers or [
10 "zen.spamhaus.org",