Skip to main content

A DNS lookup plugin for Sopel IRC bots

Project description

sopel-dns

A DNS lookup plugin for Sopel IRC bots

Installing

Releases are hosted on PyPI, so after installing Sopel, all you need is pip:

$ pip install sopel-dns

Requirements

  • Python 3.8+
  • Sopel 8.0+
  • dnspython 2.x

Usage

Basic usage performs an 'A' record lookup:

<user> .dns domain.tld
<bot>  user: 10.10.0.1

To look up IPv6 addresses instead, specify the 'AAAA' record type:

<user> .dns domain.tld AAAA
<bot>  user: fd12:3456:789a:1::1

Other supported record types output their results in a similar fashion. Some types, such as MX and TXT, split the output across multiple lines to make it easier to read, at the cost of possible "spam" if there are many records attached to the queried domain.

Rate limiting

Normal users are rate-limited to one .dns command every 2 minutes, both to control channel flood and to prevent hammering whatever DNS server Sopel's host system uses to resolve the submitted queries.

Supported DNS record types

  • A
  • AAAA
  • CNAME
  • MX
  • NS
  • PTR
  • TXT

If a record type you want isn't listed here, feel free to request it in an issue. Even better: a pull request enabling that record type, including a demo of the resulting output.

Changelog

0.5.0

Added:

  • Rate limit feedback indicating how much time is left in cooldown (#3)

Changed:

  • Require Sopel 8.0+

Meta:

  • Converted to modern package style, setup.cfgpyproject.toml
  • Automated releases with GitHub Actions + PyPI Trusted Publishing
  • Reworked NEWS file to match the README's style of Markdown

0.4.0

Now requires Sopel 7.1, but also works on (upcoming) Sopel 8.0.

0.3.1

Tightened dnspython requirement vs. Sopel's own. This plugin now requires Python 3.6+ (because that's what dnspython 2.x supports).

0.3.0

Added [dns] output prefix. This also meant changing most of the plugin's output from replies to normal "say", which is fine. The flood of HLs from looking up stuff like MX or TXT records could get annoying.

Rate limit has been reduced from 5 minutes to 2 minutes.

0.2.1

Fixed error when a DNS query has no answer (no results).

0.2.0

Added support for choosing DNS record type to look up. Currently understands A, AAAA, CNAME, MX, NS, PTR (for IP addresses only), and TXT.

0.1.0

Initial release with support for querying a domain's A records.

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

sopel_dns-0.5.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

sopel_dns-0.5.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file sopel_dns-0.5.0.tar.gz.

File metadata

  • Download URL: sopel_dns-0.5.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.7

File hashes

Hashes for sopel_dns-0.5.0.tar.gz
Algorithm Hash digest
SHA256 cd1cd634e9427e6b482f77392643e3af59b14f0874344b48cc9793611b1ef59e
MD5 fe84c94c5bb9b07d1dd80f2c5098d24e
BLAKE2b-256 2a25767108be8c21a8d4f70835eb0c0ffd50dab68a24c59d7495887cece1fbee

See more details on using hashes here.

File details

Details for the file sopel_dns-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: sopel_dns-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.7

File hashes

Hashes for sopel_dns-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 abf4b4ed1c05fb1f0ac7cc8c80ef97ae1cb2a50c4ca103c8f0bc929d27879b6b
MD5 32d09cf9b7aecb7e10f2a41743c073d7
BLAKE2b-256 4f8aad3424e9b257e9f14c93257ab4f5f1260d2c4e3e357e02a2583fcc48498a

See more details on using hashes here.

Supported by

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