mirror of
https://github.com/QuasarApp/LIEF.git
synced 2025-04-27 04:44:31 +00:00
Cleanup PE headers
This commit is contained in:
parent
957929348b
commit
8872b85fc7
@ -18,38 +18,36 @@
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include "LIEF/Abstract/Binary.hpp"
|
||||
#include <vector>
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
namespace LIEF {
|
||||
class LIEF_API Parser
|
||||
{
|
||||
class Binary;
|
||||
class LIEF_API Parser {
|
||||
public:
|
||||
//! @brief Construct an LIEF::Binary from the given filename
|
||||
//!
|
||||
//! @warning If the target file is a FAT Mach0, it will
|
||||
//! return the **last** one
|
||||
//! @see LIEF::MachO::Parser::parse
|
||||
static std::unique_ptr<Binary> parse(const std::string& filename);
|
||||
//! @brief Construct an LIEF::Binary from the given filename
|
||||
//!
|
||||
//! @warning If the target file is a FAT Mach0, it will
|
||||
//! return the **last** one
|
||||
//! @see LIEF::MachO::Parser::parse
|
||||
static std::unique_ptr<Binary> parse(const std::string& filename);
|
||||
|
||||
|
||||
//! @brief Construct an LIEF::Binary from the given raw data
|
||||
//!
|
||||
//! @warning If the target file is a FAT Mach0, it will
|
||||
//! return the **last** one
|
||||
//! @see LIEF::MachO::Parser::parse
|
||||
static std::unique_ptr<Binary> parse(const std::vector<uint8_t>& raw, const std::string& name = "");
|
||||
//! @brief Construct an LIEF::Binary from the given raw data
|
||||
//!
|
||||
//! @warning If the target file is a FAT Mach0, it will
|
||||
//! return the **last** one
|
||||
//! @see LIEF::MachO::Parser::parse
|
||||
static std::unique_ptr<Binary> parse(const std::vector<uint8_t>& raw, const std::string& name = "");
|
||||
|
||||
protected:
|
||||
Parser(const std::string& file);
|
||||
uint64_t binary_size_;
|
||||
std::string binary_name_;
|
||||
|
||||
~Parser(void);
|
||||
Parser(void);
|
||||
Parser(const std::string& file);
|
||||
uint64_t binary_size_;
|
||||
std::string binary_name_;
|
||||
|
||||
~Parser(void);
|
||||
Parser(void);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -24,51 +24,50 @@ namespace LIEF {
|
||||
class LIEF_API Relocation : public Object {
|
||||
|
||||
public:
|
||||
//! @brief Default CTOR
|
||||
Relocation(void);
|
||||
//! @brief Default CTOR
|
||||
Relocation(void);
|
||||
|
||||
//! @brief CTOR from relocation's address and size
|
||||
Relocation(uint64_t address, uint8_t size);
|
||||
//! @brief CTOR from relocation's address and size
|
||||
Relocation(uint64_t address, uint8_t size);
|
||||
|
||||
virtual ~Relocation(void);
|
||||
virtual ~Relocation(void);
|
||||
|
||||
Relocation& operator=(const Relocation&);
|
||||
Relocation(const Relocation&);
|
||||
void swap(Relocation& other);
|
||||
Relocation& operator=(const Relocation&);
|
||||
Relocation(const Relocation&);
|
||||
void swap(Relocation& other);
|
||||
|
||||
//! @brief Relocation's Address
|
||||
virtual uint64_t address(void) const;
|
||||
//! @brief Relocation's Address
|
||||
virtual uint64_t address(void) const;
|
||||
|
||||
//! @brief Relocation size in **bits**
|
||||
virtual size_t size(void) const;
|
||||
//! @brief Relocation size in **bits**
|
||||
virtual size_t size(void) const;
|
||||
|
||||
virtual void address(uint64_t address);
|
||||
virtual void size(size_t size);
|
||||
virtual void address(uint64_t address);
|
||||
virtual void size(size_t size);
|
||||
|
||||
//! @brief Method so that the ``visitor`` can visit us
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
//! @brief Method so that the ``visitor`` can visit us
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
bool operator==(const Relocation& rhs) const;
|
||||
bool operator!=(const Relocation& rhs) const;
|
||||
bool operator==(const Relocation& rhs) const;
|
||||
bool operator!=(const Relocation& rhs) const;
|
||||
|
||||
//! @brief Comparaison based on the Relocation's **address**
|
||||
virtual bool operator<(const Relocation& rhs) const;
|
||||
//! @brief Comparaison based on the Relocation's **address**
|
||||
virtual bool operator<(const Relocation& rhs) const;
|
||||
|
||||
//! @brief Comparaison based on the Relocation's **address**
|
||||
virtual bool operator<=(const Relocation& rhs) const;
|
||||
//! @brief Comparaison based on the Relocation's **address**
|
||||
virtual bool operator<=(const Relocation& rhs) const;
|
||||
|
||||
//! @brief Comparaison based on the Relocation's **address**
|
||||
virtual bool operator>(const Relocation& rhs) const;
|
||||
//! @brief Comparaison based on the Relocation's **address**
|
||||
virtual bool operator>(const Relocation& rhs) const;
|
||||
|
||||
//! @brief Comparaison based on the Relocation's **address**
|
||||
virtual bool operator>=(const Relocation& rhs) const;
|
||||
//! @brief Comparaison based on the Relocation's **address**
|
||||
virtual bool operator>=(const Relocation& rhs) const;
|
||||
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const Relocation& entry);
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const Relocation& entry);
|
||||
|
||||
protected:
|
||||
uint64_t address_;
|
||||
uint8_t size_;
|
||||
// type_;
|
||||
uint64_t address_;
|
||||
uint8_t size_;
|
||||
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/types.hpp"
|
||||
@ -28,80 +27,79 @@
|
||||
namespace LIEF {
|
||||
class LIEF_API Section : public Object {
|
||||
public:
|
||||
static constexpr size_t npos = -1;
|
||||
|
||||
static constexpr size_t npos = -1;
|
||||
Section(void);
|
||||
Section(const std::string& name);
|
||||
|
||||
Section(void);
|
||||
Section(const std::string& name);
|
||||
virtual ~Section(void);
|
||||
|
||||
virtual ~Section(void);
|
||||
Section& operator=(const Section&);
|
||||
Section(const Section&);
|
||||
|
||||
Section& operator=(const Section&);
|
||||
Section(const Section&);
|
||||
//! @brief section's name
|
||||
virtual const std::string& name(void) const;
|
||||
|
||||
//! @brief section's name
|
||||
virtual const std::string& name(void) const;
|
||||
//! @brief section's content
|
||||
virtual std::vector<uint8_t> content(void) const;
|
||||
|
||||
//! @brief section's content
|
||||
virtual std::vector<uint8_t> content(void) const;
|
||||
//! @brief section's size (size in the binary)
|
||||
virtual void size(uint64_t size);
|
||||
|
||||
//! @brief section's size (size in the binary)
|
||||
virtual void size(uint64_t size);
|
||||
//! @brief section's size (size in the binary)
|
||||
virtual uint64_t size(void) const;
|
||||
|
||||
//! @brief section's size (size in the binary)
|
||||
virtual uint64_t size(void) const;
|
||||
//! @brief offset in the binary
|
||||
virtual uint64_t offset(void) const;
|
||||
|
||||
//! @brief offset in the binary
|
||||
virtual uint64_t offset(void) const;
|
||||
//! @brief Address where the section should be mapped
|
||||
virtual uint64_t virtual_address(void) const;
|
||||
|
||||
//! @brief Address where the section should be mapped
|
||||
virtual uint64_t virtual_address(void) const;
|
||||
virtual void virtual_address(uint64_t virtual_address);
|
||||
|
||||
virtual void virtual_address(uint64_t virtual_address);
|
||||
//! @brief Set the section's name
|
||||
virtual void name(const std::string& name);
|
||||
|
||||
//! @brief Set the section's name
|
||||
virtual void name(const std::string& name);
|
||||
//! @brief Set section content
|
||||
virtual void content(const std::vector<uint8_t>& data);
|
||||
|
||||
//! @brief Set section content
|
||||
virtual void content(const std::vector<uint8_t>& data);
|
||||
virtual void offset(uint64_t offset);
|
||||
|
||||
virtual void offset(uint64_t offset);
|
||||
//! @brief Section's entropy
|
||||
double entropy(void) const;
|
||||
|
||||
//! @brief Section's entropy
|
||||
double entropy(void) const;
|
||||
// Search functions
|
||||
// ================
|
||||
size_t search(uint64_t integer, size_t pos, size_t size) const;
|
||||
size_t search(const std::vector<uint8_t>& pattern, size_t pos = 0) const;
|
||||
size_t search(const std::string& pattern, size_t pos = 0) const;
|
||||
size_t search(uint64_t integer, size_t pos = 0) const;
|
||||
|
||||
// Search functions
|
||||
// ================
|
||||
size_t search(uint64_t integer, size_t pos, size_t size) const;
|
||||
size_t search(const std::vector<uint8_t>& pattern, size_t pos = 0) const;
|
||||
size_t search(const std::string& pattern, size_t pos = 0) const;
|
||||
size_t search(uint64_t integer, size_t pos = 0) const;
|
||||
// Search all functions
|
||||
// ====================
|
||||
std::vector<size_t> search_all(uint64_t v, size_t size) const;
|
||||
|
||||
// Search all functions
|
||||
// ====================
|
||||
std::vector<size_t> search_all(uint64_t v, size_t size) const;
|
||||
std::vector<size_t> search_all(uint64_t v) const;
|
||||
|
||||
std::vector<size_t> search_all(uint64_t v) const;
|
||||
std::vector<size_t> search_all(const std::string& v) const;
|
||||
|
||||
std::vector<size_t> search_all(const std::string& v) const;
|
||||
//! @brief Method so that the ``visitor`` can visit us
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
//! @brief Method so that the ``visitor`` can visit us
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
bool operator==(const Section& rhs) const;
|
||||
bool operator!=(const Section& rhs) const;
|
||||
|
||||
bool operator==(const Section& rhs) const;
|
||||
bool operator!=(const Section& rhs) const;
|
||||
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const Section& entry);
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const Section& entry);
|
||||
|
||||
protected:
|
||||
std::string name_;
|
||||
uint64_t virtual_address_;
|
||||
uint64_t size_;
|
||||
uint64_t offset_;
|
||||
std::string name_;
|
||||
uint64_t virtual_address_;
|
||||
uint64_t size_;
|
||||
uint64_t offset_;
|
||||
|
||||
private:
|
||||
template<typename T>
|
||||
std::vector<size_t> search_all_(const T& v) const;
|
||||
template<typename T>
|
||||
std::vector<size_t> search_all_(const T& v) const;
|
||||
|
||||
|
||||
};
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "LIEF/BinaryStream/Convert.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
class BinaryStream {
|
||||
public:
|
||||
BinaryStream(void);
|
||||
@ -204,7 +204,7 @@ std::unique_ptr<T[]> BinaryStream::read_conv_array(size_t size, bool check) cons
|
||||
const T *t = this->read_array<T>(size, check);
|
||||
|
||||
if (t == nullptr) {
|
||||
return nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<T[]> uptr(new T[size]);
|
||||
@ -233,7 +233,7 @@ std::unique_ptr<T[]> BinaryStream::peek_conv_array(size_t offset, size_t size, b
|
||||
const T *t = this->peek_array<T>(offset, size, check);
|
||||
|
||||
if (t == nullptr) {
|
||||
return nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<T[]> uptr(new T[size]);
|
||||
@ -246,5 +246,5 @@ std::unique_ptr<T[]> BinaryStream::peek_conv_array(size_t offset, size_t size, b
|
||||
}
|
||||
return uptr;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "LIEF/BinaryStream/BinaryStream.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
class VectorStream : public BinaryStream {
|
||||
public:
|
||||
//using BinaryStream::read_integer;
|
||||
@ -36,6 +36,6 @@ class VectorStream : public BinaryStream {
|
||||
std::vector<uint8_t> binary_;
|
||||
uint64_t size_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -18,11 +18,58 @@
|
||||
|
||||
|
||||
#include "LIEF/PE/Parser.hpp"
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
#include "LIEF/PE/TLS.hpp"
|
||||
#include "LIEF/PE/Export.hpp"
|
||||
#include "LIEF/PE/ExportEntry.hpp"
|
||||
#include "LIEF/PE/Import.hpp"
|
||||
#include "LIEF/PE/ImportEntry.hpp"
|
||||
#include "LIEF/PE/Pogo.hpp"
|
||||
#include "LIEF/PE/PogoEntry.hpp"
|
||||
#include "LIEF/PE/DataDirectory.hpp"
|
||||
#include "LIEF/PE/ResourcesManager.hpp"
|
||||
#include "LIEF/PE/ResourceData.hpp"
|
||||
#include "LIEF/PE/ResourceNode.hpp"
|
||||
#include "LIEF/PE/ResourceDirectory.hpp"
|
||||
#include "LIEF/PE/resources/LangCodeItem.hpp"
|
||||
#include "LIEF/PE/resources/ResourceAccelerator.hpp"
|
||||
#include "LIEF/PE/resources/ResourceDialog.hpp"
|
||||
#include "LIEF/PE/resources/ResourceDialogItem.hpp"
|
||||
#include "LIEF/PE/resources/ResourceFixedFileInfo.hpp"
|
||||
#include "LIEF/PE/resources/ResourceIcon.hpp"
|
||||
#include "LIEF/PE/resources/ResourceStringFileInfo.hpp"
|
||||
#include "LIEF/PE/resources/ResourceStringTable.hpp"
|
||||
#include "LIEF/PE/resources/ResourceVarFileInfo.hpp"
|
||||
#include "LIEF/PE/resources/ResourceVersion.hpp"
|
||||
#include "LIEF/PE/RichEntry.hpp"
|
||||
#include "LIEF/PE/RichHeader.hpp"
|
||||
#include "LIEF/PE/Symbol.hpp"
|
||||
#include "LIEF/PE/Relocation.hpp"
|
||||
#include "LIEF/PE/RelocationEntry.hpp"
|
||||
#include "LIEF/PE/Symbol.hpp"
|
||||
#include "LIEF/PE/Builder.hpp"
|
||||
#include "LIEF/PE/Binary.hpp"
|
||||
#include "LIEF/PE/Debug.hpp"
|
||||
#include "LIEF/PE/DosHeader.hpp"
|
||||
#include "LIEF/PE/Header.hpp"
|
||||
#include "LIEF/PE/OptionalHeader.hpp"
|
||||
#include "LIEF/PE/CodeView.hpp"
|
||||
#include "LIEF/PE/CodeViewPDB.hpp"
|
||||
#include "LIEF/PE/signature/OIDToString.hpp"
|
||||
#include "LIEF/PE/LoadConfigurations.hpp"
|
||||
#include "LIEF/PE/AuxiliarySymbol.hpp"
|
||||
#include "LIEF/PE/CodeIntegrity.hpp"
|
||||
|
||||
#include "LIEF/PE/signature/AuthenticatedAttributes.hpp"
|
||||
#include "LIEF/PE/signature/ContentInfo.hpp"
|
||||
#include "LIEF/PE/signature/OIDToString.hpp"
|
||||
#include "LIEF/PE/signature/Signature.hpp"
|
||||
#include "LIEF/PE/signature/SignerInfo.hpp"
|
||||
#include "LIEF/PE/signature/types.hpp"
|
||||
#include "LIEF/PE/signature/x509.hpp"
|
||||
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
#include "LIEF/PE/utils.hpp"
|
||||
|
||||
#endif
|
||||
|
@ -18,24 +18,15 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/Header.hpp"
|
||||
#include "LIEF/PE/OptionalHeader.hpp"
|
||||
#include "LIEF/PE/DosHeader.hpp"
|
||||
#include "LIEF/PE/RichHeader.hpp"
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
#include "LIEF/PE/Import.hpp"
|
||||
#include "LIEF/PE/DataDirectory.hpp"
|
||||
#include "LIEF/PE/TLS.hpp"
|
||||
#include "LIEF/PE/Symbol.hpp"
|
||||
#include "LIEF/PE/utils.hpp"
|
||||
#include "LIEF/PE/Relocation.hpp"
|
||||
#include "LIEF/PE/ResourceDirectory.hpp"
|
||||
#include "LIEF/PE/Export.hpp"
|
||||
#include "LIEF/PE/Debug.hpp"
|
||||
#include "LIEF/PE/ResourcesManager.hpp"
|
||||
#include "LIEF/PE/signature/Signature.hpp"
|
||||
#include "LIEF/PE/LoadConfigurations.hpp"
|
||||
|
||||
#include "LIEF/Abstract/Binary.hpp"
|
||||
|
||||
@ -452,7 +443,7 @@ class LIEF_API Binary : public LIEF::Binary {
|
||||
std::vector<uint8_t> overlay_;
|
||||
std::vector<uint8_t> dos_stub_;
|
||||
|
||||
LoadConfiguration* load_configuration_;
|
||||
LoadConfiguration* load_configuration_{nullptr};
|
||||
|
||||
std::map<std::string, std::map<std::string, uint64_t>> hooks_;
|
||||
};
|
||||
|
@ -15,19 +15,14 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_CODE_INTEGRITY_H_
|
||||
#define LIEF_PE_CODE_INTEGRITY_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
struct pe_code_integrity;
|
||||
class LIEF_API CodeIntegrity : public Object {
|
||||
public:
|
||||
static constexpr size_t PRINT_WIDTH = 20;
|
||||
|
@ -15,16 +15,12 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_CODE_VIEW_H_
|
||||
#define LIEF_PE_CODE_VIEW_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -15,11 +15,8 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_CODE_VIEW_PDB_H_
|
||||
#define LIEF_PE_CODE_VIEW_PDB_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <array>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
@ -63,9 +60,9 @@ class LIEF_API CodeViewPDB : public CodeView {
|
||||
virtual ~CodeViewPDB(void);
|
||||
|
||||
private:
|
||||
signature_t signature_;
|
||||
uint32_t age_;
|
||||
std::string filename_;
|
||||
signature_t signature_;
|
||||
uint32_t age_;
|
||||
std::string filename_;
|
||||
};
|
||||
|
||||
} // Namespace PE
|
||||
|
@ -21,10 +21,7 @@
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
@ -32,6 +29,8 @@ namespace PE {
|
||||
class Builder;
|
||||
class Parser;
|
||||
class Binary;
|
||||
class Section;
|
||||
struct pe_data_directory;
|
||||
|
||||
class LIEF_API DataDirectory : public Object {
|
||||
|
||||
@ -70,7 +69,7 @@ class LIEF_API DataDirectory : public Object {
|
||||
uint32_t rva_;
|
||||
uint32_t size_;
|
||||
DATA_DIRECTORY type_;
|
||||
Section* section_;
|
||||
Section* section_{nullptr};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -22,15 +22,16 @@
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/CodeView.hpp"
|
||||
#include "LIEF/PE/Pogo.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
class Parser;
|
||||
class Builder;
|
||||
class CodeView;
|
||||
class Pogo;
|
||||
struct pe_debug;
|
||||
|
||||
class LIEF_API Debug : public Object {
|
||||
|
||||
@ -38,80 +39,80 @@ class LIEF_API Debug : public Object {
|
||||
friend class Builder;
|
||||
|
||||
public:
|
||||
Debug(void);
|
||||
Debug(const pe_debug* debug_s);
|
||||
Debug(const Debug& copy);
|
||||
Debug& operator=(Debug copy);
|
||||
Debug(void);
|
||||
Debug(const pe_debug* debug_s);
|
||||
Debug(const Debug& copy);
|
||||
Debug& operator=(Debug copy);
|
||||
|
||||
void swap(Debug& other);
|
||||
void swap(Debug& other);
|
||||
|
||||
virtual ~Debug(void);
|
||||
virtual ~Debug(void);
|
||||
|
||||
//! Reserved should be 0
|
||||
uint32_t characteristics(void) const;
|
||||
//! Reserved should be 0
|
||||
uint32_t characteristics(void) const;
|
||||
|
||||
//! The time and date that the debug data was created.
|
||||
uint32_t timestamp(void) const;
|
||||
//! The time and date that the debug data was created.
|
||||
uint32_t timestamp(void) const;
|
||||
|
||||
//! The major version number of the debug data format.
|
||||
uint16_t major_version(void) const;
|
||||
//! The major version number of the debug data format.
|
||||
uint16_t major_version(void) const;
|
||||
|
||||
//! The minor version number of the debug data format.
|
||||
uint16_t minor_version(void) const;
|
||||
//! The minor version number of the debug data format.
|
||||
uint16_t minor_version(void) const;
|
||||
|
||||
//! The format DEBUG_TYPES of the debugging information
|
||||
DEBUG_TYPES type(void) const;
|
||||
//! The format DEBUG_TYPES of the debugging information
|
||||
DEBUG_TYPES type(void) const;
|
||||
|
||||
//! Size of the debug data
|
||||
uint32_t sizeof_data(void) const;
|
||||
//! Size of the debug data
|
||||
uint32_t sizeof_data(void) const;
|
||||
|
||||
//! Address of the debug data relative to the image base
|
||||
uint32_t addressof_rawdata(void) const;
|
||||
//! Address of the debug data relative to the image base
|
||||
uint32_t addressof_rawdata(void) const;
|
||||
|
||||
//! File offset of the debug data
|
||||
uint32_t pointerto_rawdata(void) const;
|
||||
//! File offset of the debug data
|
||||
uint32_t pointerto_rawdata(void) const;
|
||||
|
||||
bool has_code_view(void) const;
|
||||
bool has_code_view(void) const;
|
||||
|
||||
const CodeView& code_view(void) const;
|
||||
CodeView& code_view(void);
|
||||
const CodeView& code_view(void) const;
|
||||
CodeView& code_view(void);
|
||||
|
||||
bool has_pogo(void) const;
|
||||
bool has_pogo(void) const;
|
||||
|
||||
const Pogo& pogo(void) const;
|
||||
Pogo& pogo(void);
|
||||
const Pogo& pogo(void) const;
|
||||
Pogo& pogo(void);
|
||||
|
||||
|
||||
void characteristics(uint32_t characteristics);
|
||||
void timestamp(uint32_t timestamp);
|
||||
void major_version(uint16_t major_version);
|
||||
void minor_version(uint16_t minor_version);
|
||||
void type(DEBUG_TYPES new_type);
|
||||
void sizeof_data(uint32_t sizeof_data);
|
||||
void addressof_rawdata(uint32_t addressof_rawdata);
|
||||
void pointerto_rawdata(uint32_t pointerto_rawdata);
|
||||
void characteristics(uint32_t characteristics);
|
||||
void timestamp(uint32_t timestamp);
|
||||
void major_version(uint16_t major_version);
|
||||
void minor_version(uint16_t minor_version);
|
||||
void type(DEBUG_TYPES new_type);
|
||||
void sizeof_data(uint32_t sizeof_data);
|
||||
void addressof_rawdata(uint32_t addressof_rawdata);
|
||||
void pointerto_rawdata(uint32_t pointerto_rawdata);
|
||||
|
||||
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
bool operator==(const Debug& rhs) const;
|
||||
bool operator!=(const Debug& rhs) const;
|
||||
bool operator==(const Debug& rhs) const;
|
||||
bool operator!=(const Debug& rhs) const;
|
||||
|
||||
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const Debug& entry);
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const Debug& entry);
|
||||
|
||||
private:
|
||||
uint32_t characteristics_;
|
||||
uint32_t timestamp_;
|
||||
uint16_t majorversion_;
|
||||
uint16_t minorversion_;
|
||||
DEBUG_TYPES type_;
|
||||
uint32_t sizeof_data_;
|
||||
uint32_t addressof_rawdata_;
|
||||
uint32_t pointerto_rawdata_;
|
||||
uint32_t characteristics_;
|
||||
uint32_t timestamp_;
|
||||
uint16_t majorversion_;
|
||||
uint16_t minorversion_;
|
||||
DEBUG_TYPES type_;
|
||||
uint32_t sizeof_data_;
|
||||
uint32_t addressof_rawdata_;
|
||||
uint32_t pointerto_rawdata_;
|
||||
|
||||
CodeView* code_view_;
|
||||
Pogo* pogo_;
|
||||
CodeView* code_view_{nullptr};
|
||||
Pogo* pogo_{nullptr};
|
||||
|
||||
|
||||
};
|
||||
|
@ -21,89 +21,88 @@
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
struct pe_dos_header;
|
||||
|
||||
class LIEF_API DosHeader : public Object {
|
||||
public:
|
||||
using reserved_t = std::array<uint16_t, 4>;
|
||||
using reserved2_t = std::array<uint16_t, 10>;
|
||||
using reserved_t = std::array<uint16_t, 4>;
|
||||
using reserved2_t = std::array<uint16_t, 10>;
|
||||
|
||||
DosHeader(const pe_dos_header* header);
|
||||
DosHeader(void);
|
||||
DosHeader(const DosHeader&);
|
||||
DosHeader& operator=(const DosHeader&);
|
||||
virtual ~DosHeader(void);
|
||||
DosHeader(const pe_dos_header* header);
|
||||
DosHeader(void);
|
||||
DosHeader(const DosHeader&);
|
||||
DosHeader& operator=(const DosHeader&);
|
||||
virtual ~DosHeader(void);
|
||||
|
||||
uint16_t magic(void) const;
|
||||
uint16_t used_bytes_in_the_last_page(void) const;
|
||||
uint16_t file_size_in_pages(void) const;
|
||||
uint16_t numberof_relocation(void) const;
|
||||
uint16_t header_size_in_paragraphs(void) const;
|
||||
uint16_t minimum_extra_paragraphs(void) const;
|
||||
uint16_t maximum_extra_paragraphs(void) const;
|
||||
uint16_t initial_relative_ss(void) const;
|
||||
uint16_t initial_sp(void) const;
|
||||
uint16_t checksum(void) const;
|
||||
uint16_t initial_ip(void) const;
|
||||
uint16_t initial_relative_cs(void) const;
|
||||
uint16_t addressof_relocation_table(void) const;
|
||||
uint16_t overlay_number(void) const;
|
||||
reserved_t reserved(void) const;
|
||||
uint16_t oem_id(void) const;
|
||||
uint16_t oem_info(void) const;
|
||||
reserved2_t reserved2(void) const;
|
||||
uint32_t addressof_new_exeheader(void) const;
|
||||
uint16_t magic(void) const;
|
||||
uint16_t used_bytes_in_the_last_page(void) const;
|
||||
uint16_t file_size_in_pages(void) const;
|
||||
uint16_t numberof_relocation(void) const;
|
||||
uint16_t header_size_in_paragraphs(void) const;
|
||||
uint16_t minimum_extra_paragraphs(void) const;
|
||||
uint16_t maximum_extra_paragraphs(void) const;
|
||||
uint16_t initial_relative_ss(void) const;
|
||||
uint16_t initial_sp(void) const;
|
||||
uint16_t checksum(void) const;
|
||||
uint16_t initial_ip(void) const;
|
||||
uint16_t initial_relative_cs(void) const;
|
||||
uint16_t addressof_relocation_table(void) const;
|
||||
uint16_t overlay_number(void) const;
|
||||
reserved_t reserved(void) const;
|
||||
uint16_t oem_id(void) const;
|
||||
uint16_t oem_info(void) const;
|
||||
reserved2_t reserved2(void) const;
|
||||
uint32_t addressof_new_exeheader(void) const;
|
||||
|
||||
void magic(uint16_t magic);
|
||||
void used_bytes_in_the_last_page(uint16_t usedBytesInTheLastPage);
|
||||
void file_size_in_pages(uint16_t fileSizeInPages);
|
||||
void numberof_relocation(uint16_t numberOfRelocation);
|
||||
void header_size_in_paragraphs(uint16_t headerSizeInParagraphs);
|
||||
void minimum_extra_paragraphs(uint16_t minimumExtraParagraphs);
|
||||
void maximum_extra_paragraphs(uint16_t maximumExtraParagraphs);
|
||||
void initial_relative_ss(uint16_t initialRelativeSS);
|
||||
void initial_sp(uint16_t initialSP);
|
||||
void checksum(uint16_t checksum);
|
||||
void initial_ip(uint16_t initialIP);
|
||||
void initial_relative_cs(uint16_t initialRelativeCS);
|
||||
void addressof_relocation_table(uint16_t addressOfRelocationTable);
|
||||
void overlay_number(uint16_t overlayNumber);
|
||||
void reserved(const reserved_t& reserved);
|
||||
void oem_id(uint16_t oEMid);
|
||||
void oem_info(uint16_t oEMinfo);
|
||||
void reserved2(const reserved2_t& reserved2);
|
||||
void addressof_new_exeheader(uint32_t addressOfNewExeHeader);
|
||||
void magic(uint16_t magic);
|
||||
void used_bytes_in_the_last_page(uint16_t usedBytesInTheLastPage);
|
||||
void file_size_in_pages(uint16_t fileSizeInPages);
|
||||
void numberof_relocation(uint16_t numberOfRelocation);
|
||||
void header_size_in_paragraphs(uint16_t headerSizeInParagraphs);
|
||||
void minimum_extra_paragraphs(uint16_t minimumExtraParagraphs);
|
||||
void maximum_extra_paragraphs(uint16_t maximumExtraParagraphs);
|
||||
void initial_relative_ss(uint16_t initialRelativeSS);
|
||||
void initial_sp(uint16_t initialSP);
|
||||
void checksum(uint16_t checksum);
|
||||
void initial_ip(uint16_t initialIP);
|
||||
void initial_relative_cs(uint16_t initialRelativeCS);
|
||||
void addressof_relocation_table(uint16_t addressOfRelocationTable);
|
||||
void overlay_number(uint16_t overlayNumber);
|
||||
void reserved(const reserved_t& reserved);
|
||||
void oem_id(uint16_t oEMid);
|
||||
void oem_info(uint16_t oEMinfo);
|
||||
void reserved2(const reserved2_t& reserved2);
|
||||
void addressof_new_exeheader(uint32_t addressOfNewExeHeader);
|
||||
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
bool operator==(const DosHeader& rhs) const;
|
||||
bool operator!=(const DosHeader& rhs) const;
|
||||
bool operator==(const DosHeader& rhs) const;
|
||||
bool operator!=(const DosHeader& rhs) const;
|
||||
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const DosHeader& entry);
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const DosHeader& entry);
|
||||
|
||||
private:
|
||||
uint16_t magic_;
|
||||
uint16_t usedBytesInTheLastPage_;
|
||||
uint16_t fileSizeInPages_;
|
||||
uint16_t numberOfRelocation_;
|
||||
uint16_t headerSizeInParagraphs_;
|
||||
uint16_t minimumExtraParagraphs_;
|
||||
uint16_t maximumExtraParagraphs_;
|
||||
uint16_t initialRelativeSS_;
|
||||
uint16_t initialSP_;
|
||||
uint16_t checksum_;
|
||||
uint16_t initialIP_;
|
||||
uint16_t initialRelativeCS_;
|
||||
uint16_t addressOfRelocationTable_;
|
||||
uint16_t overlayNumber_;
|
||||
reserved_t reserved_;
|
||||
uint16_t oEMid_;
|
||||
uint16_t oEMinfo_;
|
||||
reserved2_t reserved2_;
|
||||
uint32_t addressOfNewExeHeader_;
|
||||
uint16_t magic_;
|
||||
uint16_t usedBytesInTheLastPage_;
|
||||
uint16_t fileSizeInPages_;
|
||||
uint16_t numberOfRelocation_;
|
||||
uint16_t headerSizeInParagraphs_;
|
||||
uint16_t minimumExtraParagraphs_;
|
||||
uint16_t maximumExtraParagraphs_;
|
||||
uint16_t initialRelativeSS_;
|
||||
uint16_t initialSP_;
|
||||
uint16_t checksum_;
|
||||
uint16_t initialIP_;
|
||||
uint16_t initialRelativeCS_;
|
||||
uint16_t addressOfRelocationTable_;
|
||||
uint16_t overlayNumber_;
|
||||
reserved_t reserved_;
|
||||
uint16_t oEMid_;
|
||||
uint16_t oEMinfo_;
|
||||
reserved2_t reserved2_;
|
||||
uint32_t addressOfNewExeHeader_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
#define LIEF_PE_ENUM_TO_STRING_H
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -17,29 +17,24 @@
|
||||
#define LIEF_PE_EXPORT_H_
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/type_traits.hpp"
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/ExportEntry.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
class Builder;
|
||||
class Parser;
|
||||
struct pe_export_directory_table;
|
||||
|
||||
class LIEF_API Export : public Object {
|
||||
|
||||
friend class Builder;
|
||||
friend class Parser;
|
||||
|
||||
|
||||
public:
|
||||
Export(void);
|
||||
Export(const pe_export_directory_table *header);
|
||||
@ -47,14 +42,14 @@ class LIEF_API Export : public Object {
|
||||
Export& operator=(const Export&);
|
||||
virtual ~Export(void);
|
||||
|
||||
uint32_t export_flags(void) const;
|
||||
uint32_t timestamp(void) const;
|
||||
uint16_t major_version(void) const;
|
||||
uint16_t minor_version(void) const;
|
||||
uint32_t ordinal_base(void) const;
|
||||
const std::string& name(void) const;
|
||||
it_export_entries entries(void);
|
||||
it_const_export_entries entries(void) const;
|
||||
uint32_t export_flags(void) const;
|
||||
uint32_t timestamp(void) const;
|
||||
uint16_t major_version(void) const;
|
||||
uint16_t minor_version(void) const;
|
||||
uint32_t ordinal_base(void) const;
|
||||
const std::string& name(void) const;
|
||||
it_export_entries entries(void);
|
||||
it_const_export_entries entries(void) const;
|
||||
|
||||
void export_flags(uint32_t flags);
|
||||
void timestamp(uint32_t timestamp);
|
||||
|
@ -17,16 +17,11 @@
|
||||
#define LIEF_PE_EXPORT_ENTRY_H_
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
|
@ -17,66 +17,66 @@
|
||||
#define LIEF_PE_HEADER_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
struct pe_header;
|
||||
class LIEF_API Header : public Object {
|
||||
public:
|
||||
using signature_t = std::array<uint8_t, sizeof(PE_Magic)>;
|
||||
Header(void);
|
||||
Header(const pe_header *header);
|
||||
virtual ~Header(void);
|
||||
using signature_t = std::array<uint8_t, /* PE Magic */ 4>;
|
||||
Header(void);
|
||||
Header(const pe_header *header);
|
||||
virtual ~Header(void);
|
||||
|
||||
Header& operator=(const Header&);
|
||||
Header(const Header&);
|
||||
Header& operator=(const Header&);
|
||||
Header(const Header&);
|
||||
|
||||
const signature_t& signature(void) const;
|
||||
MACHINE_TYPES machine(void) const;
|
||||
uint16_t numberof_sections(void) const;
|
||||
uint32_t time_date_stamp(void) const;
|
||||
uint32_t pointerto_symbol_table(void) const;
|
||||
uint32_t numberof_symbols(void) const;
|
||||
uint16_t sizeof_optional_header(void) const;
|
||||
HEADER_CHARACTERISTICS characteristics(void) const;
|
||||
const signature_t& signature(void) const;
|
||||
MACHINE_TYPES machine(void) const;
|
||||
uint16_t numberof_sections(void) const;
|
||||
uint32_t time_date_stamp(void) const;
|
||||
uint32_t pointerto_symbol_table(void) const;
|
||||
uint32_t numberof_symbols(void) const;
|
||||
uint16_t sizeof_optional_header(void) const;
|
||||
HEADER_CHARACTERISTICS characteristics(void) const;
|
||||
|
||||
bool has_characteristic(HEADER_CHARACTERISTICS c) const;
|
||||
std::set<HEADER_CHARACTERISTICS> characteristics_list(void) const;
|
||||
bool has_characteristic(HEADER_CHARACTERISTICS c) const;
|
||||
std::set<HEADER_CHARACTERISTICS> characteristics_list(void) const;
|
||||
|
||||
void machine(MACHINE_TYPES type);
|
||||
void numberof_sections(uint16_t nbOfSections);
|
||||
void time_date_stamp(uint32_t timestamp);
|
||||
void pointerto_symbol_table(uint32_t pointerToSymbol);
|
||||
void numberof_symbols(uint32_t nbOfSymbols);
|
||||
void sizeof_optional_header(uint16_t sizeOfOptionalHdr);
|
||||
void characteristics(HEADER_CHARACTERISTICS characteristics);
|
||||
void signature(const signature_t& sig);
|
||||
void machine(MACHINE_TYPES type);
|
||||
void numberof_sections(uint16_t nbOfSections);
|
||||
void time_date_stamp(uint32_t timestamp);
|
||||
void pointerto_symbol_table(uint32_t pointerToSymbol);
|
||||
void numberof_symbols(uint32_t nbOfSymbols);
|
||||
void sizeof_optional_header(uint16_t sizeOfOptionalHdr);
|
||||
void characteristics(HEADER_CHARACTERISTICS characteristics);
|
||||
void signature(const signature_t& sig);
|
||||
|
||||
void add_characteristic(HEADER_CHARACTERISTICS c);
|
||||
void remove_characteristic(HEADER_CHARACTERISTICS c);
|
||||
void add_characteristic(HEADER_CHARACTERISTICS c);
|
||||
void remove_characteristic(HEADER_CHARACTERISTICS c);
|
||||
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
bool operator==(const Header& rhs) const;
|
||||
bool operator!=(const Header& rhs) const;
|
||||
bool operator==(const Header& rhs) const;
|
||||
bool operator!=(const Header& rhs) const;
|
||||
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const Header& entry);
|
||||
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const Header& entry);
|
||||
private:
|
||||
signature_t signature_;
|
||||
MACHINE_TYPES machine_;
|
||||
uint16_t numberOfSections_;
|
||||
uint32_t timeDateStamp_;
|
||||
uint32_t pointerToSymbolTable_;
|
||||
uint32_t numberOfSymbols_;
|
||||
uint16_t sizeOfOptionalHeader_;
|
||||
HEADER_CHARACTERISTICS characteristics_;
|
||||
signature_t signature_;
|
||||
MACHINE_TYPES machine_;
|
||||
uint16_t numberOfSections_;
|
||||
uint32_t timeDateStamp_;
|
||||
uint32_t pointerToSymbolTable_;
|
||||
uint32_t numberOfSymbols_;
|
||||
uint16_t sizeOfOptionalHeader_;
|
||||
HEADER_CHARACTERISTICS characteristics_;
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -17,8 +17,6 @@
|
||||
#define LIEF_PE_IMPORT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
@ -26,14 +24,12 @@
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/type_traits.hpp"
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/ImportEntry.hpp"
|
||||
#include "LIEF/PE/DataDirectory.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
class Parser;
|
||||
class Builder;
|
||||
struct pe_import;
|
||||
|
||||
class LIEF_API Import : public Object {
|
||||
|
||||
@ -119,8 +115,8 @@ class LIEF_API Import : public Object {
|
||||
|
||||
private:
|
||||
import_entries_t entries_;
|
||||
DataDirectory* directory_;
|
||||
DataDirectory* iat_directory_;
|
||||
DataDirectory* directory_{nullptr};
|
||||
DataDirectory* iat_directory_{nullptr};
|
||||
uint32_t import_lookup_table_RVA_;
|
||||
uint32_t timedatestamp_;
|
||||
uint32_t forwarder_chain_;
|
||||
|
@ -15,16 +15,13 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_IMPORT_ENTRY_H_
|
||||
#define LIEF_PE_IMPORT_ENTRY_H_
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -15,20 +15,19 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_LOAD_CONFIGURATION_H_
|
||||
#define LIEF_PE_LOAD_CONFIGURATION_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
template<class T>
|
||||
struct load_configuration;
|
||||
|
||||
//! @brief Class modeling the default PE's ``LoadConfiguration``
|
||||
//!
|
||||
//! It's the base class for any future version of the structure
|
||||
|
@ -15,20 +15,17 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_LOAD_CONFIGURATION_V0_H_
|
||||
#define LIEF_PE_LOAD_CONFIGURATION_V0_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/LoadConfigurations/LoadConfiguration.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
template<class T>
|
||||
struct load_configuration_v0;
|
||||
|
||||
//! @brief LoadConfiguration enhanced with SEH
|
||||
class LIEF_API LoadConfigurationV0 : public LoadConfiguration {
|
||||
public:
|
||||
|
@ -15,21 +15,21 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_LOAD_CONFIGURATION_V1_H_
|
||||
#define LIEF_PE_LOAD_CONFIGURATION_V1_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
#include "LIEF/PE/type_traits.hpp"
|
||||
#include "LIEF/PE/LoadConfigurations/LoadConfigurationV0.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
template<class T>
|
||||
struct load_configuration_v1;
|
||||
|
||||
//! @brief LoadConfiguration enhanced with Control Flow Guard
|
||||
//!
|
||||
//! This structure is available from Windows 8.1
|
||||
|
@ -15,21 +15,20 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_LOAD_CONFIGURATION_V2_H_
|
||||
#define LIEF_PE_LOAD_CONFIGURATION_V2_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
#include "LIEF/PE/CodeIntegrity.hpp"
|
||||
#include "LIEF/PE/LoadConfigurations/LoadConfigurationV1.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
template<class T>
|
||||
struct load_configuration_v2;
|
||||
|
||||
//! @brief LoadConfiguration enhanced with code integrity
|
||||
class LIEF_API LoadConfigurationV2 : public LoadConfigurationV1 {
|
||||
public:
|
||||
|
@ -15,20 +15,19 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_LOAD_CONFIGURATION_V3_H_
|
||||
#define LIEF_PE_LOAD_CONFIGURATION_V3_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
#include "LIEF/PE/LoadConfigurations/LoadConfigurationV2.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
template<class T>
|
||||
struct load_configuration_v3;
|
||||
|
||||
//! @brief LoadConfiguration with Control Flow Guard improved
|
||||
class LIEF_API LoadConfigurationV3 : public LoadConfigurationV2 {
|
||||
public:
|
||||
|
@ -15,20 +15,19 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_LOAD_CONFIGURATION_V4_H_
|
||||
#define LIEF_PE_LOAD_CONFIGURATION_V4_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
#include "LIEF/PE/LoadConfigurations/LoadConfigurationV3.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
template<class T>
|
||||
struct load_configuration_v4;
|
||||
|
||||
//! @brief Load Configuration enhanced with
|
||||
//! * Kind of dynamic relocations
|
||||
//! * *Hybrid Metadata Pointer*
|
||||
|
@ -15,20 +15,19 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_LOAD_CONFIGURATION_V5_H_
|
||||
#define LIEF_PE_LOAD_CONFIGURATION_V5_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
#include "LIEF/PE/LoadConfigurations/LoadConfigurationV4.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
template<class T>
|
||||
struct load_configuration_v5;
|
||||
|
||||
//! @brief Load Configuration enhanced with Return Flow Guard
|
||||
class LIEF_API LoadConfigurationV5 : public LoadConfigurationV4 {
|
||||
public:
|
||||
|
@ -15,20 +15,19 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_LOAD_CONFIGURATION_V6_H_
|
||||
#define LIEF_PE_LOAD_CONFIGURATION_V6_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
#include "LIEF/PE/LoadConfigurations/LoadConfigurationV5.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
template<class T>
|
||||
struct load_configuration_v6;
|
||||
|
||||
//! @brief Load Configuration enhanced with Hotpatch and improved RFG
|
||||
class LIEF_API LoadConfigurationV6 : public LoadConfigurationV5 {
|
||||
public:
|
||||
|
@ -15,18 +15,19 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_LOAD_CONFIGURATION_V7_H_
|
||||
#define LIEF_PE_LOAD_CONFIGURATION_V7_H_
|
||||
#include <array>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
#include "LIEF/PE/LoadConfigurations/LoadConfigurationV6.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
template<class T>
|
||||
struct load_configuration_v7;
|
||||
|
||||
class LIEF_API LoadConfigurationV7 : public LoadConfigurationV6 {
|
||||
public:
|
||||
|
||||
|
@ -21,10 +21,13 @@
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
struct pe32_optional_header;
|
||||
struct pe64_optional_header;
|
||||
|
||||
class LIEF_API OptionalHeader : public Object {
|
||||
public:
|
||||
OptionalHeader(void);
|
||||
|
@ -16,27 +16,25 @@
|
||||
#ifndef LIEF_PE_PARSER_H_
|
||||
#define LIEF_PE_PARSER_H_
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "LIEF/exception.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
#include "LIEF/utils.hpp"
|
||||
|
||||
#include "LIEF/Abstract/Parser.hpp"
|
||||
|
||||
#include "LIEF/BinaryStream/VectorStream.hpp"
|
||||
|
||||
#include "LIEF/PE/Binary.hpp"
|
||||
|
||||
#include "LIEF/PE/ResourceNode.hpp"
|
||||
#include "LIEF/PE/ResourceData.hpp"
|
||||
#include "LIEF/PE/ResourceDirectory.hpp"
|
||||
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
class VectorStream;
|
||||
|
||||
namespace PE {
|
||||
class Debug;
|
||||
class ResourceNode;
|
||||
class Binary;
|
||||
struct pe_resource_directory_table;
|
||||
|
||||
class LIEF_API Parser : public LIEF::Parser {
|
||||
|
||||
public:
|
||||
@ -111,7 +109,7 @@ class LIEF_API Parser : public LIEF::Parser {
|
||||
|
||||
|
||||
std::unique_ptr<VectorStream> stream_;
|
||||
Binary* binary_;
|
||||
Binary* binary_{nullptr};
|
||||
PE_TYPE type_;
|
||||
std::set<uint32_t> resource_visited_;
|
||||
};
|
||||
|
@ -15,20 +15,13 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_POGO_H_
|
||||
#define LIEF_PE_POGO_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/type_traits.hpp"
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/PogoEntry.hpp"
|
||||
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -15,16 +15,13 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_POGO_ENTRY_H_
|
||||
#define LIEF_PE_POGO_ENTRY_H_
|
||||
#include <array>
|
||||
#include <set>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
@ -46,14 +43,13 @@ class LIEF_API PogoEntry : public Object {
|
||||
PogoEntry& operator=(const PogoEntry&);
|
||||
virtual ~PogoEntry(void);
|
||||
|
||||
|
||||
uint32_t start_rva() const;
|
||||
uint32_t size() const;
|
||||
const std::string& name() const;
|
||||
|
||||
void start_rva(uint32_t start_rva);
|
||||
void size(uint32_t size);
|
||||
void name(const std::string& name);
|
||||
void name(const std::string& name);
|
||||
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
@ -64,9 +60,9 @@ class LIEF_API PogoEntry : public Object {
|
||||
|
||||
|
||||
protected:
|
||||
uint32_t start_rva_;
|
||||
uint32_t size_;
|
||||
std::string name_;
|
||||
uint32_t start_rva_;
|
||||
uint32_t size_;
|
||||
std::string name_;
|
||||
};
|
||||
|
||||
} // Namespace PE
|
||||
|
@ -22,14 +22,14 @@
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/type_traits.hpp"
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/RelocationEntry.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
class Parser;
|
||||
class Builder;
|
||||
struct pe_base_relocation_block;
|
||||
|
||||
class LIEF_API Relocation : public Object {
|
||||
|
||||
@ -37,34 +37,34 @@ class LIEF_API Relocation : public Object {
|
||||
friend class Builder;
|
||||
|
||||
public:
|
||||
Relocation(void);
|
||||
Relocation(const Relocation& other);
|
||||
Relocation& operator=(Relocation other);
|
||||
Relocation(const pe_base_relocation_block* header);
|
||||
virtual ~Relocation(void);
|
||||
Relocation(void);
|
||||
Relocation(const Relocation& other);
|
||||
Relocation& operator=(Relocation other);
|
||||
Relocation(const pe_base_relocation_block* header);
|
||||
virtual ~Relocation(void);
|
||||
|
||||
void swap(Relocation& other);
|
||||
void swap(Relocation& other);
|
||||
|
||||
uint32_t virtual_address(void) const;
|
||||
uint32_t block_size(void) const;
|
||||
it_const_relocation_entries entries(void) const;
|
||||
it_relocation_entries entries(void);
|
||||
uint32_t virtual_address(void) const;
|
||||
uint32_t block_size(void) const;
|
||||
it_const_relocation_entries entries(void) const;
|
||||
it_relocation_entries entries(void);
|
||||
|
||||
void virtual_address(uint32_t virtual_address);
|
||||
void block_size(uint32_t block_size);
|
||||
RelocationEntry& add_entry(const RelocationEntry& entry);
|
||||
void virtual_address(uint32_t virtual_address);
|
||||
void block_size(uint32_t block_size);
|
||||
RelocationEntry& add_entry(const RelocationEntry& entry);
|
||||
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
bool operator==(const Relocation& rhs) const;
|
||||
bool operator!=(const Relocation& rhs) const;
|
||||
bool operator==(const Relocation& rhs) const;
|
||||
bool operator!=(const Relocation& rhs) const;
|
||||
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const Relocation& relocation);
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const Relocation& relocation);
|
||||
|
||||
private:
|
||||
uint32_t block_size_;
|
||||
uint32_t virtual_address_;
|
||||
relocation_entries_t entries_;
|
||||
uint32_t block_size_;
|
||||
uint32_t virtual_address_;
|
||||
relocation_entries_t entries_;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
@ -40,50 +40,50 @@ class LIEF_API RelocationEntry : public LIEF::Relocation {
|
||||
friend class PE::Relocation;
|
||||
|
||||
public:
|
||||
RelocationEntry(void);
|
||||
RelocationEntry(const RelocationEntry& other);
|
||||
RelocationEntry& operator=(RelocationEntry other);
|
||||
RelocationEntry(uint16_t data);
|
||||
RelocationEntry(uint16_t position, RELOCATIONS_BASE_TYPES type);
|
||||
virtual ~RelocationEntry(void);
|
||||
RelocationEntry(void);
|
||||
RelocationEntry(const RelocationEntry& other);
|
||||
RelocationEntry& operator=(RelocationEntry other);
|
||||
RelocationEntry(uint16_t data);
|
||||
RelocationEntry(uint16_t position, RELOCATIONS_BASE_TYPES type);
|
||||
virtual ~RelocationEntry(void);
|
||||
|
||||
void swap(RelocationEntry& other);
|
||||
void swap(RelocationEntry& other);
|
||||
|
||||
virtual uint64_t address(void) const override;
|
||||
virtual uint64_t address(void) const override;
|
||||
|
||||
virtual void address(uint64_t address) override;
|
||||
virtual void address(uint64_t address) override;
|
||||
|
||||
virtual size_t size(void) const override;
|
||||
virtual size_t size(void) const override;
|
||||
|
||||
virtual void size(size_t size) override;
|
||||
virtual void size(size_t size) override;
|
||||
|
||||
//! @brief Raw data of the relocation:
|
||||
//! - The **high** 4 bits store the relocation type
|
||||
//! - The **low** 12 bits store the relocation offset
|
||||
uint16_t data(void) const;
|
||||
//! @brief Raw data of the relocation:
|
||||
//! - The **high** 4 bits store the relocation type
|
||||
//! - The **low** 12 bits store the relocation offset
|
||||
uint16_t data(void) const;
|
||||
|
||||
//! @brief Offset relative to Relocation::virtual_address
|
||||
//! where the relocation must occur.
|
||||
uint16_t position(void) const;
|
||||
//! @brief Offset relative to Relocation::virtual_address
|
||||
//! where the relocation must occur.
|
||||
uint16_t position(void) const;
|
||||
|
||||
//! @brief Type of the relocation
|
||||
RELOCATIONS_BASE_TYPES type(void) const;
|
||||
//! @brief Type of the relocation
|
||||
RELOCATIONS_BASE_TYPES type(void) const;
|
||||
|
||||
void data(uint16_t data);
|
||||
void position(uint16_t position);
|
||||
void type(RELOCATIONS_BASE_TYPES type);
|
||||
void data(uint16_t data);
|
||||
void position(uint16_t position);
|
||||
void type(RELOCATIONS_BASE_TYPES type);
|
||||
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
bool operator==(const RelocationEntry& rhs) const;
|
||||
bool operator!=(const RelocationEntry& rhs) const;
|
||||
bool operator==(const RelocationEntry& rhs) const;
|
||||
bool operator!=(const RelocationEntry& rhs) const;
|
||||
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const RelocationEntry& entry);
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const RelocationEntry& entry);
|
||||
|
||||
private:
|
||||
uint16_t position_;
|
||||
RELOCATIONS_BASE_TYPES type_;
|
||||
PE::Relocation* relocation_; // Used to compute some informations
|
||||
uint16_t position_;
|
||||
RELOCATIONS_BASE_TYPES type_;
|
||||
PE::Relocation* relocation_{nullptr}; // Used to compute some informations
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -19,8 +19,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/ResourceNode.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
#include "LIEF/PE/ResourceNode.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
@ -29,6 +29,7 @@ namespace PE {
|
||||
|
||||
class Parser;
|
||||
class Builder;
|
||||
struct pe_resource_directory_table;
|
||||
|
||||
class LIEF_API ResourceDirectory : public ResourceNode {
|
||||
|
||||
@ -36,64 +37,64 @@ class LIEF_API ResourceDirectory : public ResourceNode {
|
||||
friend class Builder;
|
||||
|
||||
public:
|
||||
ResourceDirectory(void);
|
||||
ResourceDirectory(const pe_resource_directory_table* header);
|
||||
ResourceDirectory(void);
|
||||
ResourceDirectory(const pe_resource_directory_table* header);
|
||||
|
||||
ResourceDirectory(const ResourceDirectory& other);
|
||||
ResourceDirectory& operator=(ResourceDirectory other);
|
||||
ResourceDirectory(const ResourceDirectory& other);
|
||||
ResourceDirectory& operator=(ResourceDirectory other);
|
||||
|
||||
void swap(ResourceDirectory& other);
|
||||
void swap(ResourceDirectory& other);
|
||||
|
||||
virtual ~ResourceDirectory(void);
|
||||
virtual ~ResourceDirectory(void);
|
||||
|
||||
virtual ResourceDirectory* clone(void) const override;
|
||||
virtual ResourceDirectory* clone(void) const override;
|
||||
|
||||
//! @brief Resource flags. This field is reserved for future use.
|
||||
//! It is currently set to zero.
|
||||
uint32_t characteristics(void) const;
|
||||
//! @brief Resource flags. This field is reserved for future use.
|
||||
//! It is currently set to zero.
|
||||
uint32_t characteristics(void) const;
|
||||
|
||||
//! @brief The time that the resource data was created by the
|
||||
//! resource compiler.
|
||||
uint32_t time_date_stamp(void) const;
|
||||
//! @brief The time that the resource data was created by the
|
||||
//! resource compiler.
|
||||
uint32_t time_date_stamp(void) const;
|
||||
|
||||
//! @brief The major version number, set by the user.
|
||||
uint16_t major_version(void) const;
|
||||
//! @brief The major version number, set by the user.
|
||||
uint16_t major_version(void) const;
|
||||
|
||||
//! @brief The minor version number, set by the user.
|
||||
uint16_t minor_version(void) const;
|
||||
//! @brief The minor version number, set by the user.
|
||||
uint16_t minor_version(void) const;
|
||||
|
||||
//! @brief The number of directory entries immediately
|
||||
//! following the table that use strings to identify Type,
|
||||
//! Name, or Language entries (depending on the level
|
||||
//! of the table).
|
||||
uint16_t numberof_name_entries(void) const;
|
||||
//! @brief The number of directory entries immediately
|
||||
//! following the table that use strings to identify Type,
|
||||
//! Name, or Language entries (depending on the level
|
||||
//! of the table).
|
||||
uint16_t numberof_name_entries(void) const;
|
||||
|
||||
//! @brief The number of directory entries immediately
|
||||
//! following the Name entries that use numeric IDs for
|
||||
//! Type, Name, or Language entries.
|
||||
uint16_t numberof_id_entries(void) const;
|
||||
//! @brief The number of directory entries immediately
|
||||
//! following the Name entries that use numeric IDs for
|
||||
//! Type, Name, or Language entries.
|
||||
uint16_t numberof_id_entries(void) const;
|
||||
|
||||
void characteristics(uint32_t characteristics);
|
||||
void time_date_stamp(uint32_t time_date_stamp);
|
||||
void major_version(uint16_t major_version);
|
||||
void minor_version(uint16_t minor_version);
|
||||
void numberof_name_entries(uint16_t numberof_name_entries);
|
||||
void numberof_id_entries(uint16_t numberof_id_entries);
|
||||
void characteristics(uint32_t characteristics);
|
||||
void time_date_stamp(uint32_t time_date_stamp);
|
||||
void major_version(uint16_t major_version);
|
||||
void minor_version(uint16_t minor_version);
|
||||
void numberof_name_entries(uint16_t numberof_name_entries);
|
||||
void numberof_id_entries(uint16_t numberof_id_entries);
|
||||
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
bool operator==(const ResourceDirectory& rhs) const;
|
||||
bool operator!=(const ResourceDirectory& rhs) const;
|
||||
bool operator==(const ResourceDirectory& rhs) const;
|
||||
bool operator!=(const ResourceDirectory& rhs) const;
|
||||
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const ResourceDirectory& directory);
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const ResourceDirectory& directory);
|
||||
|
||||
private:
|
||||
uint32_t characteristics_;
|
||||
uint32_t timeDateStamp_;
|
||||
uint16_t majorVersion_;
|
||||
uint16_t minorVersion_;
|
||||
uint16_t numberOfNameEntries_;
|
||||
uint16_t numberOfIDEntries_;
|
||||
uint32_t characteristics_;
|
||||
uint32_t timeDateStamp_;
|
||||
uint16_t majorVersion_;
|
||||
uint16_t minorVersion_;
|
||||
uint16_t numberOfNameEntries_;
|
||||
uint16_t numberOfIDEntries_;
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -15,16 +15,14 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_RESOURCE_NODE_H_
|
||||
#define LIEF_PE_RESOURCE_NODE_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/type_traits.hpp"
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -22,10 +22,8 @@
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/BinaryStream/VectorStream.hpp"
|
||||
|
||||
#include "LIEF/PE/type_traits.hpp"
|
||||
#include "LIEF/PE/ResourceDirectory.hpp"
|
||||
|
||||
#include "LIEF/PE/resources/ResourceVersion.hpp"
|
||||
#include "LIEF/PE/resources/ResourceIcon.hpp"
|
||||
@ -34,6 +32,8 @@
|
||||
#include "LIEF/PE/resources/ResourceAccelerator.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
class VectorStream;
|
||||
|
||||
namespace PE {
|
||||
|
||||
//! @brief The Resource Manager provides an enhanced API to
|
||||
@ -173,7 +173,7 @@ class LIEF_API ResourcesManager : public Object {
|
||||
ResourceVarFileInfo get_var_file_info(const VectorStream& stream, uint16_t type, std::u16string key, size_t start, size_t struct_length) const;
|
||||
|
||||
|
||||
ResourceNode *resources_;
|
||||
ResourceNode *resources_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace PE
|
||||
|
@ -15,50 +15,47 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_RICH_ENTRY_H_
|
||||
#define LIEF_PE_RICH_ENTRY_H_
|
||||
#include <array>
|
||||
#include <iostream>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
class LIEF_API RichEntry : public Object {
|
||||
public:
|
||||
|
||||
RichEntry(void);
|
||||
RichEntry(uint16_t id, uint16_t build_id, uint32_t count);
|
||||
RichEntry(const RichEntry&);
|
||||
RichEntry& operator=(const RichEntry&);
|
||||
virtual ~RichEntry(void);
|
||||
RichEntry(void);
|
||||
RichEntry(uint16_t id, uint16_t build_id, uint32_t count);
|
||||
RichEntry(const RichEntry&);
|
||||
RichEntry& operator=(const RichEntry&);
|
||||
virtual ~RichEntry(void);
|
||||
|
||||
//! @brief Entry type
|
||||
uint16_t id(void) const;
|
||||
//! @brief Entry type
|
||||
uint16_t id(void) const;
|
||||
|
||||
//! @brief Builder number of the tool (if any)
|
||||
uint16_t build_id(void) const;
|
||||
//! @brief Builder number of the tool (if any)
|
||||
uint16_t build_id(void) const;
|
||||
|
||||
//! @brief *Occurrence* count.
|
||||
uint32_t count(void) const;
|
||||
//! @brief *Occurrence* count.
|
||||
uint32_t count(void) const;
|
||||
|
||||
void id(uint16_t id);
|
||||
void build_id(uint16_t build_id);
|
||||
void count(uint32_t count);
|
||||
void id(uint16_t id);
|
||||
void build_id(uint16_t build_id);
|
||||
void count(uint32_t count);
|
||||
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
bool operator==(const RichEntry& rhs) const;
|
||||
bool operator!=(const RichEntry& rhs) const;
|
||||
bool operator==(const RichEntry& rhs) const;
|
||||
bool operator!=(const RichEntry& rhs) const;
|
||||
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const RichEntry& rich_entry);
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const RichEntry& rich_entry);
|
||||
|
||||
private:
|
||||
uint16_t id_;
|
||||
uint16_t build_id_;
|
||||
uint32_t count_;
|
||||
uint16_t id_;
|
||||
uint16_t build_id_;
|
||||
uint32_t count_;
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -21,11 +21,8 @@
|
||||
#include <set>
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/Abstract/Section.hpp"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
@ -33,6 +30,7 @@ namespace PE {
|
||||
class Parser;
|
||||
class Builder;
|
||||
class Binary;
|
||||
struct pe_section;
|
||||
|
||||
class LIEF_API Section : public LIEF::Section {
|
||||
|
||||
@ -41,75 +39,75 @@ class LIEF_API Section : public LIEF::Section {
|
||||
friend class Binary;
|
||||
|
||||
public:
|
||||
using LIEF::Section::name;
|
||||
using LIEF::Section::name;
|
||||
|
||||
Section(const pe_section* header);
|
||||
Section(void);
|
||||
Section(const std::vector<uint8_t>& data, const std::string& name = "", uint32_t characteristics = 0);
|
||||
Section(const std::string& name);
|
||||
Section(const pe_section* header);
|
||||
Section(void);
|
||||
Section(const std::vector<uint8_t>& data, const std::string& name = "", uint32_t characteristics = 0);
|
||||
Section(const std::string& name);
|
||||
|
||||
Section& operator=(const Section&);
|
||||
Section(const Section&);
|
||||
virtual ~Section(void);
|
||||
Section& operator=(const Section&);
|
||||
Section(const Section&);
|
||||
virtual ~Section(void);
|
||||
|
||||
//! @brief Return the size of the data in the section.
|
||||
uint32_t sizeof_raw_data(void) const;
|
||||
uint32_t virtual_size(void) const;
|
||||
//! @brief Return the size of the data in the section.
|
||||
uint32_t sizeof_raw_data(void) const;
|
||||
uint32_t virtual_size(void) const;
|
||||
|
||||
// ============================
|
||||
// LIEF::Section implementation
|
||||
// ============================
|
||||
virtual std::vector<uint8_t> content(void) const override;
|
||||
// ============================
|
||||
// LIEF::Section implementation
|
||||
// ============================
|
||||
virtual std::vector<uint8_t> content(void) const override;
|
||||
|
||||
|
||||
uint32_t pointerto_raw_data(void) const;
|
||||
uint32_t pointerto_relocation(void) const;
|
||||
uint32_t pointerto_line_numbers(void) const;
|
||||
uint16_t numberof_relocations(void) const;
|
||||
uint16_t numberof_line_numbers(void) const;
|
||||
uint32_t characteristics(void) const;
|
||||
uint32_t pointerto_raw_data(void) const;
|
||||
uint32_t pointerto_relocation(void) const;
|
||||
uint32_t pointerto_line_numbers(void) const;
|
||||
uint16_t numberof_relocations(void) const;
|
||||
uint16_t numberof_line_numbers(void) const;
|
||||
uint32_t characteristics(void) const;
|
||||
|
||||
bool is_type(PE_SECTION_TYPES type) const;
|
||||
const std::set<PE_SECTION_TYPES>& types(void) const;
|
||||
bool has_characteristic(SECTION_CHARACTERISTICS c) const;
|
||||
std::set<SECTION_CHARACTERISTICS> characteristics_list(void) const;
|
||||
void clear(uint8_t c);
|
||||
bool is_type(PE_SECTION_TYPES type) const;
|
||||
const std::set<PE_SECTION_TYPES>& types(void) const;
|
||||
bool has_characteristic(SECTION_CHARACTERISTICS c) const;
|
||||
std::set<SECTION_CHARACTERISTICS> characteristics_list(void) const;
|
||||
void clear(uint8_t c);
|
||||
|
||||
|
||||
virtual void name(const std::string& name) override;
|
||||
virtual void content(const std::vector<uint8_t>& data) override;
|
||||
void virtual_size(uint32_t virtualSize);
|
||||
void pointerto_raw_data(uint32_t pointerToRawData);
|
||||
void pointerto_relocation(uint32_t pointerToRelocation);
|
||||
void pointerto_line_numbers(uint32_t pointerToLineNumbers);
|
||||
void numberof_relocations(uint16_t numberOfRelocations);
|
||||
void numberof_line_numbers(uint16_t numberOfLineNumbers);
|
||||
void sizeof_raw_data(uint32_t sizeOfRawData);
|
||||
void characteristics(uint32_t characteristics);
|
||||
void type(PE_SECTION_TYPES type);
|
||||
void add_type(PE_SECTION_TYPES type);
|
||||
void remove_type(PE_SECTION_TYPES type);
|
||||
void add_characteristic(SECTION_CHARACTERISTICS characteristic);
|
||||
void remove_characteristic(SECTION_CHARACTERISTICS characteristic);
|
||||
virtual void name(const std::string& name) override;
|
||||
virtual void content(const std::vector<uint8_t>& data) override;
|
||||
void virtual_size(uint32_t virtualSize);
|
||||
void pointerto_raw_data(uint32_t pointerToRawData);
|
||||
void pointerto_relocation(uint32_t pointerToRelocation);
|
||||
void pointerto_line_numbers(uint32_t pointerToLineNumbers);
|
||||
void numberof_relocations(uint16_t numberOfRelocations);
|
||||
void numberof_line_numbers(uint16_t numberOfLineNumbers);
|
||||
void sizeof_raw_data(uint32_t sizeOfRawData);
|
||||
void characteristics(uint32_t characteristics);
|
||||
void type(PE_SECTION_TYPES type);
|
||||
void add_type(PE_SECTION_TYPES type);
|
||||
void remove_type(PE_SECTION_TYPES type);
|
||||
void add_characteristic(SECTION_CHARACTERISTICS characteristic);
|
||||
void remove_characteristic(SECTION_CHARACTERISTICS characteristic);
|
||||
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
bool operator==(const Section& rhs) const;
|
||||
bool operator!=(const Section& rhs) const;
|
||||
bool operator==(const Section& rhs) const;
|
||||
bool operator!=(const Section& rhs) const;
|
||||
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const Section& section);
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const Section& section);
|
||||
|
||||
private:
|
||||
std::vector<uint8_t>& content_ref(void);
|
||||
std::vector<uint8_t>& content_ref(void);
|
||||
|
||||
uint32_t virtualSize_;
|
||||
std::vector<uint8_t> content_;
|
||||
uint32_t pointerToRelocations_;
|
||||
uint32_t pointerToLineNumbers_;
|
||||
uint16_t numberOfRelocations_;
|
||||
uint16_t numberOfLineNumbers_;
|
||||
uint32_t characteristics_;
|
||||
std::set<PE_SECTION_TYPES> types_;
|
||||
uint32_t virtualSize_;
|
||||
std::vector<uint8_t> content_;
|
||||
uint32_t pointerToRelocations_;
|
||||
uint32_t pointerToLineNumbers_;
|
||||
uint16_t numberOfRelocations_;
|
||||
uint16_t numberOfLineNumbers_;
|
||||
uint32_t characteristics_;
|
||||
std::set<PE_SECTION_TYPES> types_;
|
||||
};
|
||||
|
||||
} // namespace PE
|
||||
|
@ -56,22 +56,6 @@ static const HEADER_CHARACTERISTICS header_characteristics_array[] = {
|
||||
};
|
||||
|
||||
|
||||
// Common section type
|
||||
enum class PE_SECTION_TYPES : uint8_t {
|
||||
TEXT = 0,
|
||||
TLS = 1,
|
||||
IMPORT = 2,
|
||||
DATA = 3,
|
||||
BSS = 4,
|
||||
RESOURCE = 5,
|
||||
RELOCATION = 6,
|
||||
EXPORT = 7,
|
||||
DEBUG = 8,
|
||||
LOAD_CONFIG = 9,
|
||||
UNKNOWN = 10
|
||||
};
|
||||
|
||||
|
||||
static const SECTION_CHARACTERISTICS section_characteristics_array[] = {
|
||||
SECTION_CHARACTERISTICS::IMAGE_SCN_TYPE_NO_PAD,
|
||||
SECTION_CHARACTERISTICS::IMAGE_SCN_CNT_CODE,
|
||||
@ -111,12 +95,6 @@ static const SECTION_CHARACTERISTICS section_characteristics_array[] = {
|
||||
};
|
||||
|
||||
|
||||
enum class PE_TYPE : uint16_t {
|
||||
PE32 = 0x10b, ///< 32bits
|
||||
PE32_PLUS = 0x20b ///< 64 bits
|
||||
};
|
||||
|
||||
|
||||
|
||||
static const DLL_CHARACTERISTICS dll_characteristics_array[] = {
|
||||
DLL_CHARACTERISTICS::IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA,
|
||||
|
@ -17,7 +17,6 @@
|
||||
#define LIEF_PE_SYMBOLS_H_
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
@ -25,16 +24,14 @@
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/Abstract/Symbol.hpp"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/AuxiliarySymbol.hpp"
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
class Parser;
|
||||
class Builder;
|
||||
class Section;
|
||||
|
||||
class LIEF_API Symbol : public LIEF::Symbol {
|
||||
|
||||
@ -62,7 +59,7 @@ class LIEF_API Symbol : public LIEF::Symbol {
|
||||
const Section& section(void) const;
|
||||
|
||||
//! @brief ``True`` if symbols are located in a section
|
||||
bool has_section(void) const;
|
||||
bool has_section(void) const;
|
||||
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
|
@ -18,15 +18,11 @@
|
||||
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "LIEF/Object.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/DataDirectory.hpp"
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
|
||||
|
||||
namespace LIEF {
|
||||
@ -34,6 +30,11 @@ namespace PE {
|
||||
|
||||
class Parser;
|
||||
class Builder;
|
||||
class DataDirectory;
|
||||
class Section;
|
||||
|
||||
struct pe32_tls;
|
||||
struct pe64_tls;
|
||||
|
||||
class LIEF_API TLS : public Object {
|
||||
friend class Parser;
|
||||
@ -41,57 +42,57 @@ class LIEF_API TLS : public Object {
|
||||
|
||||
public:
|
||||
|
||||
TLS(void);
|
||||
TLS(const pe32_tls *header);
|
||||
TLS(const pe64_tls *header);
|
||||
virtual ~TLS(void);
|
||||
TLS(void);
|
||||
TLS(const pe32_tls *header);
|
||||
TLS(const pe64_tls *header);
|
||||
virtual ~TLS(void);
|
||||
|
||||
|
||||
TLS(const TLS& copy);
|
||||
TLS& operator=(TLS copy);
|
||||
void swap(TLS& other);
|
||||
TLS(const TLS& copy);
|
||||
TLS& operator=(TLS copy);
|
||||
void swap(TLS& other);
|
||||
|
||||
const std::vector<uint64_t>& callbacks(void) const;
|
||||
std::pair<uint64_t, uint64_t> addressof_raw_data(void) const;
|
||||
uint64_t addressof_index(void) const;
|
||||
uint64_t addressof_callbacks(void) const;
|
||||
uint32_t sizeof_zero_fill(void) const;
|
||||
uint32_t characteristics(void) const;
|
||||
const std::vector<uint8_t>& data_template(void) const;
|
||||
const std::vector<uint64_t>& callbacks(void) const;
|
||||
std::pair<uint64_t, uint64_t> addressof_raw_data(void) const;
|
||||
uint64_t addressof_index(void) const;
|
||||
uint64_t addressof_callbacks(void) const;
|
||||
uint32_t sizeof_zero_fill(void) const;
|
||||
uint32_t characteristics(void) const;
|
||||
const std::vector<uint8_t>& data_template(void) const;
|
||||
|
||||
bool has_data_directory(void) const;
|
||||
DataDirectory& directory(void);
|
||||
const DataDirectory& directory(void) const;
|
||||
bool has_data_directory(void) const;
|
||||
DataDirectory& directory(void);
|
||||
const DataDirectory& directory(void) const;
|
||||
|
||||
bool has_section(void) const;
|
||||
Section& section(void);
|
||||
const Section& section(void) const;
|
||||
bool has_section(void) const;
|
||||
Section& section(void);
|
||||
const Section& section(void) const;
|
||||
|
||||
void callbacks(const std::vector<uint64_t>& callbacks);
|
||||
void addressof_raw_data(std::pair<uint64_t, uint64_t> VAOfRawData);
|
||||
void addressof_index(uint64_t addressOfIndex);
|
||||
void addressof_callbacks(uint64_t addressOfCallbacks);
|
||||
void sizeof_zero_fill(uint32_t sizeOfZeroFill);
|
||||
void characteristics(uint32_t characteristics);
|
||||
void data_template(const std::vector<uint8_t>& dataTemplate);
|
||||
void callbacks(const std::vector<uint64_t>& callbacks);
|
||||
void addressof_raw_data(std::pair<uint64_t, uint64_t> VAOfRawData);
|
||||
void addressof_index(uint64_t addressOfIndex);
|
||||
void addressof_callbacks(uint64_t addressOfCallbacks);
|
||||
void sizeof_zero_fill(uint32_t sizeOfZeroFill);
|
||||
void characteristics(uint32_t characteristics);
|
||||
void data_template(const std::vector<uint8_t>& dataTemplate);
|
||||
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
virtual void accept(Visitor& visitor) const override;
|
||||
|
||||
bool operator==(const TLS& rhs) const;
|
||||
bool operator!=(const TLS& rhs) const;
|
||||
bool operator==(const TLS& rhs) const;
|
||||
bool operator!=(const TLS& rhs) const;
|
||||
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const TLS& entry);
|
||||
LIEF_API friend std::ostream& operator<<(std::ostream& os, const TLS& entry);
|
||||
|
||||
private:
|
||||
std::vector<uint64_t> callbacks_;
|
||||
std::pair<uint64_t, uint64_t> VAOfRawData_;
|
||||
uint64_t addressof_index_;
|
||||
uint64_t addressof_callbacks_;
|
||||
uint32_t sizeof_zero_fill_;
|
||||
uint32_t characteristics_;
|
||||
DataDirectory* directory_;
|
||||
Section* section_;
|
||||
std::vector<uint8_t> data_template_;
|
||||
std::vector<uint64_t> callbacks_;
|
||||
std::pair<uint64_t, uint64_t> VAOfRawData_;
|
||||
uint64_t addressof_index_;
|
||||
uint64_t addressof_callbacks_;
|
||||
uint32_t sizeof_zero_fill_;
|
||||
uint32_t characteristics_;
|
||||
DataDirectory* directory_{nullptr};
|
||||
Section* section_{nullptr};
|
||||
std::vector<uint8_t> data_template_;
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef LIEF_PE_ENUMS_H_
|
||||
#define LIEF_PE_ENUMS_H_
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <cstddef>
|
||||
#include "LIEF/enums.hpp"
|
||||
#include "LIEF/PE/undef.h"
|
||||
|
||||
@ -9,6 +10,28 @@ namespace PE {
|
||||
|
||||
@LIEF_PE_ENUMS@
|
||||
|
||||
|
||||
// Common section type
|
||||
enum class PE_SECTION_TYPES : uint8_t {
|
||||
TEXT = 0,
|
||||
TLS = 1,
|
||||
IMPORT = 2,
|
||||
DATA = 3,
|
||||
BSS = 4,
|
||||
RESOURCE = 5,
|
||||
RELOCATION = 6,
|
||||
EXPORT = 7,
|
||||
DEBUG = 8,
|
||||
LOAD_CONFIG = 9,
|
||||
UNKNOWN = 10
|
||||
};
|
||||
|
||||
enum class PE_TYPE : uint16_t {
|
||||
PE32 = 0x10b, ///< 32bits
|
||||
PE32_PLUS = 0x20b ///< 64 bits
|
||||
};
|
||||
|
||||
|
||||
static const RESOURCE_TYPES resource_types_array[] = {
|
||||
RESOURCE_TYPES::CURSOR,
|
||||
RESOURCE_TYPES::BITMAP,
|
||||
|
@ -19,12 +19,61 @@
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
#include "LIEF/hash.hpp"
|
||||
#include "LIEF/PE.hpp"
|
||||
#include "LIEF/Abstract/hash.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
class Binary;
|
||||
class DosHeader;
|
||||
class RichHeader;
|
||||
class RichEntry;
|
||||
class Header;
|
||||
class OptionalHeader;
|
||||
class DataDirectory;
|
||||
class Section;
|
||||
class Relocation;
|
||||
class RelocationEntry;
|
||||
class Export;
|
||||
class ExportEntry;
|
||||
class TLS;
|
||||
class Symbol;
|
||||
class Debug;
|
||||
class CodeView;
|
||||
class CodeViewPDB;
|
||||
class Import;
|
||||
class ImportEntry;
|
||||
class ResourceNode;
|
||||
class ResourceData;
|
||||
class ResourceDirectory;
|
||||
class ResourcesManager;
|
||||
class ResourceVersion;
|
||||
class ResourceStringFileInfo;
|
||||
class ResourceFixedFileInfo;
|
||||
class ResourceVarFileInfo;
|
||||
class LangCodeItem;
|
||||
class ResourceIcon;
|
||||
class ResourceDialog;
|
||||
class ResourceDialogItem;
|
||||
class ResourceStringTable;
|
||||
class ResourceAccelerator;
|
||||
class Signature;
|
||||
class x509;
|
||||
class SignerInfo;
|
||||
class AuthenticatedAttributes;
|
||||
class CodeIntegrity;
|
||||
class LoadConfiguration;
|
||||
class LoadConfigurationV0;
|
||||
class LoadConfigurationV1;
|
||||
class LoadConfigurationV2;
|
||||
class LoadConfigurationV3;
|
||||
class LoadConfigurationV4;
|
||||
class LoadConfigurationV5;
|
||||
class LoadConfigurationV6;
|
||||
class LoadConfigurationV7;
|
||||
class Pogo;
|
||||
class PogoEntry;
|
||||
|
||||
class LIEF_API Hash : public LIEF::Hash {
|
||||
public:
|
||||
static size_t hash(const Object& obj);
|
||||
|
@ -19,11 +19,66 @@
|
||||
|
||||
#include "LIEF/visibility.h"
|
||||
#include "LIEF/visitors/json.hpp"
|
||||
#include "LIEF/PE.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
|
||||
class Binary;
|
||||
class Symbol;
|
||||
class Section;
|
||||
|
||||
namespace PE {
|
||||
|
||||
class Binary;
|
||||
class DosHeader;
|
||||
class RichHeader;
|
||||
class RichEntry;
|
||||
class Header;
|
||||
class OptionalHeader;
|
||||
class DataDirectory;
|
||||
class Section;
|
||||
class Relocation;
|
||||
class RelocationEntry;
|
||||
class Export;
|
||||
class ExportEntry;
|
||||
class TLS;
|
||||
class Symbol;
|
||||
class Debug;
|
||||
class CodeView;
|
||||
class CodeViewPDB;
|
||||
class Import;
|
||||
class ImportEntry;
|
||||
class ResourceNode;
|
||||
class ResourceData;
|
||||
class ResourceDirectory;
|
||||
class ResourcesManager;
|
||||
class ResourceVersion;
|
||||
class ResourceStringFileInfo;
|
||||
class ResourceFixedFileInfo;
|
||||
class ResourceVarFileInfo;
|
||||
class ResourceStringTable;
|
||||
class ResourceAccelerator;
|
||||
class LangCodeItem;
|
||||
class ResourceIcon;
|
||||
class ResourceDialog;
|
||||
class ResourceDialogItem;
|
||||
class Signature;
|
||||
class x509;
|
||||
class SignerInfo;
|
||||
class ContentInfo;
|
||||
class AuthenticatedAttributes;
|
||||
class CodeIntegrity;
|
||||
class LoadConfiguration;
|
||||
class LoadConfigurationV0;
|
||||
class LoadConfigurationV1;
|
||||
class LoadConfigurationV2;
|
||||
class LoadConfigurationV3;
|
||||
class LoadConfigurationV4;
|
||||
class LoadConfigurationV5;
|
||||
class LoadConfigurationV6;
|
||||
class LoadConfigurationV7;
|
||||
class Pogo;
|
||||
class PogoEntry;
|
||||
|
||||
LIEF_API json to_json(const Object& v);
|
||||
LIEF_API std::string to_json_str(const Object& v);
|
||||
|
||||
|
@ -18,15 +18,13 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "LIEF/BinaryStream/VectorStream.hpp"
|
||||
|
||||
#include "LIEF/PE/signature/Signature.hpp"
|
||||
#include "LIEF/PE/signature/OIDToString.hpp"
|
||||
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
class VectorStream;
|
||||
|
||||
namespace PE {
|
||||
class Parser;
|
||||
|
||||
class LIEF_API SignatureParser {
|
||||
@ -58,9 +56,9 @@ class LIEF_API SignatureParser {
|
||||
|
||||
size_t current_offset(void) const;
|
||||
Signature signature_;
|
||||
uint8_t* p_;
|
||||
const uint8_t* end_;
|
||||
const uint8_t* signature_ptr_;
|
||||
uint8_t* p_{nullptr};
|
||||
const uint8_t* end_{nullptr};
|
||||
const uint8_t* signature_ptr_{nullptr};
|
||||
std::unique_ptr<VectorStream> stream_;
|
||||
|
||||
};
|
||||
|
@ -45,9 +45,9 @@ struct pe_symbol {
|
||||
union {
|
||||
char ShortName[8];
|
||||
struct
|
||||
{
|
||||
uint32_t Zeroes;
|
||||
uint32_t Offset;
|
||||
{
|
||||
uint32_t Zeroes;
|
||||
uint32_t Offset;
|
||||
} Name;
|
||||
} Name;
|
||||
uint32_t Value;
|
||||
@ -287,7 +287,7 @@ struct pe_pdb_20 {
|
||||
struct pe_pogo {
|
||||
uint32_t start_rva;
|
||||
uint32_t size;
|
||||
char name[1];
|
||||
char name[1];
|
||||
};
|
||||
|
||||
|
||||
@ -386,26 +386,26 @@ struct pe_resource_icon_dir {
|
||||
|
||||
//! @brief Structure that follows pe_resource_icon_dir in a resource entry
|
||||
struct pe_resource_icon_group {
|
||||
uint8_t width; ///< Width, in pixels, of the image
|
||||
uint8_t height; ///< Height, in pixels, of the image
|
||||
uint8_t color_count; ///< Number of colors in image (0 if >=8bpp)
|
||||
uint8_t reserved; ///< Reserved (must be 0)
|
||||
uint16_t planes; ///< Color Planes
|
||||
uint16_t bit_count; ///< Bits per pixel
|
||||
uint32_t size; ///< Size of the image in bytes
|
||||
uint16_t ID; ///< The associated ID
|
||||
uint8_t width; ///< Width, in pixels, of the image
|
||||
uint8_t height; ///< Height, in pixels, of the image
|
||||
uint8_t color_count; ///< Number of colors in image (0 if >=8bpp)
|
||||
uint8_t reserved; ///< Reserved (must be 0)
|
||||
uint16_t planes; ///< Color Planes
|
||||
uint16_t bit_count; ///< Bits per pixel
|
||||
uint32_t size; ///< Size of the image in bytes
|
||||
uint16_t ID; ///< The associated ID
|
||||
};
|
||||
|
||||
//! @brief Structure that follows pe_resource_icon_dir in a icon **file**
|
||||
struct pe_icon_header {
|
||||
uint8_t width; ///< Width, in pixels, of the image
|
||||
uint8_t height; ///< Height, in pixels, of the image
|
||||
uint8_t color_count; ///< Number of colors in image (0 if >=8bpp)
|
||||
uint8_t reserved; ///< Reserved (must be 0)
|
||||
uint16_t planes; ///< Color Planes
|
||||
uint16_t bit_count; ///< Bits per pixel
|
||||
uint32_t size; ///< Size of the image in bytes
|
||||
uint32_t offset; ///< Offset to the pixels
|
||||
uint8_t width; ///< Width, in pixels, of the image
|
||||
uint8_t height; ///< Height, in pixels, of the image
|
||||
uint8_t color_count; ///< Number of colors in image (0 if >=8bpp)
|
||||
uint8_t reserved; ///< Reserved (must be 0)
|
||||
uint16_t planes; ///< Color Planes
|
||||
uint16_t bit_count; ///< Bits per pixel
|
||||
uint32_t size; ///< Size of the image in bytes
|
||||
uint32_t offset; ///< Offset to the pixels
|
||||
};
|
||||
|
||||
//! @brief Extended dialog box template
|
||||
|
@ -15,24 +15,22 @@
|
||||
*/
|
||||
#ifndef LIEF_PE_UTILS_H_
|
||||
#define LIEF_PE_UTILS_H_
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <locale>
|
||||
#include <memory>
|
||||
|
||||
#include "LIEF/PE/enums.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
#include "LIEF/PE/Import.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
class Binary;
|
||||
class Import;
|
||||
|
||||
//! @brief check if the `file` is a PE file
|
||||
//! @brief check if the `file` is a PE file
|
||||
LIEF_API bool is_pe(const std::string& file);
|
||||
|
||||
//! @brief check if the raw data is a PE file
|
||||
//! @brief check if the raw data is a PE file
|
||||
LIEF_API bool is_pe(const std::vector<uint8_t>& raw);
|
||||
|
||||
//! @brief if the input `file` is a PE one, return `PE32` or `PE32+`
|
||||
|
@ -1,19 +1,19 @@
|
||||
/* Copyright 2017 R. Thomas
|
||||
* Copyright 2017 Quarkslab
|
||||
* Copyright 2020 K. Nakagawa
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
* Copyright 2017 Quarkslab
|
||||
* Copyright 2020 K. Nakagawa
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifndef LIEF_VISITOR_H_
|
||||
#define LIEF_VISITOR_H_
|
||||
#include <set>
|
||||
@ -196,189 +196,189 @@ LIEF_ART_FORWARD(Header)
|
||||
|
||||
|
||||
class LIEF_API Visitor {
|
||||
public:
|
||||
Visitor(void);
|
||||
virtual ~Visitor(void);
|
||||
public:
|
||||
Visitor(void);
|
||||
virtual ~Visitor(void);
|
||||
|
||||
virtual void operator()(void);
|
||||
virtual void operator()(void);
|
||||
|
||||
template<typename Arg1, typename... Args>
|
||||
void operator()(Arg1&& arg1, Args&&... args);
|
||||
template<typename Arg1, typename... Args>
|
||||
void operator()(Arg1&& arg1, Args&&... args);
|
||||
|
||||
virtual void visit(const Object&);
|
||||
virtual void visit(const Object&);
|
||||
|
||||
// Abstract Part
|
||||
// =============
|
||||
// Abstract Part
|
||||
// =============
|
||||
|
||||
//! Method to visit a LIEF::Binary
|
||||
LIEF_ABSTRACT_VISITABLE(Binary)
|
||||
//! Method to visit a LIEF::Binary
|
||||
LIEF_ABSTRACT_VISITABLE(Binary)
|
||||
|
||||
//! Method to visit a LIEF::Header
|
||||
LIEF_ABSTRACT_VISITABLE(Header)
|
||||
//! Method to visit a LIEF::Header
|
||||
LIEF_ABSTRACT_VISITABLE(Header)
|
||||
|
||||
//! Method to visit a LIEF::Section
|
||||
LIEF_ABSTRACT_VISITABLE(Section)
|
||||
//! Method to visit a LIEF::Section
|
||||
LIEF_ABSTRACT_VISITABLE(Section)
|
||||
|
||||
//! Method to visit a LIEF::Symbol
|
||||
LIEF_ABSTRACT_VISITABLE(Symbol)
|
||||
//! Method to visit a LIEF::Symbol
|
||||
LIEF_ABSTRACT_VISITABLE(Symbol)
|
||||
|
||||
//! Method to visit a LIEF::Relocation
|
||||
LIEF_ABSTRACT_VISITABLE(Relocation)
|
||||
//! Method to visit a LIEF::Relocation
|
||||
LIEF_ABSTRACT_VISITABLE(Relocation)
|
||||
|
||||
//! Method to visit a LIEF::Function
|
||||
LIEF_ABSTRACT_VISITABLE(Function)
|
||||
//! Method to visit a LIEF::Function
|
||||
LIEF_ABSTRACT_VISITABLE(Function)
|
||||
|
||||
LIEF_ELF_VISITABLE(Binary)
|
||||
LIEF_ELF_VISITABLE(Header)
|
||||
LIEF_ELF_VISITABLE(Section)
|
||||
LIEF_ELF_VISITABLE(Segment)
|
||||
LIEF_ELF_VISITABLE(DynamicEntry)
|
||||
LIEF_ELF_VISITABLE(DynamicEntryArray)
|
||||
LIEF_ELF_VISITABLE(DynamicEntryLibrary)
|
||||
LIEF_ELF_VISITABLE(DynamicSharedObject)
|
||||
LIEF_ELF_VISITABLE(DynamicEntryRunPath)
|
||||
LIEF_ELF_VISITABLE(DynamicEntryRpath)
|
||||
LIEF_ELF_VISITABLE(DynamicEntryFlags)
|
||||
LIEF_ELF_VISITABLE(Symbol)
|
||||
LIEF_ELF_VISITABLE(Relocation)
|
||||
LIEF_ELF_VISITABLE(SymbolVersion)
|
||||
LIEF_ELF_VISITABLE(SymbolVersionRequirement)
|
||||
LIEF_ELF_VISITABLE(SymbolVersionDefinition)
|
||||
LIEF_ELF_VISITABLE(SymbolVersionAux)
|
||||
LIEF_ELF_VISITABLE(SymbolVersionAuxRequirement)
|
||||
LIEF_ELF_VISITABLE(Note)
|
||||
LIEF_ELF_VISITABLE(NoteDetails)
|
||||
LIEF_ELF_VISITABLE(AndroidNote)
|
||||
LIEF_ELF_VISITABLE(NoteAbi)
|
||||
LIEF_ELF_VISITABLE(CorePrPsInfo)
|
||||
LIEF_ELF_VISITABLE(CorePrStatus)
|
||||
LIEF_ELF_VISITABLE(CoreAuxv)
|
||||
LIEF_ELF_VISITABLE(CoreSigInfo)
|
||||
LIEF_ELF_VISITABLE(CoreFile)
|
||||
LIEF_ELF_VISITABLE(GnuHash)
|
||||
LIEF_ELF_VISITABLE(SysvHash)
|
||||
LIEF_ELF_VISITABLE(Binary)
|
||||
LIEF_ELF_VISITABLE(Header)
|
||||
LIEF_ELF_VISITABLE(Section)
|
||||
LIEF_ELF_VISITABLE(Segment)
|
||||
LIEF_ELF_VISITABLE(DynamicEntry)
|
||||
LIEF_ELF_VISITABLE(DynamicEntryArray)
|
||||
LIEF_ELF_VISITABLE(DynamicEntryLibrary)
|
||||
LIEF_ELF_VISITABLE(DynamicSharedObject)
|
||||
LIEF_ELF_VISITABLE(DynamicEntryRunPath)
|
||||
LIEF_ELF_VISITABLE(DynamicEntryRpath)
|
||||
LIEF_ELF_VISITABLE(DynamicEntryFlags)
|
||||
LIEF_ELF_VISITABLE(Symbol)
|
||||
LIEF_ELF_VISITABLE(Relocation)
|
||||
LIEF_ELF_VISITABLE(SymbolVersion)
|
||||
LIEF_ELF_VISITABLE(SymbolVersionRequirement)
|
||||
LIEF_ELF_VISITABLE(SymbolVersionDefinition)
|
||||
LIEF_ELF_VISITABLE(SymbolVersionAux)
|
||||
LIEF_ELF_VISITABLE(SymbolVersionAuxRequirement)
|
||||
LIEF_ELF_VISITABLE(Note)
|
||||
LIEF_ELF_VISITABLE(NoteDetails)
|
||||
LIEF_ELF_VISITABLE(AndroidNote)
|
||||
LIEF_ELF_VISITABLE(NoteAbi)
|
||||
LIEF_ELF_VISITABLE(CorePrPsInfo)
|
||||
LIEF_ELF_VISITABLE(CorePrStatus)
|
||||
LIEF_ELF_VISITABLE(CoreAuxv)
|
||||
LIEF_ELF_VISITABLE(CoreSigInfo)
|
||||
LIEF_ELF_VISITABLE(CoreFile)
|
||||
LIEF_ELF_VISITABLE(GnuHash)
|
||||
LIEF_ELF_VISITABLE(SysvHash)
|
||||
|
||||
// PE Part
|
||||
// =======
|
||||
//! Method to visit a LIEF::PE::Binary
|
||||
LIEF_PE_VISITABLE(Binary)
|
||||
// PE Part
|
||||
// =======
|
||||
//! Method to visit a LIEF::PE::Binary
|
||||
LIEF_PE_VISITABLE(Binary)
|
||||
|
||||
//! Method to visit a LIEF::PE::DosHeader
|
||||
LIEF_PE_VISITABLE(DosHeader)
|
||||
//! Method to visit a LIEF::PE::DosHeader
|
||||
LIEF_PE_VISITABLE(DosHeader)
|
||||
|
||||
//! Method to visit a LIEF::PE:RichHeader
|
||||
LIEF_PE_VISITABLE(RichHeader)
|
||||
//! Method to visit a LIEF::PE:RichHeader
|
||||
LIEF_PE_VISITABLE(RichHeader)
|
||||
|
||||
//! Method to visit a LIEF::PE:RichEntry
|
||||
LIEF_PE_VISITABLE(RichEntry)
|
||||
//! Method to visit a LIEF::PE:RichEntry
|
||||
LIEF_PE_VISITABLE(RichEntry)
|
||||
|
||||
//! Method to visit a LIEF::PE::Header
|
||||
LIEF_PE_VISITABLE(Header)
|
||||
//! Method to visit a LIEF::PE::Header
|
||||
LIEF_PE_VISITABLE(Header)
|
||||
|
||||
//! Method to visit a LIEF::PE::OptionalHeader
|
||||
LIEF_PE_VISITABLE(OptionalHeader)
|
||||
//! Method to visit a LIEF::PE::OptionalHeader
|
||||
LIEF_PE_VISITABLE(OptionalHeader)
|
||||
|
||||
//! Method to visit a LIEF::PE::DataDirectory
|
||||
LIEF_PE_VISITABLE(DataDirectory)
|
||||
//! Method to visit a LIEF::PE::DataDirectory
|
||||
LIEF_PE_VISITABLE(DataDirectory)
|
||||
|
||||
//! Method to visit a LIEF::PE::TLS
|
||||
LIEF_PE_VISITABLE(TLS)
|
||||
//! Method to visit a LIEF::PE::TLS
|
||||
LIEF_PE_VISITABLE(TLS)
|
||||
|
||||
//! Method to visit a LIEF::PE::Symbol
|
||||
LIEF_PE_VISITABLE(Symbol)
|
||||
//! Method to visit a LIEF::PE::Symbol
|
||||
LIEF_PE_VISITABLE(Symbol)
|
||||
|
||||
//! Method to visit a LIEF::PE::Section
|
||||
LIEF_PE_VISITABLE(Section)
|
||||
//! Method to visit a LIEF::PE::Section
|
||||
LIEF_PE_VISITABLE(Section)
|
||||
|
||||
//! Method to visit a LIEF::PE::Relocation
|
||||
LIEF_PE_VISITABLE(Relocation)
|
||||
//! Method to visit a LIEF::PE::Relocation
|
||||
LIEF_PE_VISITABLE(Relocation)
|
||||
|
||||
//! Method to visit a LIEF::PE::RelocationEntry
|
||||
LIEF_PE_VISITABLE(RelocationEntry)
|
||||
//! Method to visit a LIEF::PE::RelocationEntry
|
||||
LIEF_PE_VISITABLE(RelocationEntry)
|
||||
|
||||
//! Method to visit a LIEF::PE::Export
|
||||
LIEF_PE_VISITABLE(Export)
|
||||
//! Method to visit a LIEF::PE::Export
|
||||
LIEF_PE_VISITABLE(Export)
|
||||
|
||||
//! Method to visit a LIEF::PE::ExportEntry
|
||||
LIEF_PE_VISITABLE(ExportEntry)
|
||||
//! Method to visit a LIEF::PE::ExportEntry
|
||||
LIEF_PE_VISITABLE(ExportEntry)
|
||||
|
||||
//! Method to visit a LIEF::PE::Debug
|
||||
LIEF_PE_VISITABLE(Debug)
|
||||
//! Method to visit a LIEF::PE::Debug
|
||||
LIEF_PE_VISITABLE(Debug)
|
||||
|
||||
//! Method to visit a LIEF::PE::CodeView
|
||||
LIEF_PE_VISITABLE(CodeView)
|
||||
//! Method to visit a LIEF::PE::CodeView
|
||||
LIEF_PE_VISITABLE(CodeView)
|
||||
|
||||
//! Method to visit a LIEF::PE::CodeViewPDB
|
||||
LIEF_PE_VISITABLE(CodeViewPDB)
|
||||
//! Method to visit a LIEF::PE::CodeViewPDB
|
||||
LIEF_PE_VISITABLE(CodeViewPDB)
|
||||
|
||||
//! Method to visit a LIEF::PE::Import
|
||||
LIEF_PE_VISITABLE(Import)
|
||||
//! Method to visit a LIEF::PE::Import
|
||||
LIEF_PE_VISITABLE(Import)
|
||||
|
||||
//! Method to visit a LIEF::PE::ImportEntry
|
||||
LIEF_PE_VISITABLE(ImportEntry)
|
||||
//! Method to visit a LIEF::PE::ImportEntry
|
||||
LIEF_PE_VISITABLE(ImportEntry)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceNode
|
||||
LIEF_PE_VISITABLE(ResourceNode)
|
||||
//! Method to visit a LIEF::PE::ResourceNode
|
||||
LIEF_PE_VISITABLE(ResourceNode)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceData
|
||||
LIEF_PE_VISITABLE(ResourceData)
|
||||
//! Method to visit a LIEF::PE::ResourceData
|
||||
LIEF_PE_VISITABLE(ResourceData)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceDirectory
|
||||
LIEF_PE_VISITABLE(ResourceDirectory)
|
||||
//! Method to visit a LIEF::PE::ResourceDirectory
|
||||
LIEF_PE_VISITABLE(ResourceDirectory)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceVersion
|
||||
LIEF_PE_VISITABLE(ResourcesManager)
|
||||
//! Method to visit a LIEF::PE::ResourceVersion
|
||||
LIEF_PE_VISITABLE(ResourcesManager)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceVersion
|
||||
LIEF_PE_VISITABLE(ResourceVersion)
|
||||
//! Method to visit a LIEF::PE::ResourceVersion
|
||||
LIEF_PE_VISITABLE(ResourceVersion)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceStringFileInfo
|
||||
LIEF_PE_VISITABLE(ResourceStringFileInfo)
|
||||
//! Method to visit a LIEF::PE::ResourceStringFileInfo
|
||||
LIEF_PE_VISITABLE(ResourceStringFileInfo)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceFixedFileInfo
|
||||
LIEF_PE_VISITABLE(ResourceFixedFileInfo)
|
||||
//! Method to visit a LIEF::PE::ResourceFixedFileInfo
|
||||
LIEF_PE_VISITABLE(ResourceFixedFileInfo)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceVarFileInfo
|
||||
LIEF_PE_VISITABLE(ResourceVarFileInfo)
|
||||
//! Method to visit a LIEF::PE::ResourceVarFileInfo
|
||||
LIEF_PE_VISITABLE(ResourceVarFileInfo)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceStringTable
|
||||
LIEF_PE_VISITABLE(ResourceStringTable)
|
||||
//! Method to visit a LIEF::PE::ResourceStringTable
|
||||
LIEF_PE_VISITABLE(ResourceStringTable)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceAccelerator
|
||||
LIEF_PE_VISITABLE(ResourceAccelerator)
|
||||
//! Method to visit a LIEF::PE::ResourceAccelerator
|
||||
LIEF_PE_VISITABLE(ResourceAccelerator)
|
||||
|
||||
//! Method to visit a LIEF::PE::LangCodeItem
|
||||
LIEF_PE_VISITABLE(LangCodeItem)
|
||||
//! Method to visit a LIEF::PE::LangCodeItem
|
||||
LIEF_PE_VISITABLE(LangCodeItem)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceIcon
|
||||
LIEF_PE_VISITABLE(ResourceIcon)
|
||||
//! Method to visit a LIEF::PE::ResourceIcon
|
||||
LIEF_PE_VISITABLE(ResourceIcon)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceDialog
|
||||
LIEF_PE_VISITABLE(ResourceDialog)
|
||||
//! Method to visit a LIEF::PE::ResourceDialog
|
||||
LIEF_PE_VISITABLE(ResourceDialog)
|
||||
|
||||
//! Method to visit a LIEF::PE::ResourceDialogItem
|
||||
LIEF_PE_VISITABLE(ResourceDialogItem)
|
||||
//! Method to visit a LIEF::PE::ResourceDialogItem
|
||||
LIEF_PE_VISITABLE(ResourceDialogItem)
|
||||
|
||||
//! Method to visit a LIEF::PE::Signature
|
||||
LIEF_PE_VISITABLE(Signature)
|
||||
//! Method to visit a LIEF::PE::Signature
|
||||
LIEF_PE_VISITABLE(Signature)
|
||||
|
||||
//! Method to visit a LIEF::PE::x509
|
||||
LIEF_PE_VISITABLE(x509)
|
||||
//! Method to visit a LIEF::PE::x509
|
||||
LIEF_PE_VISITABLE(x509)
|
||||
|
||||
//! Method to visit a LIEF::PE::SignerInfo
|
||||
LIEF_PE_VISITABLE(SignerInfo)
|
||||
//! Method to visit a LIEF::PE::SignerInfo
|
||||
LIEF_PE_VISITABLE(SignerInfo)
|
||||
|
||||
//! Method to visit a LIEF::PE::ContentInfo
|
||||
LIEF_PE_VISITABLE(ContentInfo)
|
||||
//! Method to visit a LIEF::PE::ContentInfo
|
||||
LIEF_PE_VISITABLE(ContentInfo)
|
||||
|
||||
//! Method to visit a LIEF::PE::AuthenticatedAttributes
|
||||
LIEF_PE_VISITABLE(AuthenticatedAttributes)
|
||||
//! Method to visit a LIEF::PE::AuthenticatedAttributes
|
||||
LIEF_PE_VISITABLE(AuthenticatedAttributes)
|
||||
|
||||
//! Method to visit a LIEF::PE::issuer_t
|
||||
LIEF_PE_VISITABLE(issuer_t)
|
||||
//! Method to visit a LIEF::PE::issuer_t
|
||||
LIEF_PE_VISITABLE(issuer_t)
|
||||
|
||||
//! Method to visit a LIEF::PE::LoadConfiguration
|
||||
LIEF_PE_VISITABLE(LoadConfiguration)
|
||||
//! Method to visit a LIEF::PE::LoadConfiguration
|
||||
LIEF_PE_VISITABLE(LoadConfiguration)
|
||||
|
||||
//! Method to visit a LIEF::PE::LoadConfigurationV0
|
||||
LIEF_PE_VISITABLE(LoadConfigurationV0)
|
||||
|
@ -16,10 +16,11 @@
|
||||
#ifndef LIEF_UTILS_HEADER
|
||||
#define LIEF_UTILS_HEADER
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "LIEF/types.hpp"
|
||||
#include "LIEF/visibility.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace LIEF {
|
||||
uint64_t align(uint64_t value, uint64_t align_on);
|
||||
@ -73,10 +74,8 @@ LIEF_API std::string hex_str(uint8_t c);
|
||||
//! Check if the given string in printable
|
||||
LIEF_API bool is_printable(const std::string& str);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace LIEF {
|
||||
namespace LEB128 {
|
||||
std::vector<uint8_t> uencode(uint64_t value);
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include "LIEF/PE/utils.hpp"
|
||||
#include "LIEF/PE/Parser.hpp"
|
||||
#include "LIEF/PE/Binary.hpp"
|
||||
|
||||
#include "LIEF/MachO/utils.hpp"
|
||||
#include "LIEF/MachO/Parser.hpp"
|
||||
|
@ -15,12 +15,14 @@
|
||||
*/
|
||||
#include "LIEF/Abstract/json.hpp"
|
||||
#include "LIEF/Abstract.hpp"
|
||||
|
||||
#include "LIEF/ELF.hpp"
|
||||
#include "LIEF/PE.hpp"
|
||||
#include "LIEF/MachO.hpp"
|
||||
#include "Object.tcc"
|
||||
#include "LIEF/config.h"
|
||||
|
||||
#include "Object.tcc"
|
||||
|
||||
namespace LIEF {
|
||||
|
||||
json to_json_from_abstract(const Object& v) {
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
namespace LIEF {
|
||||
BinaryStream::~BinaryStream(void) = default;
|
||||
BinaryStream::BinaryStream(void) = default;
|
||||
|
||||
@ -276,4 +277,5 @@ std::string BinaryStream::read_mutf8(size_t maxsize) const {
|
||||
void BinaryStream::set_endian_swap(bool swap) {
|
||||
this->endian_swap_ = swap;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include "LIEF/BinaryStream/VectorStream.hpp"
|
||||
#include "LIEF/exception.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
VectorStream::VectorStream(const std::string& filename) {
|
||||
std::ifstream binary(filename, std::ios::in | std::ios::binary);
|
||||
|
||||
@ -70,10 +70,8 @@ const void* VectorStream::read_at(uint64_t offset, uint64_t size, bool throw_err
|
||||
return this->binary_.data() + offset;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const std::vector<uint8_t>& VectorStream::content(void) const {
|
||||
return this->binary_;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,16 +22,29 @@
|
||||
|
||||
#include "logging.hpp"
|
||||
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
#include "LIEF/exception.hpp"
|
||||
#include "LIEF/utils.hpp"
|
||||
#include "LIEF/BinaryStream/VectorStream.hpp"
|
||||
|
||||
#include "LIEF/Abstract/Relocation.hpp"
|
||||
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/Binary.hpp"
|
||||
#include "LIEF/PE/Builder.hpp"
|
||||
#include "LIEF/PE/utils.hpp"
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
#include "LIEF/PE/ResourceDirectory.hpp"
|
||||
#include "LIEF/PE/ResourceData.hpp"
|
||||
#include "LIEF/PE/DataDirectory.hpp"
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
#include "LIEF/PE/Relocation.hpp"
|
||||
#include "LIEF/PE/RelocationEntry.hpp"
|
||||
#include "LIEF/PE/ImportEntry.hpp"
|
||||
#include "LIEF/PE/ExportEntry.hpp"
|
||||
#include "LIEF/PE/ResourcesManager.hpp"
|
||||
#include "LIEF/PE/Symbol.hpp"
|
||||
#include "LIEF/PE/LoadConfigurations/LoadConfiguration.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -25,11 +25,20 @@
|
||||
#include "LIEF/exception.hpp"
|
||||
|
||||
#include "LIEF/PE/Builder.hpp"
|
||||
#include "Builder.tcc"
|
||||
#include "LIEF/PE/ResourceData.hpp"
|
||||
#include "LIEF/PE/utils.hpp"
|
||||
#include "LIEF/PE/ImportEntry.hpp"
|
||||
#include "LIEF/PE/Import.hpp"
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
#include "LIEF/PE/ResourceDirectory.hpp"
|
||||
#include "LIEF/PE/DataDirectory.hpp"
|
||||
#include "LIEF/PE/Relocation.hpp"
|
||||
#include "LIEF/PE/RelocationEntry.hpp"
|
||||
#include "LIEF/PE/Symbol.hpp"
|
||||
#include "LIEF/PE/Export.hpp"
|
||||
#include "LIEF/PE/ExportEntry.hpp"
|
||||
|
||||
|
||||
#include "Builder.tcc"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
#include "LIEF/PE/CodeIntegrity.hpp"
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
#include "LIEF/exception.hpp"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
#include "LIEF/PE/DataDirectory.hpp"
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
|
||||
|
@ -17,8 +17,11 @@
|
||||
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
#include "LIEF/PE/Debug.hpp"
|
||||
#include "LIEF/PE/CodeView.hpp"
|
||||
#include "LIEF/PE/Pogo.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
|
||||
#include "LIEF/PE/DosHeader.hpp"
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -17,7 +17,9 @@
|
||||
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/Export.hpp"
|
||||
#include "LIEF/PE/ExportEntry.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
#include "LIEF/PE/Header.hpp"
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
#include "LIEF/exception.hpp"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/ImportEntry.hpp"
|
||||
#include "LIEF/PE/Import.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
#include "LIEF/exception.hpp"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/LoadConfigurations.hpp"
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
|
||||
|
@ -13,18 +13,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <stdexcept>
|
||||
#include <iomanip>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
#include <iomanip>
|
||||
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
#include "LIEF/utils.hpp"
|
||||
#include "LIEF/exception.hpp"
|
||||
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/OptionalHeader.hpp"
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
#include "LIEF/PE/utils.hpp"
|
||||
|
@ -23,28 +23,39 @@
|
||||
#include <mbedtls/oid.h>
|
||||
#include <mbedtls/x509_crt.h>
|
||||
|
||||
#include "filesystem/filesystem.h"
|
||||
|
||||
#include "logging.hpp"
|
||||
|
||||
#include "LIEF/exception.hpp"
|
||||
|
||||
#include "LIEF/BinaryStream/VectorStream.hpp"
|
||||
|
||||
#include "LIEF/Abstract/Relocation.hpp"
|
||||
#include "LIEF/PE/signature/Signature.hpp"
|
||||
#include "LIEF/PE/signature/SignatureParser.hpp"
|
||||
#include "LIEF/PE/signature/OIDToString.hpp"
|
||||
|
||||
|
||||
#include "LIEF/PE/CodeViewPDB.hpp"
|
||||
|
||||
#include "LIEF/PE/Parser.hpp"
|
||||
#include "Parser.tcc"
|
||||
|
||||
#include "LIEF/PE/utils.hpp"
|
||||
|
||||
#include "filesystem/filesystem.h"
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
#include "LIEF/PE/Binary.hpp"
|
||||
#include "LIEF/PE/DataDirectory.hpp"
|
||||
#include "LIEF/PE/ResourceData.hpp"
|
||||
#include "LIEF/PE/ResourceDirectory.hpp"
|
||||
#include "LIEF/PE/ResourceNode.hpp"
|
||||
#include "LIEF/PE/Export.hpp"
|
||||
#include "LIEF/PE/ExportEntry.hpp"
|
||||
#include "LIEF/PE/Pogo.hpp"
|
||||
#include "LIEF/PE/PogoEntry.hpp"
|
||||
#include "LIEF/PE/Relocation.hpp"
|
||||
#include "LIEF/PE/RelocationEntry.hpp"
|
||||
#include "LIEF/PE/Symbol.hpp"
|
||||
#include "LIEF/PE/Import.hpp"
|
||||
#include "LIEF/PE/ImportEntry.hpp"
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
|
||||
#include "signature/pkcs7.h"
|
||||
|
||||
#include "Parser.tcc"
|
||||
|
||||
// Issue with VS2017
|
||||
#if defined(IMAGE_FILE_MACHINE_UNKNOWN)
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
#include "LIEF/PE/Pogo.hpp"
|
||||
#include "LIEF/PE/PogoEntry.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
@ -35,8 +36,8 @@ Pogo::Pogo(void) :
|
||||
|
||||
|
||||
Pogo::Pogo(POGO_SIGNATURES signature, const std::vector<PogoEntry>& entries) :
|
||||
signature_{signature},
|
||||
entries_{entries}
|
||||
signature_{signature},
|
||||
entries_{entries}
|
||||
{}
|
||||
|
||||
Pogo* Pogo::clone(void) const {
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
#include "LIEF/PE/Pogo.hpp"
|
||||
#include "LIEF/PE/PogoEntry.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -17,7 +17,9 @@
|
||||
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/Relocation.hpp"
|
||||
#include "LIEF/PE/RelocationEntry.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/ResourceDirectory.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
|
@ -18,8 +18,6 @@
|
||||
#include <iomanip>
|
||||
#include <numeric>
|
||||
|
||||
#include "rang.hpp"
|
||||
|
||||
#include "logging.hpp"
|
||||
|
||||
#include "LIEF/exception.hpp"
|
||||
@ -33,6 +31,7 @@
|
||||
|
||||
#include "LIEF/PE/ResourcesManager.hpp"
|
||||
#include "LIEF/PE/ResourceData.hpp"
|
||||
#include "LIEF/PE/ResourceDirectory.hpp"
|
||||
|
||||
#include "LIEF/PE/resources/LangCodeItem.hpp"
|
||||
#include "LIEF/PE/resources/ResourceStringTable.hpp"
|
||||
@ -1340,7 +1339,6 @@ std::vector<ResourceAccelerator> ResourcesManager::accelerator(void) const {
|
||||
|
||||
std::string ResourcesManager::print(uint32_t depth) const {
|
||||
std::ostringstream oss;
|
||||
oss << rang::control::forceColor;
|
||||
uint32_t current_depth = 0;
|
||||
this->print_tree(*this->resources_, oss, current_depth, depth);
|
||||
return oss.str();
|
||||
@ -1360,21 +1358,16 @@ void ResourcesManager::print_tree(
|
||||
output << std::string(2 * (current_depth + 1), ' ');
|
||||
output << "[";
|
||||
if (child_node.is_directory()) {
|
||||
output << rang::fg::cyan;
|
||||
output << "Directory";
|
||||
} else {
|
||||
output << rang::fg::yellow;
|
||||
output << "Data";
|
||||
}
|
||||
|
||||
output << rang::style::reset;
|
||||
output << "] ";
|
||||
|
||||
if (child_node.has_name()) {
|
||||
|
||||
output << rang::bg::blue;
|
||||
output << u16tou8(child_node.name());
|
||||
output << rang::style::reset;
|
||||
} else {
|
||||
output << "ID: " << std::setw(2) << std::setfill('0') << std::dec << child_node.id();
|
||||
if (current_depth == 0) {
|
||||
|
@ -13,11 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <stdexcept>
|
||||
#include <string.h>
|
||||
#include <iomanip>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
#include <iterator>
|
||||
|
||||
@ -26,6 +22,7 @@
|
||||
|
||||
#include "LIEF/Abstract/Section.hpp"
|
||||
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "LIEF/exception.hpp"
|
||||
|
||||
#include "LIEF/PE/Symbol.hpp"
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
|
@ -15,10 +15,12 @@
|
||||
*/
|
||||
#include <iomanip>
|
||||
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
#include "LIEF/exception.hpp"
|
||||
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/TLS.hpp"
|
||||
#include "LIEF/PE/Section.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -17,8 +17,9 @@
|
||||
|
||||
#include "logging.hpp"
|
||||
|
||||
#include "LIEF/PE/json.hpp"
|
||||
#include "LIEF/hash.hpp"
|
||||
|
||||
#include "LIEF/PE/json.hpp"
|
||||
#include "LIEF/PE.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
|
||||
#include "LIEF/PE/resources/LangCodeItem.hpp"
|
||||
#include "LIEF/PE/ResourcesManager.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
@ -15,6 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "LIEF/utils.hpp"
|
||||
|
||||
#include "LIEF/PE/utils.hpp"
|
||||
#include "LIEF/PE/hash.hpp"
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
@ -66,4 +68,4 @@ std::ostream& operator<<(std::ostream& os, const ResourceStringTable& string_tab
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "LIEF/PE/utils.hpp"
|
||||
#include "LIEF/PE/EnumToString.hpp"
|
||||
|
||||
#include "LIEF/PE/ResourcesManager.hpp"
|
||||
#include "LIEF/PE/resources/ResourceVarFileInfo.hpp"
|
||||
|
||||
namespace LIEF {
|
||||
|
@ -14,27 +14,25 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <mbedtls/platform.h>
|
||||
#include <mbedtls/oid.h>
|
||||
#include <mbedtls/x509_crt.h>
|
||||
|
||||
#include "utf8.h"
|
||||
#include "LIEF/utils.hpp"
|
||||
|
||||
#include "logging.hpp"
|
||||
|
||||
#include "pkcs7.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "LIEF/exception.hpp"
|
||||
|
||||
#include "LIEF/PE/utils.hpp"
|
||||
#include "LIEF/BinaryStream/VectorStream.hpp"
|
||||
|
||||
#include "LIEF/PE/signature/SignatureParser.hpp"
|
||||
#include "LIEF/PE/signature/Signature.hpp"
|
||||
#include "LIEF/PE/signature/OIDToString.hpp"
|
||||
|
||||
#include "utf8.h"
|
||||
#include "logging.hpp"
|
||||
#include "pkcs7.h"
|
||||
|
||||
namespace LIEF {
|
||||
namespace PE {
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <fstream>
|
||||
#include <iterator>
|
||||
#include <exception>
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
#include <numeric>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
@ -29,9 +29,11 @@
|
||||
#include "LIEF/exception.hpp"
|
||||
|
||||
#include "LIEF/PE/utils.hpp"
|
||||
#include "LIEF/PE/Structures.hpp"
|
||||
#include "LIEF/PE/Binary.hpp"
|
||||
#include "LIEF/PE/Import.hpp"
|
||||
|
||||
#include "LIEF/PE/ImportEntry.hpp"
|
||||
#include "LIEF/BinaryStream/VectorStream.hpp"
|
||||
|
||||
#include "utils/ordinals_lookup_tables/libraries_table.hpp"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user