idstools.util module

Module for utility functions that don’t really fit anywhere else.

idstools.util.decode_inet_addr(addr)[source]
idstools.util.format_printable(data)[source]

Given a buffer, return a string with the printable characters. A ‘.’ will be used for all non-printable characters.

idstools.util.md5_hexdigest(filename)[source]

Compute the MD5 checksum for the contents of the provided filename.

Parameters:filename – Filename to computer MD5 checksum of.
Returns:A string representing the hex value of the computed MD5.
idstools.util.mktempdir(delete_on_exit=True)[source]

Create a temporary directory that is removed on exit.