Elf and PE file parser

PelfParser

PelfParser is a very simple C++ library for parsing Windows portable executable files and Executable and Linkable Format files, it only supports x86_64 files for now.

Thi project is under active development

Usage example

auto elf = pelf::createPelf<pelf::Elf>();
auto pe = pelf::createPelf<pelf::Pe>();


/* Parse an ELF file */
auto check_error = elf->parse("Path/to/elf/file");

if (check_error != pelf::ErrorCode::NO_ERROR)
    /* Handle error */

/* Parse a PE file*/
check_error = pe->parse("Path/to/pe/file");

if (check_error != pelf::ErrorCode::NO_ERROR)
    /* Handle error */

/* Example of getting sections headers table */
auto sections_headers = elf->getSectionsHeaders();
/* Getting the COFF header of the PE file */
auto coff_header = pe->getCoffHeader();

/* Iterating over the sections headers table and printing sh_flags*/
for (auto& section: sections_headers){
    std::cout << std::hex << section.sh_flags << std::endl;
}

/* Get sections from an ELF file */
auto sections = elf->getSections();

/* Iterate over the sections and print the sections name  */
for (auto& section: sections){
    std::cout << section.getName() << std::endl;
}


Similar Resources

Tiny command-line parser for C / C++

tinyargs Another commandline argument parser for C / C++. This one is tiny, source only, and builds cleanly with -Wall -pedantic under C99 and C++11 o

Aug 22, 2022

A math parser made in 1 hour using copilot.

An entire math parser made with Copilot Copilot wrote 91% of the code in this, amazing isn't it? It supports all normal mathematical expressions excep

Dec 7, 2021

An extremely fast FEC filing parser written in C

FastFEC A C program to stream and parse FEC filings, writing output to CSV. This project is in early stages but works on a wide variety of filings and

Nov 3, 2022

JSONes - c++ json parser & writer. Simple api. Easy to use.

JSONes Just another small json parser and writer. It has no reflection or fancy specs. It is tested with examples at json.org Only standart library. N

Dec 28, 2021

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.

Nov 29, 2022

The KISS file manager: CLI-based, ultra-lightweight, lightning fast, and written in C

 The KISS file manager: CLI-based, ultra-lightweight, lightning fast, and written in C

CliFM is a CLI-based, shell-like (non-curses) and KISS terminal file manager written in C: simple, fast, and lightweight as hell

Nov 22, 2022

Display file contents in hexadecimal and ASCII

The xdump utility is a filter which displays the specified file, or standard input if no file is specified, in hexadecimal and ASCII format. It works like hexdump -C by default.

Jul 23, 2022

n³ The unorthodox terminal file manager

n³ The unorthodox terminal file manager

n³ The unorthodox terminal file manager

Nov 30, 2022

A Windows Shell Extension for the Pixar USD file format.

Activision USD Shell Extension A Windows Shell Extension for the Pixar USD file format. Windows Explorer Features Hydra Realtime Preview Thumbnails Co

Nov 27, 2022
Related tags
A parser for InnoDB file formats

Introduction Inno_space is a parser for InnoDB file formats. It parse the .ibd file to human readable format. The origin idea come from Jeremy Cole's

Nov 28, 2022
A simple parser for the PBRT file format
A simple parser for the PBRT file format

PBRT-Parser (V1.1) The goal of this project is to provide a free (apache-lincensed) open source tool to easily (and quickly) load PBRT files (such as

Nov 30, 2022
A simple header-only C++ argument parser library. Supposed to be flexible and powerful, and attempts to be compatible with the functionality of the Python standard argparse library (though not necessarily the API).

args Note that this library is essentially in maintenance mode. I haven't had the time to work on it or give it the love that it deserves. I'm not add

Dec 2, 2022
CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.
CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.

CLI11: Command line parser for C++11 What's new • Documentation • API Reference CLI11 is a command line parser for C++11 and beyond that provides a ri

Nov 28, 2022
A simple header-only C++ argument parser library. Supposed to be flexible and powerful, and attempts to be compatible with the functionality of the Python standard argparse library (though not necessarily the API).

args Note that this library is essentially in maintenance mode. I haven't had the time to work on it or give it the love that it deserves. I'm not add

Aug 31, 2021
A simple to use, composable, command line parser for C++ 11 and beyond

Clara v1.1.5 !! This repository is unmaintained. Go here for a fork that is somewhat maintained. !! A simple to use, composable, command line parser f

Nov 28, 2022
A simple to use, composable, command line parser for C++ 11 and beyond

Lyra A simple to use, composing, header only, command line arguments parser for C++ 11 and beyond. Obtain License Standards Stats Tests License Distri

Nov 29, 2022
Lightweight C++ command line option parser

Release versions Note that master is generally a work in progress, and you probably want to use a tagged release version. Version 3 breaking changes I

Nov 25, 2022
Argument Parser for Modern C++
Argument Parser for Modern C++

Highlights Single header file Requires C++17 MIT License Quick Start Simply include argparse.hpp and you're good to go. #include <argparse/argparse.hp

Dec 1, 2022
⛳ Simple, extensible, header-only C++17 argument parser released into the public domain.

⛳ flags Simple, extensible, header-only C++17 argument parser released into the public domain. why requirements api get get (with default value) posit

Oct 25, 2022