Home | Trees | Indices | Help |
|
---|
|
Base class for structure blocks in binary parsing. A block is associated with a offset into a byte-string.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Constructor. Arguments: - `buf`: Byte string containing stuff to parse. - `offset`: The offset into the buffer at which the block starts.
|
repr(x)
|
str(x)
|
Declaratively add fields to this block. This method will dynamically add corresponding offset and unpacker methods to this block. Arguments: - `type`: A string. Should be one of the unpack_* types. - `name`: A string. - `offset`: A number. - `length`: (Optional) A number. For (w)strings, length in chars. |
Returns a little-endian unsigned byte from the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a little-endian signed byte from the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a little-endian unsigned WORD (2 bytes) from the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a big-endian unsigned WORD (2 bytes) from the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a little-endian signed WORD (2 bytes) from the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Applies the little-endian WORD (2 bytes) to the relative offset. Arguments: - `offset`: The relative offset from the start of the block. - `word`: The data to apply. |
Returns a little-endian DWORD (4 bytes) from the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a big-endian DWORD (4 bytes) from the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a little-endian signed integer (4 bytes) from the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a little-endian QWORD (8 bytes) from the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a little-endian signed 64-bit integer (8 bytes) from the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a single-precision float (4 bytes) from the relative offset. IEEE 754 format. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a double-precision float (8 bytes) from the relative offset. IEEE 754 format. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns raw binary data from the relative offset with the given length. Arguments: - `offset`: The relative offset from the start of the block. - `length`: The length of the binary blob. If zero, the empty string zero length is returned. Throws: - `OverrunBufferException` |
Returns a string from the relative offset with the given length. Arguments: - `offset`: The relative offset from the start of the block. - `length`: The length of the string. Throws: - `OverrunBufferException` |
Returns a string from the relative offset with the given length, where each character is a wchar (2 bytes) Arguments: - `offset`: The relative offset from the start of the block. - `length`: The length of the string. Throws: - `UnicodeDecodeError` |
Returns a datetime from the DOSDATE and DOSTIME starting at the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a datetime from the QWORD Windows timestamp starting at the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a datetime from the QWORD Windows SYSTEMTIME timestamp starting at the relative offset. See http://msdn.microsoft.com/en-us/library/ms724950%28VS.85%29.aspx Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Returns a string containing a GUID starting at the relative offset. Arguments: - `offset`: The relative offset from the start of the block. Throws: - `OverrunBufferException` |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri May 31 00:38:25 2013 | http://epydoc.sourceforge.net |