When i need access to such offsets i just put printfs in the libr/bin/format/*/*.c and recompile.. I'm aware of that issue, but the plan requires 'cparse' to be implemented.

cparse is on the works.. and I plan to have an initial implementation for the next release (0.9.6).

cparse will be something like 010 templates. allowing to parse C include
files to load function signature definitions, conditional structures and
so on.

This interface will allow to read and write any inspected structure in memory following the description defined by the cparse template.

We will need to work on those templates when implemented.

On 06/27/13 04:13, Adam Pridgen wrote:
Ok.  I created the several includes (r_pe.h, r_pe_specs.h, r_elf.h,
r_elf_specs.h).  I put them in my libr/include/ directory, and they seem
to work for what I need.  Is this something ( e.g. low-level access to
architecture formats) that would be useful to the radare project?

-- Adam


On Mon, Jun 24, 2013 at 9:07 PM, Adam Pridgen
<[email protected]
<mailto:[email protected]>> wrote:

    Is it possible to access binary file format specifics using the
    lib_rbin.so?  I noticed the symbols in the libr_bin.so, but the RAPI
    does not appear to support access to the underlying formats (e.g.
    PE32, PE64, etc.).

    Is this by design, or is there a way to access the formats, and then
    the specific fields or structure accessors for the defined formats.
      For example, in the PE i am trying to grab the entrypoint using
    Pe(32 || 64)_r_bin_pe_get_entrypoint.  I found the symbols in the SO
    using nm.  I also noticed some r2 internals manipulating these  the
    RBinArch structure in the RBin/RCore structures to update values for
    the binary.

    If this is not yet accessible, do you have any thoughts about how to
    go about doing this?  I was thinking of creating an include file
    called radare2/libr/r_format.h with the formats included in the
    header file, or alternatively radar2/libr/formats/<format_headers>
      for each format and RAPI for manipulating the object/format.
      Before I make any modifications to my tree, I wanted to see if
    there was an easier (or current) method for using the specific
    format RAPIs and structures.

      Thanks,

    -- Adam




_______________________________________________
radare mailing list
[email protected]
http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org


_______________________________________________
radare mailing list
[email protected]
http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org

Reply via email to