Skip to main content

Asynchronous dnsbl client module and CLI utility

Project description

async-dnsbl-client

Asynchronous dnsbl client

Install

pip3 install async-dnsbl-client

or

pip3 install git+https://github.com/yaroslaff/async-dnsbl-client

CLI usage:

$ adnsbl.py 117.207.230.178 
dnsbl.sorbs.net
dul.dnsbl.sorbs.net
spam.dnsbl.sorbs.net
zen.spamhaus.org
noptr.spamrats.com
b.barracudacentral.org
web.dnsbl.sorbs.net
pbl.spamhaus.org

# or with hostname
$ bin/adnsbl.py gmail-smtp-in.l.google.com

you may remove some DNSBL from checklist with -r/--remove: -r dnsbl.sorbs.net dul.dnsbl.sorbs.net, or add new DNSBL zones same way with -a/--append.

adnsbl.py exit code is 0 if host isn't blacklisted anywhere, and 1 otherwise.

Usage in your python code

See adnsbl.py sources, it's simple.

import asyncio
import async_dnsbl_client

result = asyncio.run(async_dnsbl_client.dnsbl('gmail-smtp-in.l.google.com'))

Why not adns?

There is already python3 adns support in python3-adns package. But it crashes on ARM machines (such as Raspberri Pi (arch: armv7l) and Oracle Ampere A1 (arch: aarch64)). (maybe you know why?)

>>> import adns
>>> adns.init()
Segmentation fault (core dumped)

on 'normal' amd64 it works fine,

async-dnsbl-client works fine on ARM machines (), checking host in 53 blacklists in 0.127s (fastest).

See also

This project uses aiodns package

pydnsbl - more mature package, looks more powerful, same fast. (But I need my project because sometimes simpler is better)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

async_dnsbl_client-0.0.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

async_dnsbl_client-0.0.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file async_dnsbl_client-0.0.3.tar.gz.

File metadata

  • Download URL: async_dnsbl_client-0.0.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.2

File hashes

Hashes for async_dnsbl_client-0.0.3.tar.gz
Algorithm Hash digest
SHA256 24f6385db4d1597c64b8fe6e05a2b2b764da218f3f3b06490ce35286302bd3cf
MD5 2ac374f61e562494ec60bc6b213b49b9
BLAKE2b-256 10e9645d4a26447c2ba0332f7bb336ddf9313e1c10bfe94124c65526693e24cd

See more details on using hashes here.

File details

Details for the file async_dnsbl_client-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for async_dnsbl_client-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ba4483b7994b286a37e1dce9c36dc8b7cb61dc4d1103fe79cfcb4b1f347ffe70
MD5 2b2a37b7f8b82d2182ae51c9fa0bd545
BLAKE2b-256 d88127a37878fb3bb5e5af0aca4628c8764766bce9516a87e16bc6d83aa68638

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page