Skip to content

Convert the C header format file exported from IDA Pro's local type into a custom Python dictionary format for easy reading in Python.

License

Notifications You must be signed in to change notification settings

risuxx/Cheader2PythonDict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Cheader2PythonDict

Convert the C header format file exported from IDA Pro's local type into a custom Python dictionary format for easy reading in Python.

example

The content of C header format file exported from IDA Pro is as follows:

struct EFI_HII_DATE
{
  UINT16 Year;
  UINT8 Month;
  UINT8 Day;
};

We should convert it to the python dictionary as follows:

{'EFI_HII_DATE':[32, ['Year', 'Month', 'Day']], 'Year':[16, []], 'Month':[8, []], 'Day':[8, []]}

In this Python dictionary, the key represents the name of a field in a structure or a struct, and the value is a two-dimensional list. The first element indicates the length of the field, i.e., the amount of space it occupies, while the second element lists the fields in the structure.

About

Convert the C header format file exported from IDA Pro's local type into a custom Python dictionary format for easy reading in Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published