Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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


Release history Release notifications

Download files

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

Files for Strangle, version 0.3.1
Filename, size File type Python version Upload date Hashes
Filename, size Strangle-0.3.1.tar.gz (22.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page