LIEF: Library to Instrument Executable Formats Version 2.0.0
Loading...
Searching...
No Matches
LIEF::Parser Class Reference

Main interface to parse an executable regardless of its format. More...

#include <Parser.hpp>

Inheritance diagram for LIEF::Parser:

Static Public Member Functions

static std::unique_ptr< Binaryparse (std::string_view filename)
 Construct an LIEF::Binary from the given filename.
template<class PathT, enable_if_path_t< PathT > = 0>
static std::unique_ptr< Binaryparse (const PathT &filename)
 Same as parse(std::string_view) but the file is given as a std::filesystem::path.
static std::unique_ptr< Binaryparse (const std::vector< uint8_t > &raw)
 Construct an LIEF::Binary from the given raw data.
static std::unique_ptr< Binaryparse (std::unique_ptr< BinaryStream > stream)
 Construct an LIEF::Binary from the given stream.

Detailed Description

Main interface to parse an executable regardless of its format.

Member Function Documentation

◆ parse() [1/4]

template<class PathT, enable_if_path_t< PathT > = 0>
std::unique_ptr< Binary > LIEF::Parser::parse ( const PathT & filename)
inlinestatic

Same as parse(std::string_view) but the file is given as a std::filesystem::path.

References parse().

◆ parse() [2/4]

std::unique_ptr< Binary > LIEF::Parser::parse ( const std::vector< uint8_t > & raw)
static

Construct an LIEF::Binary from the given raw data.

Warning
If the target file is a FAT Mach-O, it will return the last one
See also
LIEF::MachO::Parser::parse

◆ parse() [3/4]

std::unique_ptr< Binary > LIEF::Parser::parse ( std::string_view filename)
static

Construct an LIEF::Binary from the given filename.

Warning
If the target file is a FAT Mach-O, it will return the last one
See also
LIEF::MachO::Parser::parse

Referenced by parse().

◆ parse() [4/4]

std::unique_ptr< Binary > LIEF::Parser::parse ( std::unique_ptr< BinaryStream > stream)
static

Construct an LIEF::Binary from the given stream.

Warning
If the target file is a FAT Mach-O, it will return the last one
See also
LIEF::MachO::Parser::parse

The documentation for this class was generated from the following file: