Skip to main content

Library for comprehending DNS messages using BIND parsing

Project description

Summary

Strangle is BIND for Python: a Python library for parsing DNS messages using libbind. Strangle allows you to see DNS messages in two ways:

  • Direct access to the libbind parsing functions (C-style)

  • A Python object with various meaningful attributes (OO-style)

Demo

Here is an example of how simple it is to parse DNS messages:

>>> import Strangle
>>> msgFile = file("test/data/www.microsoft.com-query")
>>> msg = Strangle.DNSMessage(msgFile)
>>> msg.id
47096
>>> print msg
ID     : 47096
Headers:
  Type               : question
  Opcode             : 0
  Authoritative      : False
  Truncated          : False
  Recursion Desired  : True
  Recursion Available: False
  Response Code      : 0

;; QUESTION SECTION:
www.microsoft.com.nsatc.net 0       IN      A

>>> msg.flags.type
'question'
>>> msg.flags.recursionDesired
True

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

Strangle-0.3.1.tar.gz (22.0 kB view details)

Uploaded Source

File details

Details for the file Strangle-0.3.1.tar.gz.

File metadata

  • Download URL: Strangle-0.3.1.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Strangle-0.3.1.tar.gz
Algorithm Hash digest
SHA256 939c5bb1a215a0e57a29e6f719d5d6f5ac203d6d97b3f04f847d128290d26222
MD5 32610eea50d906d78e3e3dc74902f63d
BLAKE2b-256 aa9227cb0a291f3ef9b6da94f989f32fbd1fced6eca058a7042caf1d4ef742f8

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