Skip to content

d4ytox/PeParser

Repository files navigation

PeParser

Object-oriented PE file parser.

Heavily inspired and based off the amazing work by mrd0x and NUL0x4C.

Coming from a background in OOP as well as low-level, I thought that the Pe Parsing could be a great C "class".

See the provided main.c in the project for a typical use case.

Installation

Copy PeParser.c and PeParser.h in your project.

You can also use the provided .sln to see an example.

See HOWTO below for typical uses.

HOWTO

Targeting a File

T_PE_PARSER PeParser;

PeParserInitialize(&PeParser);

PeParserLoadFile(&PeParser, sFileName); // where sFileName is your targeted PE file name (with full path)

PeParserPrintAll(&PeParser); // To print all headers / sections / directories

PeParserUnloadFile(&PeParser);

PeParserClean(&PeParser);

Targeting a Module Handle

T_PE_PARSER PeParser;

PeParserInitialize(&PeParser);

PeParserLoadModule(&PeParser, hModule); // where hModule is your targeted PE module pre-loaded handle

PeParserPrintFileHeader(&PeParser); // To print file header
PeParserPrintSections(&PeParser); // To print pe sections

PeParserUnloadModule(&PeParser);

PeParserClean(&PeParser);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages