bin2struct | Convert binary of C struct into readable text

 by   iamyb Python Version: Current License: No License

kandi X-RAY | bin2struct Summary

kandi X-RAY | bin2struct Summary

bin2struct is a Python library. bin2struct has no bugs, it has no vulnerabilities and it has low support. However bin2struct build file is not available. You can download it from GitHub.

bin2struct is a utility to convert binary memory dump of c data structure to readable text, with annotated structure field's name for every line of data. It uses pyelftools to parse ELF target and extract the structure member information(like location, size and name of leaf node of one structure) from DWARF. Therefore, you must specify necessary compiler flag to build your target to have the dwarf contained in your target, like '-g' in the gcc. pyelftools is also modified a bit to improve the performance of type extracting for large ELF target. Compile below c source code and execute the target, you will get one target file "test.out" and one dump file "test.bin". $gcc -g test.c -o test.out $./test.out. with those two files, you can use below command. $python bts.py -t test.out -s sdef -b test.bin -o test.txt.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              bin2struct has a low active ecosystem.
              It has 3 star(s) with 0 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              bin2struct has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of bin2struct is current.

            kandi-Quality Quality

              bin2struct has 0 bugs and 0 code smells.

            kandi-Security Security

              bin2struct has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              bin2struct code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              bin2struct does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              bin2struct releases are not available. You will need to build from source code and install.
              bin2struct has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              It has 8777 lines of code, 776 functions and 83 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed bin2struct and discovered the below as its top functions. This is intended to give you an instant insight into bin2struct implemented functionality, and help decide if they suit your requirements.
            • Print the version information
            • Iterator over all sections
            • Describe version flags
            • Get a section by n
            • Display the program headers
            • Describe p_type
            • Describe the p flags
            • Return an iterator over all the segments
            • Process an ELF file
            • Return DWARFInfo
            • Identify the file
            • Parses PascalCase field
            • Creates the structs
            • Create a string representation of a string
            • Greedy range
            • Import extra information from the DIE
            • Create the structs
            • Display the symbol tables
            • Display section headers
            • Display the Relocation section
            • Return a dict of DWARFInfo
            • Display the file header
            • Parse a DIE
            • Display a string representation of a section
            • Iterate over the symbols in the segment
            • Display dynamic tags
            • Display a hexdump of a section
            Get all kandi verified functions for this library.

            bin2struct Key Features

            No Key Features are available at this moment for bin2struct.

            bin2struct Examples and Code Snippets

            No Code Snippets are available at this moment for bin2struct.

            Community Discussions

            No Community Discussions are available at this moment for bin2struct.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install bin2struct

            You can download it from GitHub.
            You can use bin2struct like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            Support DWARF2, DWARF3, DWARF4 format, only test on x86_64 with gccSupport base types, pointer types, enum, arrays, volatile type and nest of those.Other types like bit fields not added yet.Other platform may need additional effort as pyelftools limitation.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/iamyb/bin2struct.git

          • CLI

            gh repo clone iamyb/bin2struct

          • sshUrl

            git@github.com:iamyb/bin2struct.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link