return blacklists
- async def is_blacklisted(self):
- logging.debug("Checking if %s is blacklisted..." % self)
-
- # Perform checks
- blacklists = { bl : self._resolve_blacklist(bl) for bl in BLOCKLISTS }
-
- # If we are blacklisted on one list, this one is screwed
- for bl in blacklists:
- code, message = await blacklists[bl]
-
- logging.debug("Response from %s is: %s (%s)" % (bl, code, message))
-
- # Exclude matches on SBLCSS
- if bl == "sbl.spamhaus.org" and code == "127.0.0.3":
- continue
-
- # Consider the host blocked for any non-zero return code
- if code:
- return True
def format_asn(asn):
network = db.get_as(asn)