All Projects → dmippolitov → Pydnsbl

dmippolitov / Pydnsbl

Licence: mit
Async dnsbl spam lists checker based on asyncio/aiodns.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pydnsbl

Nginx Cleantalk Service
LUA configuration to filter any POST requests.
Stars: ✭ 13 (-27.78%)
Mutual labels:  blacklist, spam
Jamspymer
SMS, Call, Mail, Telegram бомбер с открытым исходным кодом
Stars: ✭ 95 (+427.78%)
Mutual labels:  mail, spam
Postfwd Anti Geoip Spam Plugin
Postfwd plugin for blocking international spam botnets based on geographical location of IP addresses used to login to postfix via sasl.
Stars: ✭ 40 (+122.22%)
Mutual labels:  mail, spam
unlister
📬 Script for Mail on macOS that automatically unsubscribes from promotional emails and newsletters
Stars: ✭ 33 (+83.33%)
Mutual labels:  spam, mail
Sisyphus
Intelligent Junk Mail Handler
Stars: ✭ 76 (+322.22%)
Mutual labels:  mail, spam
is-biz-mail-php
isBizMail tells you whether a given email address belongs to a free email account provider (gmail.com, yahoo.es, yandex.ru etc) or not.
Stars: ✭ 19 (+5.56%)
Mutual labels:  mail, blacklist
Laravel Honeypot
Preventing spam submitted through forms
Stars: ✭ 728 (+3944.44%)
Mutual labels:  spam
Laravel Mailbox
Catch incoming emails in your Laravel application
Stars: ✭ 783 (+4250%)
Mutual labels:  mail
Skinny Framework
🚝 "Scala on Rails" - A full-stack web app framework for rapid development in Scala
Stars: ✭ 719 (+3894.44%)
Mutual labels:  mail
Awaitkit
The ES8 Async/Await control flow for Swift
Stars: ✭ 709 (+3838.89%)
Mutual labels:  async
Foxcross
AsyncIO serving for data science models
Stars: ✭ 18 (+0%)
Mutual labels:  async
Ws Promise Client
PROJECT MOVED: https://github.com/kdex/ws-promise
Stars: ✭ 6 (-66.67%)
Mutual labels:  async
Klein
werkzeug + twisted.web
Stars: ✭ 770 (+4177.78%)
Mutual labels:  async
Riker
Easily build efficient, highly concurrent and resilient applications. An Actor Framework for Rust.
Stars: ✭ 745 (+4038.89%)
Mutual labels:  async
Netcoreserver
Ultra fast and low latency asynchronous socket server & client C# .NET Core library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
Stars: ✭ 799 (+4338.89%)
Mutual labels:  async
Fastapi Users
Ready-to-use and customizable users management for FastAPI
Stars: ✭ 713 (+3861.11%)
Mutual labels:  async
Node Procedural Async
Write procedural style code that runs asynchronously. It may look synchronous, but it's not!
Stars: ✭ 17 (-5.56%)
Mutual labels:  async
Seastar
High performance server-side application framework
Stars: ✭ 6,328 (+35055.56%)
Mutual labels:  async
Recoil
Asynchronous coroutines for PHP 7.
Stars: ✭ 765 (+4150%)
Mutual labels:  async
Node Dkim Key
DKIM (DomainKeys Identified Mail) Key
Stars: ✭ 5 (-72.22%)
Mutual labels:  mail

Pydnsbl

Async dnsbl lists checker based on asyncio/aiodns. Checks if ip is listed in anti-spam dns blacklists. Multiple dns blacklists supported. Use aiodns for async dns requests. Usually ip check run for 50+ lists takes less than one second. Also allow to check domains.

Installation

pip intall pydnsbl

Requirements

  • python >= 3.5
  • aiodns

Usage

Check ip

>>> import pydnsbl
>>> ip_checker = pydnsbl.DNSBLIpChecker()
>>> ip_checker.check('8.8.8.8')
<DNSBLResult: 8.8.8.8  (0/52)>
>>> ip_checker.check('68.128.212.240')
<DNSBLResult: 68.128.212.240 [BLACKLISTED] (6/52)>

Check domain

>>> import pydnsbl
>>> domain_checker = pydnsbl.DNSBLDomainChecker()
>>> domain_checker.check('google.com')
<DNSBLResult: google.com  (0/4)>
>>> domain_checker.check('belonging708-info.xyz')
<DNSBLResult: belonging708-info.xyz [BLACKLISTED] (2/4)>

DNSBLResult properties

  • DNSBLResult.addr - ip address or domain that was checked
  • DNSBLResult.blacklisted - boolean, True if ip/domain detected by at least one provider
  • DNSBLResult.detected_by - dictionary containing providers hosts detected this ip/domain as keys and their category verdicts
  • DNSBLResult.categories - combined categories from all providers for this ip/domain
  • DNSBLResult.providers - list of providers that was performing the check
  • DNSBLResult.failed_providers - list of providers that was unable to check this ip properly (possibly provider was down)
>>> result = domain_checker.check('belonging708-info.xyz')
>>> result.addr
'belonging708-info.xyz'
>>> result.blacklisted
True
>>> result.detected_by
{'multi.surbl.org': ['unknown'], 'dbl.spamhaus.org': ['spam']}
>>> result.categories
{'unknown', 'spam'}
>>> result.providers
[<Provider: uribl.spameatingmonkey.net>, <Provider: multi.surbl.org>, <Provider: rhsbl.sorbs.net >, <Provider: dbl.spamhaus.org>]
>>> result.failed_providers
[]

Extending/overriding providers

Basic

 
from pydnsbl import DNSBLIpChecker, providers
from pydnsbl.providers import BASE_PROVIDERS, Provider
providers = BASE_PROVIDERS + [Provider('yourprovider1.com'), ...]
checker = DNSBLIpChecker(providers=providers)

Advanced

Take a look into providers.py file.

  • Use Provider class to create your custom providers.
  • Override process_response method of Provider class to map providers response codes (127.0.0.x) to DNSBL categories.

Contact

Feel free to contact me: ippolitov87 at gmail.com

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].