Hachoir: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(update external links) |
||
Line 1: | Line 1: | ||
Hachoir is a file parser framework written in Python, features: | Hachoir is a file parser framework written in Python, features: | ||
* '''Autofix''': On error, Hachoir can automatically fix errors on buggy file or parser | * '''Autofix''': On error, Hachoir can automatically fix errors on buggy file or parser | ||
* '''Lazy''': Field value, size, description, absolute address, (...) are computed on demand | * '''Lazy''': Field value, size, description, absolute address, (...) are computed on demand | ||
* '''No arbitrary limit''': Hachoir don't have arbitrary limit: addresses can be bigger than 4 Go, an integer can be 64 bits or more, there is no field number limit, etc. | * '''No arbitrary limit''': Hachoir don't have arbitrary limit: addresses can be bigger than 4 Go, an integer can be 64 bits or more, there is no field number limit, etc. | ||
* '''Types''': Hachoir have many predefined field types: integer, string, boolean, byte array, . | * '''Types''': Hachoir have many predefined field types: integer, string, boolean, byte array, etc. | ||
* '''Bit granularity''': Size and address are in bits, so it's easy to mix fields with size in bytes or in bits | * '''Bit granularity''': Size and address are in bits, so it's easy to mix fields with size in bytes or in bits | ||
* '''Unicode''': String value are stored in Unicode (if string charset is specified) | * '''Unicode''': String value are stored in Unicode (if string charset is specified) | ||
* '''Endian''': You don't have to care about endian: you just need to set it once for the whole parser | * '''Endian''': You don't have to care about endian: you just need to set it once for the whole parser | ||
* '''No dependency''': Hachoir just needs Python 2.4 (but some frontends need more libraries) | * '''No dependency''': Hachoir just needs Python 2.4 (but some frontends need more libraries) | ||
* '''API''': Data are represented as a tree of fields where each field is a Python object | * '''API''': Data are represented as a tree of fields where each field is a Python object | ||
* '''Parser''': 30 parsers are included: JPEG picture, ZIP archive, MP3 audio, . | * '''Parser''': 30 parsers are included: JPEG picture, ZIP archive, MP3 audio, etc. | ||
* '''Guess parser''': An algorithm automatically chooses the right parser using file extension, given MIME type or using validate() function of each parser ; | * '''Guess parser''': An algorithm automatically chooses the right parser using file extension, given MIME type or using validate() function of each parser ; | ||
The tool used to be found at hachoir.org, though that has been taken over by domain squatters. The new homes are: | |||
* https://hachoir.readthedocs.io/en/latest/ | |||
* https://github.com/vstinner/hachoir | |||
[[Category:RE Tools]] | [[Category:RE Tools]] |
Latest revision as of 09:16, 7 February 2024
Hachoir is a file parser framework written in Python, features:
- Autofix: On error, Hachoir can automatically fix errors on buggy file or parser
- Lazy: Field value, size, description, absolute address, (...) are computed on demand
- No arbitrary limit: Hachoir don't have arbitrary limit: addresses can be bigger than 4 Go, an integer can be 64 bits or more, there is no field number limit, etc.
- Types: Hachoir have many predefined field types: integer, string, boolean, byte array, etc.
- Bit granularity: Size and address are in bits, so it's easy to mix fields with size in bytes or in bits
- Unicode: String value are stored in Unicode (if string charset is specified)
- Endian: You don't have to care about endian: you just need to set it once for the whole parser
- No dependency: Hachoir just needs Python 2.4 (but some frontends need more libraries)
- API: Data are represented as a tree of fields where each field is a Python object
- Parser: 30 parsers are included: JPEG picture, ZIP archive, MP3 audio, etc.
- Guess parser: An algorithm automatically chooses the right parser using file extension, given MIME type or using validate() function of each parser ;
The tool used to be found at hachoir.org, though that has been taken over by domain squatters. The new homes are: