Skip to main content

high level API to retrieve information from ELF files.

Project description

tests status code coverage

package description

the purpose of this package is to provide high level API to work with elf files.

installation

using pip

install the package by running the following command: pip install sauci-pyelf

from source

this package uses pyelftools package. if it is not already installed, install it first. once the above prerequisite is installed:

  • download the pyelf package
  • unzip it
  • move to the directory containing the setup.py file
  • run the command python setup.py install

note: the above command might require privileged access to succeed.

example of usage

the bellow code snippet shows how to load an elf file and get some of its properties.

from pyelf import ElfFile

elf = ElfFile('tests/input.elf')

# get a list of all symbols in file tests/input.elf.
symbols = elf.symbols()
assert 'symbol_uint8' in symbols

# get an instance of Symbol class for symbol named symbol_uint8.
symbol = elf.get_symbol('symbol_uint8')

# get address of symbol symbol_uint8.
assert isinstance(symbol.address, int)

# get size of symbol symbol_uint8.
assert symbol.size == 1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sauci-pyelf-0.1.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

sauci_pyelf-0.1.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file sauci-pyelf-0.1.2.tar.gz.

File metadata

  • Download URL: sauci-pyelf-0.1.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for sauci-pyelf-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ec6ebe5df21ffc164569dd2c04a45ffb16eb28ea9cd4c79eebe09985cec6798c
MD5 e5bf1257bde9113748361c2e6061f386
BLAKE2b-256 94825081cecdecc06d68149d22dfe43994af8893f1bace28fa8c196ab34dfa42

See more details on using hashes here.

File details

Details for the file sauci_pyelf-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sauci_pyelf-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for sauci_pyelf-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 77139671108cf869e1a95f2ebb818cd22f53bc445d516383ff216aff671dd2bf
MD5 e83f976841d744ede3042bcfb1fc4e5e
BLAKE2b-256 29ecbbe24a0cb7671ddba8aae1d9ebaf32ef71ce9a2b74363ada8764c24e27fe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page