skip to navigation
skip to content

Strangle 0.3.1

Library for comprehending DNS messages using BIND parsing


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)


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

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

;; QUESTION SECTION: 0       IN      A

>>> msg.flags.type
>>> msg.flags.recursionDesired
File Type Py Version Uploaded on Size
Strangle-0.3.1.tar.gz (md5, pgp) Source 2008-08-17 21KB